ID: 47640
User updated by: manuel dot schmitt at manitu dot de
Reported By: manuel dot schmitt at manitu dot de
Status: Bogus
Bug Type: Session related
Operating System: Linux
PHP Version: 5.2.9
New Comment:
ACK, but as server administrator there *must* be a way to prevent
this.
Admins do not have influence on the scripts that are used by
webmasters.
So I think it's a PHP thing. Likely one should automatically close all
sessions that were opened by scripts aborting / running into limits sets
by php (e.g. exec time) etc. This should solve it.
Previous Comments:
------------------------------------------------------------------------
[2009-05-02 18:42:02] jani@php.net
Endless loops tend to cause such problems. One should always use
http://www.php.net/session_write_close as early
as possible to prevent
race conditions and this kind of "bugs".
------------------------------------------------------------------------
[2009-03-17 06:32:36] manuel dot schmitt at manitu dot de
ARGH!
It is so simple!
<?php
session_start();
while (true) { $i *= 2; }
?>
Execute it for the first time and ensure, that it runs into any of the
php limits, e.g. maxmimum execution time.
Call the script a second time while not running into the limit. When
tracing the PHP process you will see an unlimited flock() syscall!
------------------------------------------------------------------------
[2009-03-16 23:46:42] jani@php.net
You need to come up with a script / set of scripts which can be used
to _reliably_ reproduce the issue.
------------------------------------------------------------------------
[2009-03-16 16:29:03] manuel dot schmitt at manitu dot de
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?
------------------------------------------------------------------------
[2009-03-16 16:25:10] jani@php.net
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.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/47640--
Edit this bug report at http://bugs.php.net/?id=47640&edit=1