Bug #67181 [Com]: Event port code needs to reassociate to port after an event
Edit report at https://bugs.php.net/bug.php?id=67181&edit=1
ID: 67181
Comment by: rainer dot jung at kippdata dot de
Reported by: d dot v dot taylor at leedsmet dot ac dot uk
Summary: Event port code needs to reassociate to port after
an event
Status: Open
Type: Bug
Package: FPM related
Operating System: Solaris 11.1
PHP Version: 5.5.12
Block user comment: N
Private report: N
New Comment:
Please check the latest patch at
https://bugs.php.net/bug.php?id=65800
I expect your problem to be a dublicate.
Previous Comments:
------------------------------------------------------------------------
[2014-07-08 14:47:04] 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.
------------------------------------------------------------------------
[2014-05-02 15:34:38] d dot v dot taylor at leedsmet dot ac dot uk
Description:
------------
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:
---------------
<?php
/* Set e.g. request_slowlog_timeout = 5 */
sleep(10);
phpinfo();
?>
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=67181&edit=1
Thread (4 messages)