ID: 47640 Updated by: j...@php.net Reported By: manuel dot schmitt at manitu dot de -Status: Open +Status: Feedback Bug Type: Session related Operating System: Linux PHP Version: 5.2.9 New Comment:
Thank you for this bug report. To properly diagnose the problem, we need a short but complete example script to be able to reproduce this bug ourselves. A proper reproducing script starts with <?php and ends with ?>, is max. 10-20 lines long and does not require any external resources such as databases, etc. If the script requires a database to demonstrate the issue, please make sure it creates all necessary tables, stored procedures etc. Please avoid embedding huge scripts into the report. Previous Comments: ------------------------------------------------------------------------ [2009-03-13 10:06:52] manuel dot schmitt at manitu dot de Description: ------------ PHP internal session handler does not correctly closes flock()s on session files Reproduce code: --------------- (This bug seems the same issue as bug #32092) The problem happens on various PHP applications, no matter what they do exactly. Only one same thing: They are all using PHP sessions. In these cases Apache/PHP-processes hanging forever (until killed). I have strace'd the processed, they are hanging on flock()ing the session file as flock(FILE_ID, LOCK_EX, <unfinished>) where FILE_ID is a /tmp/sess_XXX-File (not on NFS, just local) [I have traced this from /proc/PROCID/fd/FILE_ID which links to the session file] I suppose that there was an php process flock()ing the file, perhaps running into max_execution_time, not unflocking the session file correctly and other processed wanting to write session data. Expected result: ---------------- PHP session handler should have some timeout and/or old file locks should be hard-broken. Actual result: -------------- Forever-Hanging php processes. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=47640&edit=1