Edit report at https://bugs.php.net/bug.php?id=76601&edit=1
ID: 76601
Comment by: emayoral at arsys dot es
Reported by: mnikulin at plesk dot com
Summary: Partially working php-fpm ater incomplete reload
Status: Open
Type: Bug
Package: FPM related
Operating System: Linux, Ubuntu-16.04
PHP Version: 7.0.30
Block user comment: N
Private report: N
New Comment:
Dear maintainers, please note this bug (and its solution provided by mnikulin at plesk dot com),
applies to all versions from 7.1 to at least 7.3
Previous Comments:
------------------------------------------------------------------------
[2019-01-24 03:18:18] mnikulin at plesk dot com
Related To: Bug #77140
------------------------------------------------------------------------
[2019-01-22 09:55:07] mnikulin at plesk dot com
Related To: Bug #77443
------------------------------------------------------------------------
[2018-10-16 11:03:02] mnikulin at plesk dot com
Related To: Bug #76895
------------------------------------------------------------------------
[2018-10-16 04:47:12] mnikulin at plesk dot com
I have added another patch that blocks signal delivery during child initialization. It depends on
the patch for #74083.
Patch php-76601_kill-not-rescheduled_7.2.11_2018-09-28.patch is required.
Patch php-fpm-76601-avoid-child-ignorance_7.2.11_2018-09-28.patch
is intended to stop children more gently in the case of concurrent reload.
Actually any of them fixes #76601 but I suppose that it is better
to avoid both problems.
With kill-not-rescheduled patch I am unable to reproduce
#76895 "PHP-FPM7.x can't finish reloading after encountering a fatal error"
These patches are for 7.2.11, can be cleanly applied for 7.1.23.
Quite trivial conflicts related to context lines exist
for 7.0.32 and for 5.6.38.
------------------------------------------------------------------------
[2018-07-12 03:11:02] mnikulin at plesk dot com
SIGQUIT and SIGTERM may be missed by children just after reload due to
fpm_signals.c:169 static void sig_handler()
if (fpm_globals.parent_pid != getpid()) {
/* prevent a signal race condition when child process
have not set up it's own signal handler yet */
return;
}
Looks like this measure is not a solution for all cases. sigprocmask() SIG_BLOCK/SIG_UNBLOCK may be
added around the fork() call to
fpm_children.c:400 int fpm_children_make()
pid = fork();
------------------------------------------------------------------------
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=76601
--
Edit this bug report at https://bugs.php.net/bug.php?id=76601&edit=1