php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #35650 Extending Exception class causes random failures when multi-threaded
Submitted: 2005-12-12 21:09 UTC Modified: 2005-12-12 23:33 UTC
From: chris at lodesys dot com Assigned:
Status: Closed Package: Reproducible crash
PHP Version: 5.1.1 OS: Windows 2000
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: chris at lodesys dot com
New email:
PHP Version: OS:

 

 [2005-12-12 21:09 UTC] chris at lodesys dot com
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.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-12-12 21:10 UTC] sniper@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5.1-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.1-win32-latest.zip


 [2005-12-12 23:33 UTC] chris at lodesys dot com
Good news!  The current CVS snapshot ran the test case (and my original scripts) without problems!  Looks like it's fixed in the CVS snapshot.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun Jul 27 14:00:03 2025 UTC