|  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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
35 - 32 = ?
Subscribe to this entry?

 [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: Fri Jun 14 16:01:33 2024 UTC