Edit report at http://bugs.php.net/bug.php?id=51580&edit=1

 ID:               51580
 User updated by:  marco at vmsoft-gbr dot de
 Reported by:      marco at vmsoft-gbr dot de
 Summary:          socket_select randomly crashes when used together with
                   fork and Unix signals
 Status:           Open
 Type:             Bug
 Package:          PCNTL related
 Operating System: Debian Linux
 PHP Version:      5.3.2

 New Comment:

just ran it under gdb, it fails as expected, but as it's not
segfaulting, no backtrace can be made.


Previous Comments:
------------------------------------------------------------------------
[2010-04-17 11:06:53] marco at vmsoft-gbr dot de

PHP itself doesn't crash, the error is not fatal - and how do I make a
gdb backtrace on a forked process, anyway?

------------------------------------------------------------------------
[2010-04-17 03:51:06] paj...@php.net

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.



------------------------------------------------------------------------
[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

ma...@vs932:~/php_daemon$ kill -s 10 20030

got signal 10

ma...@vs932:~/php_daemon$ kill -s 10 20030

got signal 10

ma...@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

ma...@vs932:~/php_daemon$ kill -s 10 20030

got signal 10

ma...@vs932:~/php_daemon$ kill -s 10 20030

got signal 10

ma...@vs932:~/php_daemon$ kill -s 10 20030

got signal 10

ma...@vs932:~/php_daemon$ kill -s 10 20030

ma...@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



ma...@vs932:~/php_daemon$ 


------------------------------------------------------------------------



-- 
Edit this bug report at http://bugs.php.net/bug.php?id=51580&edit=1

Reply via email to