You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
zend_signal_handler_defer crashes on apache shutdown #10015
Seems to be the same issue as #9649: the signal is delivered to a thread that didn't execute PHP yet. It crashes when zend_signal_handler_defer access thread globals.
0x00007f338867185e in zend_signal_handler_defer (signo=1, siginfo=0x7f3341ffa0b0, context=0x7f3341ff9f80) at /php-src/Zend/zend_signal.c:9696 if (EXPECTED(SIGG(active))) {
(gdb) bt
#0 0x00007f338867185e in zend_signal_handler_defer (signo=1, siginfo=0x7f3341ffa0b0, context=0x7f3341ff9f80) at /php-src/Zend/zend_signal.c:96#1 <signal handler called>#2 0x00007f338961cfde in epoll_wait (epfd=8, events=0x7f33889a9620, maxevents=52, timeout=5000) at ../sysdeps/unix/sysv/linux/epoll_wait.c:30#3 0x00007f33897476b0 in ?? () from /lib/x86_64-linux-gnu/libapr-1.so.0#4 0x00007f3389383be8 in ?? () from /usr/lib/apache2/modules/mod_mpm_event.so#5 0x00007f338958bb43 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442#6 0x00007f338961da00 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
(gdb) list
91 zend_signal_handler(signo, siginfo, context);
92 return;
93 }
94 #endif
9596 if (EXPECTED(SIGG(active))) {
97 if (UNEXPECTED(SIGG(depth) == 0)) { /* try to handle signal */
98 if (UNEXPECTED(SIGG(blocked))) {
99 SIGG(blocked) = 0;
100 }
This has been fixed in master by #9766, however in hindsight this may not be ideal in this context.
Activity
cmb69 commentedon Nov 28, 2022
Indeed, possibly a duplicate of https://bugs.php.net/bug.php?id=78619.
Anyhow, since PHP 8.0 is no longer actively supported, does this happen on PHP 8.1 too?
cmb69 commentedon Nov 30, 2022
Might also be related to #8789.
psumbera commentedon Dec 1, 2022
I can reproduce it with PHP 8.1 too. It's actually very easy:
arnaud-lb commentedon Dec 2, 2022
Seems to be the same issue as #9649: the signal is delivered to a thread that didn't execute PHP yet. It crashes when
zend_signal_handler_deferaccess thread globals.This has been fixed in master by #9766, however in hindsight this may not be ideal in this context.
theo: Use php-fpm instead of mod_php
psumbera commentedon Jan 30, 2023
I have applied above pull request and I indeed cannot reproduce the issue (with PHP 8.2).
Will this be back ported to versions 8.1 and 8.2?
Merge branch 'PHP-8.2'