Bug #77934 [Asn]: php-fpm kill -USR2 not working

From: Date: Mon, 06 May 2019 16:52:28 +0000
Subject: Bug #77934 [Asn]: php-fpm kill -USR2 not working
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-220718@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=77934&edit=1 ID: 77934 Updated by: nikic@php.net Reported by: marc+bugsphp at cdmon dot com Summary: php-fpm kill -USR2 not working Status: Assigned Type: Bug Package: FPM related Operating System: Debian 9 PHP Version: 7.3.4 Assigned To: bukka Block user comment: N Private report: N New Comment: @bukka: Nice catch! Previous Comments: ------------------------------------------------------------------------ [2019-05-06 09:17:11] marc+bugsphp at cdmon dot com Yeah Jakub! that easy to solve! That worked perfect for me, I have compiled a 7.3.4 and tested right now and it worked as spected. Now we need that someone more try this or will you push it to next revisions? Thanks!! ------------------------------------------------------------------------ [2019-05-05 15:11:43] bukka@php.net I have been looking to the fpm_signals.c and noticed that we still try to close standard input which might cause this issue. It's done in sig_soft_quit function. So maybe this could fix it: diff --git a/sapi/fpm/fpm/fpm_signals.c b/sapi/fpm/fpm/fpm_signals.c index 1b97025ea7..caf41e8a3f 100644 --- a/sapi/fpm/fpm/fpm_signals.c +++ b/sapi/fpm/fpm/fpm_signals.c @@ -142,7 +142,7 @@ static void sig_soft_quit(int signo) /* {{{ */ int saved_errno = errno; /* closing fastcgi listening socket will force fcgi_accept() exit immediately */ - close(0); + close(fpm_globals.listening_socket); if (0 > socket(AF_UNIX, SOCK_STREAM, 0)) { zlog(ZLOG_WARNING, "failed to create a new socket"); } ------------------------------------------------------------------------ [2019-04-29 10:06:24] marc+bugsphp at cdmon dot com Dear Jakub, I have tested both patches toghether and it didn't solved the problem. Sorry. ------------------------------------------------------------------------ [2019-04-28 18:21:32] bukka@php.net This is quite interesting that the mentioned fix made things worse for USR2 handling. There are already some errors that could fix it for you too as there are some other issues with USR2 handling. Would you able to test patches from the following bugs?: https://bugs.php.net/bug.php?id=74083 https://bugs.php.net/bug.php?id=76601 There are patches for each bug. I will need to create a test for them before they can be merged but it would be great if they get more testing. ------------------------------------------------------------------------ [2019-04-25 06:37:14] marc+bugsphp at cdmon dot com @Christoph the solution is just a rollback of a previous patch (http://git.php.net/?p=php-src.git;a=commitdiff;h=69dee5c732fe982c82edb17d0dbc3e79a47748d8), as I said I have deleted that patch and it worked. Maybe a workaround for me is just to delete that patch, but it's not the best scenario that I would like. ------------------------------------------------------------------------ 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=77934 -- Edit this bug report at https://bugs.php.net/bug.php?id=77934&edit=1

« previous php.bugs (#220718) next »