Bug #16886 Updated: Seg. fault on socket_close if socket died
| From: | mfischer@php.net | Date: | Sun, 28 Apr 2002 12:57:34 +0000 |
| Subject: | Bug #16886 Updated: Seg. fault on socket_close if socket died | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-6347@lists.php.net to get a copy of this message | ||
ID: 16886
Updated by: mfischer@php.net
Reported By: tech@kalyweb.com
-Status: Open
+Status: Feedback
Bug Type: Sockets related
Operating System: Linux RedHat 7.2
PHP Version: 4.0CVS-2002-04-28
New Comment:
To properly diagnose this bug, we need a backtrace to see what is
happening behind the scenes. To find out how to generate a backtrace,
please read http://bugs.php.net/bugs-generating-backtrace.php
Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open".
Previous Comments:
------------------------------------------------------------------------
[2002-04-28 08:43:06] tech@kalyweb.com
I had that issue :
I use a non blocking socket to read a data stream.
I was assuming that if socket_read($socket) !== false then I should
close the socket !!
NO ! I must not !
If I close that socket, I have an error : 9975 Segmentation fault
/usr/local/php-cgi/bin/php -q ./core.php
I checked socket_last_error and I found : 104 : Connexion reset by peer
....
It would be nice if the socket is checked before socket_close or
socket_shutdown ...
I don't know sockets system under Linux . I can't fix that :(
To have the same error, create a socket, listen on it, accept accept
that connexion. On the remote machine, close the telnet (kill or other
:D) and then do socket_close on your socket.
Then you have a seg. fault !
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=16886&edit=1