|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #67181 Event port code needs to reassociate to port after an event
Submitted: 2014-05-02 15:34 UTC Modified: 2021-12-07 22:14 UTC
From: d dot v dot taylor at leedsmet dot ac dot uk Assigned: bukka (profile)
Status: Closed Package: FPM related
PHP Version: 5.5.12 OS: Solaris 11.1
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:
46 - 11 = ?
Subscribe to this entry?

 [2014-05-02 15:34 UTC] d dot v dot taylor at leedsmet dot ac dot uk
I've enabled request_slowlog_timeout on PHP-FPM, but it only seems to successfully act on the first request. Subsequent slow requests cause child processes to be sent the SIGSTOP but they *don't* then get traced and SIGCONT-ed, leaving them in a stopped state indefinitely.

I've investigated this and it looks like the problem is connected to the port event module. This is a section of the port_associate man page:

     When an event for a PORT_SOURCE_FD object is retrieved,  the
     object  no  longer  has  an  association with the port.  The
     event can be processed without the possibility that  another
     thread  can retrieve a subsequent event for the same object.
     After processing of the file descriptor  is  completed,  the
     port_associate()  function  can be called to reassociate the
     object with the port.

i.e. if any events are successfully read from the port in fpm_event_port_wait(), it needs an explicit call to port_associate() again to re-establish the association and ensure future events are listened for.

At the moment this doesn't happen, and so the parent FPM process doesn't see the subsequent port events caused by child processes being stopped.

The problem doesn't occur if I switch to using /dev/poll for the event mechanism.

Test script:
    /* Set e.g. request_slowlog_timeout = 5 */


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2014-07-08 14:47 UTC] d dot v dot taylor at leedsmet dot ac dot uk
From a quick read, the patch attached to bug #65800 puts this re-association in.
 [2015-09-20 08:37 UTC] rainer dot jung at kippdata dot de
Please check the latest patch at

I expect your problem to be a dublicate.
 [2021-12-07 22:14 UTC]
-Status: Open +Status: Closed -Assigned To: +Assigned To: bukka
 [2021-12-07 22:14 UTC]
This has been fixed by so it's available in 7.4+
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Jun 18 02:01:30 2024 UTC