Bug #72345 [NEW]: session_start() is not subject to max_execution_time

From: Date: Mon, 06 Jun 2016 15:54:53 +0000
Subject: Bug #72345 [NEW]: session_start() is not subject to max_execution_time
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-201481@lists.php.net to get a copy of this message
From: maggus dot staab at googlemail dot com Operating system: PHP version: Irrelevant Package: *General Issues Bug Type: Bug Bug description:session_start() is not subject to max_execution_time Description: ------------ time spent in session_start() is not subject to max_execution_time(). this can cause php to block all its worker processes by waiting for the session_lock, which finally leads to a no longer responding website. shouldn't a process error and exit after max_execution_time-seconds when it is not able to aquire the session lock while session_start()? running with php 5.4 (as this is the most recent version which ubuntu12lts provides) PHP 5.4.45-3+deb.sury.org~precise+1 (cli) (built: Jan 7 2016 15:32:17) Copyright (c) 1997-2014 The PHP Group Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies with Zend Debugger v6.0.0, Copyright (c) 1999-2013, by Zend Technologies with blackfire v1.10.6, https://blackfire.io, by Blackfireio Inc. Test script: --------------- <?php // run the script 2x concurrently set_time_limit(5); echo "acquire session lock:". time() ."\n"; session_start(); echo "got session lock:". time()."\n"; sleep(10); echo "finished:". time()."\n"; Expected result: ---------------- 1st instance should report >acquire session lock:1465227871 >got session lock:1465227871 >finished:1465227881 2nd instance should error after 5 seconds because session_start() is not able to aquire a session lock within 5 seconds Actual result: -------------- 1st instance reports >acquire session lock:1465227871 >got session lock:1465227871 // LOCK immediately acquired >finished:1465227881 2nd instance reports >acquire session lock:1465227872 >got session lock:1465227881 // LOCK acquired after 1st instance exit'ed >finished:1465227891 -- Edit bug report at https://bugs.php.net/bug.php?id=72345&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=72345&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=72345&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=72345&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=72345&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=72345&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=72345&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=72345&r=needscript Try newer version: https://bugs.php.net/fix.php?id=72345&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=72345&r=support Expected behavior: https://bugs.php.net/fix.php?id=72345&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=72345&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=72345&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=72345&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=72345&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=72345&r=dst IIS Stability: https://bugs.php.net/fix.php?id=72345&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=72345&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=72345&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=72345&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=72345&r=mysqlcfg

« previous php.bugs (#201481) next »