|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #78469 FastCGI on_accept hook is not called when using named pipes on Windows
Submitted: 2019-08-28 02:59 UTC Modified: -
From: turchanov at farpost dot com Assigned:
Status: Closed Package: FPM related
PHP Version: 7.3.8 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: turchanov at farpost dot com
New email:
PHP Version: OS:


 [2019-08-28 02:59 UTC] turchanov at farpost dot com
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".


Add a Patch

Pull Requests

Pull requests:

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2019-08-28 03:32 UTC] 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:
 [2019-08-30 14:08 UTC]
Automatic comment on behalf of
Log: Fixed bug #78469
 [2019-08-30 14:08 UTC]
-Status: Open +Status: Closed
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Jun 19 17:01:33 2024 UTC