php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #66572 Crash / Suspended execution
Submitted: 2014-01-25 04:01 UTC Modified: 2016-07-10 04:22 UTC
From: jitesh dot prajapati at infostretch dot com Assigned: cmb (profile)
Status: No Feedback Package: Sockets related
PHP Version: Irrelevant OS: Cent OS 6
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: jitesh dot prajapati at infostretch dot com
New email:
PHP Version: OS:

 

 [2014-01-25 04:01 UTC] jitesh dot prajapati at infostretch dot com
Description:
------------
---
From manual page: http://www.php.net/function.socket-write
---

Socket server crashes on write after around 20-30 minutes, and does not reveal any information of crash.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-01-25 04:02 UTC] requinix@php.net
-Status: Open +Status: Feedback
 [2014-01-25 04:02 UTC] requinix@php.net
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.



 [2014-01-25 10:39 UTC] jitesh dot prajapati at infostretch dot com
-Status: Feedback +Status: Open
 [2014-01-25 10:39 UTC] jitesh dot prajapati at infostretch dot com
More Information
-----------------

We have implemented web socket server, and it is working fine, it able to handle so many read/writes.

Now issue is after some time (around 20-30 mins and sometime longer than it), server got crash, it shows service in process list but server does not able to request response.

We have placed different debugging points and found that server goes hand on executing function socket_write.
 [2014-01-25 10:41 UTC] jitesh dot prajapati at infostretch dot com
More Information
-----------------

We have implemented web socket server, and it is working fine, it able to handle so many read/writes.

Now issue is after some time (around 20-30 mins and sometime longer than it), server got crash, it shows service in process list but server does not able to request response.

We have placed different debugging points and found that server goes crash on executing function socket_write.
 [2014-01-26 00:04 UTC] requinix@php.net
-Status: Open +Status: Feedback
 [2014-01-26 00:04 UTC] requinix@php.net
Still not enough info. We need to see demo code (a short sample that exhibits the same problem, not your real thing), or error information, or backtraces, or something. A textual description of what you observe is alright but doesn't really offer us much to go on.

You say "crash" but the process is running? Then it's not a crash. socket_write() never returns? It's really just a call to write(3) so there's not much room for it to have problems. Could the socket be blocked, implying the client isn't reading everything from it?
 [2014-01-27 06:36 UTC] jitesh dot prajapati at infostretch dot com
-Summary: Crash +Summary: Crash / Suspended execution -Status: Feedback +Status: Open
 [2014-01-27 06:36 UTC] jitesh dot prajapati at infostretch dot com
Thank you for your quick response.

Please find following URL containing code we have implemented.

http://202.131.96.147/test/wevsocketclass.php

Execution got suspended on "socket_write" function in "send" method, and till i do not restart service it hangs up.

We do not implement explicit block/unblock of sockets. We have tried on different linux servers, and same issue is producing on each servers.
 [2014-01-27 13:09 UTC] jitesh dot prajapati at infostretch dot com
socket_write() never returns? - <b>MY ANSWER</b> - Yes, Program execution suspended on socket_write and hags up.

It's really just a call to write(3) so there's not much room for it to have problems. 

Could the socket be blocked - <b>MY ANSWER</b> - Not sure, it may block by php function and have a some dead lock situation.

implying the client isn't reading everything from it? - <b>MY ANSWER</b> - client is reading all information when it is delivered .
 [2016-06-29 17:38 UTC] cmb@php.net
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2016-06-29 17:38 UTC] cmb@php.net
> Please find following URL containing code we have implemented.
>
> http://202.131.96.147/test/wevsocketclass.php

How are we supposed to see that code? If the problem still
persists on recent PHP versions, we need reproduce code or at
least a backtrace.
 [2016-07-10 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Oct 07 15:01:28 2024 UTC