#35650 [NEW]: Extending Exception class causes random failures when multi-threaded

From: Date: Mon, 12 Dec 2005 20:09:33 +0000
Subject: #35650 [NEW]: Extending Exception class causes random failures when multi-threaded
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-90304@lists.php.net to get a copy of this message
From: chris at lodesys dot com Operating system: Windows 2000 PHP version: 5.1.1 PHP Bug Type: Reproducible crash Bug description: Extending Exception class causes random failures when multi-threaded Description: ------------ When running 2 or more requests simultaneously on my 850 MHz laptop, including "class MyException extends Exception{}" to a simple Hello World script causes Apache to crash randomly. The setup is a stand alone 850 MHz laptop running Windows 2000, Apache/1.3.34, PHP/5.1.1, and Apache's JMeter. Apache is configured with ThreadsPerChild = 50 and PHP loaded as a module (LoadModule php5_module c:/php/php5apache.dll). Launching Apache's JMeter, I accessed the test script using single or multiple threads, no timing pauses, and enough loops to drive the CPU load to 100% (e.g., 1 thread/600 loops, 2 threads/300 loops, and 30 threads/20 loops). Reproduce code: --------------- <?php class MyException extends Exception { } print("Hello World\n"); ?> Expected result: ---------------- Script should run without problem when accessed using 1 or multiple threads. Actual result: -------------- Running single threaded access, there were no problems. When accessed using multiple threads, there were consistent random failures of Apache. For example, usually see around 7 crashes while running 600 requests with 30 threads. Dr. Watson reports them as Exception number: c0000005 (access violation) or occasionally Exception number: 000006a6 (). Removing "class MyException extends Exception{}" from the script eliminated the multi-thread crashing problem. All thread settings (1, 2 & 30) would run to completion without problems. -- Edit bug report at http://bugs.php.net/?id=35650&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=35650&r=trysnapshot44 Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=35650&r=trysnapshot51 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=35650&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=35650&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=35650&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=35650&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=35650&r=needscript Try newer version: http://bugs.php.net/fix.php?id=35650&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=35650&r=support Expected behavior: http://bugs.php.net/fix.php?id=35650&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=35650&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=35650&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=35650&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=35650&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=35650&r=dst IIS Stability: http://bugs.php.net/fix.php?id=35650&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=35650&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=35650&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=35650&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=35650&r=mysqlcfg

« previous php.bugs (#90304) next »