Bug #76601 [Com]: Partially working php-fpm ater incomplete reload
| From: | mnikulin at plesk dot com | Date: | Mon, 04 Feb 2019 09:44:10 +0000 |
| Subject: | Bug #76601 [Com]: Partially working php-fpm ater incomplete reload | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-219358@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=76601&edit=1
ID: 76601
Comment by: mnikulin at plesk dot com
Reported by: mnikulin at plesk dot com
Summary: Partially working php-fpm ater incomplete reload
Status: Assigned
Type: Bug
Package: FPM related
Operating System: Linux, Ubuntu-16.04
PHP Version: 7.0.30
Assigned To: bukka
Block user comment: N
Private report: N
New Comment:
Last week I was trying to write a test for Bug #76895 that is the easiest way to reproduce the case.
I realized that the code that runs test suite does not force empty TEST_PHP_EXECUTABLE directory so
if php is already installed to the prefix, ini files for modules may affect test results. I have not
reproduce the issue in the build environment but "break/continue" is reproducible on test
servers. The difference in modules/extensions and their configurations (sodium, etc.) and error
reporting options. My current draft is
-----
--TEST--
FPM: bug76895 bug77443 - child blocks reload
--SKIPIF--
<?php include "skipif.inc"; ?>
--FILE--
<?php
require_once "tester.inc";
$cfg = <<<EOT
[global]
error_log = {{FILE:LOG}}
pid = {{FILE:PID}}
[unconfined]
listen = {{ADDR}}
pm = ondemand
pm.max_children = 5
pm.start_servers = 1
pm.min_spare_servers = 1
pm.max_spare_servers = 1
catch_workers_output = yes
EOT;
$code = <<<EOT
<?php
\$variable = 'test';
if (!empty(\$variable)) {
break;
}
EOT;
$tester = new FPM\Tester($cfg, $code);
$tester->start();
$tester->expectLogStartNotices();
$tester->request()->expectEmptyBody();
$tester->expectLogWarning('child \d+ said into stderr: "NOTICE: PHP message: PHP Fatal
error: \'break\' not in the \'loop\' or \'switch\' context in .* on
line 4"', 'unconfined');
$tester->signal('USR2');
$tester->expectLogNotice('Reloading in progress ...');
$tester->expectLogNotice('reloading: .*');
$tester->expectLogNotice('using inherited socket fd=\d+, "127.0.0.1:\d+"');
$tester->expectLogStartNotices();
$tester->terminate();
$tester->expectLogTerminatingNotices();
$tester->close();
?>
Done
--EXPECT--
Done
--CLEAN--
<?php
require_once "tester.inc";
FPM\Tester::clean();
?>
-----
Message body is actually not empty in build environment, message
pattern and output should be adjusted as well.
I am unsure if I will have time this week to proceed further, hope the draft might be useful for
you.
Previous Comments:
------------------------------------------------------------------------
[2019-02-04 09:09:05] nikic@php.net
@bukka: Are you familiar with the FPM signal handling code? This looks like something we should
really fix and the patch at least looks reasonable to me.
------------------------------------------------------------------------
[2019-02-04 08:56:34] emayoral at arsys dot es
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
------------------------------------------------------------------------
[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
------------------------------------------------------------------------
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