Bug #77443 [NEW]: FPM hangs on reload due to children handling SIGTERM since PHP 7.1

From: Date: Fri, 11 Jan 2019 07:47:05 +0000
Subject: Bug #77443 [NEW]: FPM hangs on reload due to children handling SIGTERM since PHP 7.1
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-218895@lists.php.net to get a copy of this message
From: emayoral at arsys dot es Operating system: CentOS 6 PHP version: 7.2.14 Package: FPM related Bug Type: Bug Bug description:FPM hangs on reload due to children handling SIGTERM since PHP 7.1 Description: ------------ I run a system with a relatively large number of pfp-fpm pools. Whenever a pool is added or removed a php-fpm reload is issued. The behaviour of php-fpm on reload is to terminate children with SIGQUIT, wait process_control_timeout (10 seconds in my config), then issue SIGTERM to the remaining children. Now, some of my pool children will not die on SIGQUIT when opcache is used, but that is a different bug. Point is until PHP 7.0, SIGTERM would finish the remaining children, the reload would complete in 10 seconds and everything would be fine. But starting with PHP 7.1 the php processes also handle SIGTERM (I suspect it uses the same signal handler as for SIGQUIT, although I am not 100% sure of that). Now the children which did not die on SIGQUIT do not die on SIGTERM either and the reload will not complete until those children are manually issued a SIGKILL. I think php-fpm 7.1 and higher should do its first round of SIGQUIT to its children on reload, but after process_control_timeout, issue a SIGKILL instead of a SIGTERM, since SIGTERM is not an effective way of ending rogue children any more. -- Edit bug report at https://bugs.php.net/bug.php?id=77443&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=77443&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=77443&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=77443&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=77443&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=77443&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=77443&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=77443&r=needscript Try newer version: https://bugs.php.net/fix.php?id=77443&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=77443&r=support Expected behavior: https://bugs.php.net/fix.php?id=77443&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=77443&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=77443&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=77443&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=77443&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=77443&r=dst IIS Stability: https://bugs.php.net/fix.php?id=77443&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=77443&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=77443&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=77443&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=77443&r=mysqlcfg

« previous php.bugs (#218895) next »