Bug #78469 [Opn->Csd]: FastCGI on_accept hook is not called when using named pipes on Windows
| From: | nikic@php.net | Date: | Fri, 30 Aug 2019 14:08:16 +0000 |
| Subject: | Bug #78469 [Opn->Csd]: FastCGI on_accept hook is not called when using named pipes on Windows | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-222494@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=78469&edit=1
ID: 78469
Updated by: nikic@php.net
Reported by: turchanov at farpost dot com
Summary: FastCGI on_accept hook is not called when using
named pipes on Windows
-Status: Open
+Status: Closed
Type: Bug
Package: FPM related
Operating System: Linux
PHP Version: 7.3.8
Block user comment: N
Private report: N
New Comment:
Automatic comment on behalf of turchanov@farpost.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=8f564e5308970e3c1b96fd17e493c5c3a952954b
Log: Fixed bug #78469
Previous Comments:
------------------------------------------------------------------------
[2019-08-28 03:32:08] turchanov at farpost dot com
The following pull request has been associated:
Patch Name: Fix #78469: fcgi_accept_request must call on_accept hook for named pipes too
On GitHub: https://github.com/php/php-src/pull/4636
Patch: https://github.com/php/php-src/pull/4636.patch
------------------------------------------------------------------------
[2019-08-28 02:59:48] turchanov at farpost dot com
Description:
------------
fcgi_accept_request function is supposed to call a FastCGI implementation's on_accept hook when
entering an "accepting" stage (that is right before calling "accept"). This hook
implementation (fpm_request_accepting) updates a worker state to an "accepting" state
which is effectively an "Idle" state, and updates counters on the scoreboard of the
corresponding pool (idle++, active--).
But this is not done when listening for client connections on a named pipe on Windows platform. In
that case a combination of ConnectNamedPipe/WaitForSingleObject is used (to be able to catch
in_shutdown as far as I understand), but it is nonetheless functionally equivalent to
"accept" call. Also by not calling on_hook neither a worker's state is updated to
"accepting" state nor scoreboard counters are updated.
So I suggest calling on_accept hook regardless of "named pipe" vs "tcp/unix
socket".
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=78469&edit=1