Bug #71433 [Fbk->NoF]: Basic usage of pcntl_signal causes segfault
Edit report at https://bugs.php.net/bug.php?id=71433&edit=1
ID: 71433
Updated by: php-bugs@lists.php.net
Reported by: dannykopping at gmail dot com
Summary: Basic usage of pcntl_signal causes segfault
-Status: Feedback
+Status: No Feedback
Type: Bug
Package: PCNTL related
Operating System: OSX Yosemite
PHP Version: 5.5.31
Private report: N
New Comment:
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.
Previous Comments:
------------------------------------------------------------------------
[2017-02-21 16:23:36] requinix@php.net
Related To: Bug #65628
------------------------------------------------------------------------
[2017-02-21 16:22:56] requinix@php.net
PHP 5.5 is not supported. Can anyone reproduce this problem with a version still in active support
(currently 7.0 and 7.1)?
http://php.net/supported-versions.php
------------------------------------------------------------------------
[2017-02-21 15:58:31] rioux dot jeff at gmail dot com
Here is my test:
==============================================================================
$ uname -a
Darwin test 15.6.0 Darwin Kernel Version 15.6.0: Mon Jan 9 23:07:29 PST 2017;
root:xnu-3248.60.11.2.1~1/RELEASE_X86_64 x86_64
$ cat ~/test.php
<?php
function handleSignal($signo)
{
$signals = array(
SIGTERM => "SIGTERM",
SIGINT => "SIGINT"
);
$signal = $signals[$signo];
echo "Received received {$signal}... Shutting down\n";
die(0);
}
if (function_exists("pcntl_signal"))
{
pcntl_signal(SIGTERM, "handleSignal");
pcntl_signal(SIGINT, "handleSignal");
}
while (true)
{
sleep(1);
echo ".\n";
if (function_exists("pcntl_signal_dispatch")) pcntl_signal_dispatch();
}
$ /usr/local/opt/php55/bin/php ~/test.php
.
.
.
^CSegmentation fault: 11 (core dumped)
==============================================================================
Here the trace I was able to produce:
==============================================================================
$ lldb /usr/local/opt/php55/bin/php -c core.11075
(lldb) target create "/usr/local/opt/php55/bin/php" --core "core.11075"
warning: (x86_64) /cores/core.11075 load command 155 LC_SEGMENT_64 has a fileoff + filesize
(0x30430000) that extends beyond the end of the file (0x3042f000), the segment will be truncated to
match
warning: (x86_64) /cores/core.11075 load command 156 LC_SEGMENT_64 has a fileoff (0x30430000) that
extends beyond the end of the file (0x3042f000), ignoring this section
Core file '/cores/core.11075' (x86_64) was loaded.
(lldb) bt
* thread #1: tid = 0x0000, 0x0000000103b55393 php`zend_signal_handler_unblock + 55, stop reason =
signal SIGSTOP
* frame #0: 0x0000000103b55393 php`zend_signal_handler_unblock + 55
frame #1: 0x0000000103ba9f1b php`zend_do_fcall_common_helper_SPEC + 1936
frame #2: 0x0000000103b5cd68 php`execute_ex + 971
frame #3: 0x0000000103b2a2a1 php`dtrace_execute_ex + 226
frame #4: 0x0000000104b63b61 xdebug.so`xdebug_execute_ex + 2352
frame #5: 0x0000000103b380e1 php`zend_execute_scripts + 491
frame #6: 0x0000000103ae4729 php`php_execute_script + 800
frame #7: 0x0000000103bceee6 php`do_cli + 3734
frame #8: 0x0000000103bcded0 php`main + 1276
frame #9: 0x00007fff985295ad libdyld.dylib`start + 1
frame #10: 0x00007fff985295ad libdyld.dylib`start + 1
==============================================================================
------------------------------------------------------------------------
[2016-02-07 04:22:20] 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.
------------------------------------------------------------------------
[2016-01-25 05:33:54] laruence@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.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=71433
--
Edit this bug report at https://bugs.php.net/bug.php?id=71433&edit=1
Thread (7 messages)