Edit report at http://bugs.php.net/bug.php?id=51580&edit=1
ID: 51580
Updated by: [email protected]
Reported by: marco at vmsoft-gbr dot de
Summary: socket_select randomly crashes when used together with
fork and Unix signals
-Status: Open
+Status: Feedback
Type: Bug
Package: PCNTL related
Operating System: Debian Linux
PHP Version: 5.3.2
New Comment:
Thank you for this bug report. To properly diagnose the problem, 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 for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32
Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2010-04-17 02:11:01] marco at vmsoft-gbr dot de
Description:
------------
When firing unix signals onto a forked process with pcntl_signal
handlers active and a socket_select currently running, socket_select may
crash.
Run the test script with php test.php 1339, and then launch some "kill
-s 10 <child pid>" on it. After some, maybe just one, kill's, the script
will crash.
Test script:
---------------
http://php.pastebin.com/Td68vtMn
Expected result:
----------------
Installing signal handlers
Installing handler for signal 15
Installing handler for signal 10
child-pid 20030
running
marco@vs932:~/php_daemon$ kill -s 10 20030
got signal 10
marco@vs932:~/php_daemon$ kill -s 10 20030
got signal 10
marco@vs932:~/php_daemon$ kill -s 10 20030
got signal 10
(etc)
Actual result:
--------------
Installing signal handlers
Installing handler for signal 15
Installing handler for signal 10
child-pid 20030
running
marco@vs932:~/php_daemon$ kill -s 10 20030
got signal 10
marco@vs932:~/php_daemon$ kill -s 10 20030
got signal 10
marco@vs932:~/php_daemon$ kill -s 10 20030
got signal 10
marco@vs932:~/php_daemon$ kill -s 10 20030
marco@vs932:~/php_daemon$ PHP Warning: socket_select(): unable to
select [4]: Interrupted system call in /home/marco/php_daemon/test.php
on line 39
socket_select failed: Interrupted system call
end
marco@vs932:~/php_daemon$
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=51580&edit=1
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.