From:             nickk at att dot net
Operating system: Windows
PHP version:      4.3.10
PHP Bug Type:     Reproducible crash
Bug description:  Using concurrent sessions and processes causes Apache to lock 
up

Description:
------------
If you enable sessions on a page that runs any program execution command
and do two or more concurrent requests for the page, Apache immediately
stops responding and sits doing nothing (using 0% of the CPU) until you
close it.

I'm using a clean install of both Apache and PHP for windows; both are
using their default configurations. This was tested under Windows 2000 and
XP using Apache 1.3.33. The problem seems to be the same under Apache 2.x
as well.

There is a workaround for this problem, and that is to call
session_write_close before calling any program execution function.

Note: This seems to be a Windows specific problem. This was tested with a
*NIX copy of PHP and it worked just fine.

Reproduce code:
---------------
http://www.cs.rit.edu/~ndk4275/multi.php.txt

Expected result:
----------------
When the page loads, click on "Test". It will open two small windows and
will wait for 10 seconds before executing the actual test. It might seem
like the browser is not responding for the ten seconds before the test,
but this is due to the fact that the wait function is a greedy CPU
function. When the test starts, the two small browser windows will load
the test page with the program execution function at the same time and the
main window will reload the current page. At this point, Apache should stop
responding. Attempting to make any request to the server will result in an
indefinite wait.

Actual result:
--------------
After the test executes, Apache stops responding.

-- 
Edit bug report at http://bugs.php.net/?id=32027&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=32027&r=trysnapshot4
Try a CVS snapshot (php5.0): 
http://bugs.php.net/fix.php?id=32027&r=trysnapshot50
Try a CVS snapshot (php5.1): 
http://bugs.php.net/fix.php?id=32027&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=32027&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=32027&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=32027&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=32027&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=32027&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=32027&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=32027&r=notwrong
Not enough info:             
http://bugs.php.net/fix.php?id=32027&r=notenoughinfo
Submitted twice:             
http://bugs.php.net/fix.php?id=32027&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=32027&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=32027&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=32027&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=32027&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=32027&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=32027&r=float
No Zend Extensions:          http://bugs.php.net/fix.php?id=32027&r=nozend
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=32027&r=mysqlcfg

Reply via email to