ID: 47640 User updated by: manuel dot schmitt at manitu dot de Reported By: manuel dot schmitt at manitu dot de -Status: Feedback +Status: Open Bug Type: Session related Operating System: Linux PHP Version: 5.2.9 New Comment:
But how should I trace this anymore? I can strace apache/php processes seeing that there is a PHP script doing flock() on a file, the process never returns. What should I do? Previous Comments: ------------------------------------------------------------------------ [2009-03-16 16:25:10] [email protected] I'm actually running also s9y installation in the high traffic server. Never had any hanging PHP processes. And many times scripts have run to limits due to database being too slow. Still, no hangups with sessions. As this is quite impossible to reproduce, please try and figure out what really causes it. I know it's hard but otherwise we can keep on guessing and that's pretty useless. ------------------------------------------------------------------------ [2009-03-16 08:07:22] manuel dot schmitt at manitu dot de E.g. any S9Y installation does reproduce this. I cannot post this here because it has lots of files. BUT as I told you I said what I suppose. I suppose that scripts running into any php limit (e.g. execution time) do not properly close the session files. It does NOT happen when scripts are correctly finished! ------------------------------------------------------------------------ [2009-03-15 12:19:31] [email protected] Please provide script(s) that reliably can be used to reproduce this. I can not reproduce this anywhere (even high traffic sites using sessions). Just saying something happens does not make it true.. ------------------------------------------------------------------------ [2009-03-15 11:24:15] manuel dot schmitt at manitu dot de The most simple script at all <?php session_start(); ?> can cause the problem, please take my notes I posted before into attention. ------------------------------------------------------------------------ [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
