From: loony at loonybin dot org Operating system: Linux 2.6.20 - FC6 PHP version: 5.2.1 PHP Bug Type: Streams related Bug description: Streams blocking under concurrent access
Description: ------------ Tail for php. Open the file, output the current content... then wait for more - if no more content arrives, then return number of bytes read after a while... Running 1 execution of this code works fine. Executing it from two browsers at the same time blocks. Happens on Fedora Core 6 default 5.1.6 and also after upgrading to 5.2.1 Reproduce code: --------------- http://ns1.loonybin.org/php/tail.tar.gz - 45 lines Expected result: ---------------- See content of file printed immediately. If any content is appended to the file within 15 seconds from request start, that content should be printed as well. This works with 1 execution of the code. Should yield same result if executed multiple times. Actual result: -------------- 1 run of the code works. Multiple executions however block on semop / epoll_wait. semop(4358158, 0x15470c, 1) = 0 <2.194313> epoll_wait(16, {{EPOLLIN, {u32=2156798632, u64=13801426109869204136}}}, 2, -1) = 1 <3.738842> As soon as the first execution of the code has ended, the second will run as expected and finish successfully (as long as max_execution_time is not reached). -- Edit bug report at http://bugs.php.net/?id=40933&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=40933&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=40933&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=40933&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=40933&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=40933&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=40933&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=40933&r=needscript Try newer version: http://bugs.php.net/fix.php?id=40933&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=40933&r=support Expected behavior: http://bugs.php.net/fix.php?id=40933&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=40933&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=40933&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=40933&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=40933&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=40933&r=dst IIS Stability: http://bugs.php.net/fix.php?id=40933&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=40933&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=40933&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=40933&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=40933&r=mysqlcfg