Uh oh!
There was an error while loading. Please reload this page.
Properly forward the signal to the original handler if TSRM is shutdown - #10219
Conversation
cmb69
commented
Jan 4, 2023
See also #10193 (seems that ZTS and signals don't play well together anyway). |
bukka
commented
Dec 3, 2023
@bwoebi I just spent some time to go through this, all those ZTS signal issues and signal code itself. I think this fix makes sense. From what I see, the Zend Signal code overwrite FPM SIGQUIT handler ( Otherwise it needs rebase as there is a conflict. @arnaud-lb could you please also double this if you also think it makes sense. |
arnaud-lb
commented
Dec 9, 2023
This makes sense to me as well 👍 |
bukka
commented
Jan 11, 2024
@bwoebi Do you plan to merge this? |
This ensures proper handling of SIGQUIT in ZTS fpm builds outside of active requests.
bwoebi
commented
Mar 17, 2024
@bukka I missed that - rebased it now. So you're saying the patch is fine as is? Then I'll merge it. |
bukka
commented
Mar 17, 2024
Yeah I think it's fine as is. I can't really think about any reasonable test for this. |
I've occasionally been observing stacktraces like:
(Asan builds incidentally make that particular issue a little bit more command as it has more overhead on process end.)
Coredumps were being created despite SIGQUIT being officially a signal for graceful handling in php-fpm, as signals are in ZTS builds not forwarded to the original handler if TSRM has already been shutdown.
This ensures proper handling of SIGQUIT in ZTS fpm builds outside of active requests.
I'm not sure whether that's truly the correct fix, but it looks sensible to me...