Bug #67181 [NEW]: Event port code needs to reassociate to port after an event

From: Date: Fri, 02 May 2014 15:34:39 +0000
Subject: Bug #67181 [NEW]: Event port code needs to reassociate to port after an event
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-185582@lists.php.net to get a copy of this message
From: d dot v dot taylor at leedsmet dot ac dot uk Operating system: Solaris 11.1 PHP version: 5.5.12 Package: FPM related Bug Type: Bug Bug description:Event port code needs to reassociate to port after an event 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 bug report at https://bugs.php.net/bug.php?id=67181&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=67181&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=67181&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=67181&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=67181&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=67181&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=67181&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=67181&r=needscript Try newer version: https://bugs.php.net/fix.php?id=67181&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=67181&r=support Expected behavior: https://bugs.php.net/fix.php?id=67181&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=67181&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=67181&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=67181&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=67181&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=67181&r=dst IIS Stability: https://bugs.php.net/fix.php?id=67181&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=67181&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=67181&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=67181&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=67181&r=mysqlcfg

« previous php.bugs (#185582) next »