Re: Re: com php-src: Fix bug #77934 (php-fpm kill -USR2 not working): NEWSsapi/fpm/fpm/fpm_signals.c
sapi/fpm/tests/bug77934-reload-process-control.phpt

From: Date: Thu, 30 May 2019 09:11:44 +0000
Subject: Re: Re: com php-src: Fix bug #77934 (php-fpm kill -USR2 not working): NEWSsapi/fpm/fpm/fpm_signals.c
sapi/fpm/tests/bug77934-reload-process-control.phpt
References: 1 2 3 4  Groups: php.cvs 
Request: Send a blank email to php-cvs+get-106457@lists.php.net to get a copy of this message
On 30/05/2019 11:11, Matteo Beccati wrote: > Hi Jakub, > > the test is still failing for me from 7.2 up to master. Sorry, I forgot the link: https://revive.beccati.com/bamboo/browse/PHP-SRC7-TESTS-572/test/case/50634376 > Cheers > > On 13/05/2019 19:53, Jakub Zelenka wrote: >> Just pushed something that should hopefully fix it. >> >> On Mon, May 13, 2019 at 8:05 AM Christoph M. Becker <cmbecker69@gmx.de> >> wrote: >> >>> On 11.05.2019 at 21:07, Jakub Zelenka wrote: >>> >>>> Commit: cc5c51e7f0732067f105d13c6d355fcab5965c2f >>>> Author: Jakub Zelenka <bukka@php.net> Sat, 11 May 2019 >>> 20:07:39 +0100 >>>> Parents: b15bfb9129eb7941b3643209243caba891e4d25d >>>> Branches: PHP-7.2 >>>> >>>> Link: >>> >>> http://git.php.net/?p=php-src.git;a=commitdiff;h=cc5c51e7f0732067f105d13c6d355fcab5965c2f >>>> >>>> Log: >>>> Fix bug #77934 (php-fpm kill -USR2 not working) >>>> >>>> Bugs: >>>> https://bugs.php.net/77934 >>>> >>>> Changed paths: >>>> M NEWS >>>> M sapi/fpm/fpm/fpm_signals.c >>>> A sapi/fpm/tests/bug77934-reload-process-control.phpt >>>> >>>> >>>> Diff: >>>> diff --git a/NEWS b/NEWS >>>> index f774605..c89f43a 100644 >>>> --- a/NEWS >>>> +++ b/NEWS >>>> @@ -3,6 +3,7 @@ PHP >>> NEWS >>>> ?? ??? 2019, PHP 7.2.19 >>>> >>>> - FPM: >>>> + . Fixed bug #77934 (php-fpm kill -USR2 not working). (Jakub Zelenka) >>>> . Fixed bug #77921 (static.php.net doesn't work anymore). (Peter >>> Kokot) >>>> >>>> - GD: >>>> diff --git a/sapi/fpm/fpm/fpm_signals.c b/sapi/fpm/fpm/fpm_signals.c >>>> index 0df119b..4c9f966 100644 >>>> --- a/sapi/fpm/fpm/fpm_signals.c >>>> +++ b/sapi/fpm/fpm/fpm_signals.c >>>> @@ -143,7 +143,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"); >>>> } >>>> diff --git a/sapi/fpm/tests/bug77934-reload-process-control.phpt >>> b/sapi/fpm/tests/bug77934-reload-process-control.phpt >>>> new file mode 100644 >>>> index 0000000..d223403 >>>> --- /dev/null >>>> +++ b/sapi/fpm/tests/bug77934-reload-process-control.phpt >>>> @@ -0,0 +1,44 @@ >>>> +--TEST-- >>>> +FPM: bug77934 - php-fpm kill -USR2 not working >>>> +--SKIPIF-- >>>> +<?php include "skipif.inc"; ?> >>>> +--FILE-- >>>> +<?php >>>> + >>>> +require_once "tester.inc"; >>>> + >>>> +$cfg = <<<EOT >>>> +[global] >>>> +error_log = {{FILE:LOG}} >>>> +pid = {{FILE:PID}} >>>> +process_control_timeout=20 >>>> +[unconfined] >>>> +listen = {{ADDR}} >>>> +pm = dynamic >>>> +pm.max_children = 5 >>>> +pm.start_servers = 1 >>>> +pm.min_spare_servers = 1 >>>> +pm.max_spare_servers = 1 >>>> +EOT; >>>> + >>>> +$tester = new FPM\Tester($cfg); >>>> +$tester->start(); >>>> +$tester->expectLogStartNotices(); >>>> +$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(); >>>> +?> >>> >>> This commit breaks several tests[1] in PHP-7.2 only. Can you please >>> have a look at this? >>> >>> [1] >>> <https://travis-ci.org/php/php-src/builds/531216112> >>> >>> Thanks, >>> Christoph >>> >> > > -- Matteo Beccati Development & Consulting - http://www.beccati.com/

« previous php.cvs (#106457) next »