Bug #51580 [Fbk->Opn]: socket_select randomly crashes when used together with fork and Unix signals
| From: | marco at vmsoft-gbr dot de | Date: | Sat, 17 Apr 2010 09:06:53 +0000 |
| Subject: | Bug #51580 [Fbk->Opn]: socket_select randomly crashes when used together with fork and Unix signals | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-149628@lists.php.net to get a copy of this message | ||
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: Feedback
+Status: Open
Type: Bug
Package: PCNTL related
Operating System: Debian Linux
PHP Version: 5.3.2
New Comment:
PHP itself doesn't crash, the error is not fatal - and how do I make a
gdb backtrace on a forked process, anyway?
Previous Comments:
------------------------------------------------------------------------
[2010-04-17 03:51:06] pajoye@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
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