php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #60556 php5ts.dll crash when reaching over 1000 requests.
Submitted: 2011-12-19 02:29 UTC Modified: 2013-02-18 00:35 UTC
Votes:7
Avg. Score:3.6 ± 1.8
Reproduced:4 of 6 (66.7%)
Same Version:4 (100.0%)
Same OS:3 (75.0%)
From: missiontcomputers at hotmail dot com Assigned:
Status: No Feedback Package: Built-in web server
PHP Version: 5.3.8 OS: Windows 7 32bit / SP1
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: missiontcomputers at hotmail dot com
New email:
PHP Version: OS:

 

 [2011-12-19 02:29 UTC] missiontcomputers at hotmail dot com
Description:
------------
Crash when reaching over 1000 requests. This has been causing me for nearly 2 
years now. 


Thread 4 - System ID 3472
Entry point   msvcr90!_endthreadex+6f 
Create time   19/12/2011 02:07:51 
Time spent in user mode   0 Days 0:0:7.20 
Time spent in kernel mode   0 Days 0:0:5.756 

Function     Arg 1     Arg 2     Arg 3   Source 
php5ts!zend_register_internal_class_ex+b87     03bfab78     63f0eb94     
01b63b78    
php5ts!_efree+2e     01b63b78     05c50a20     63f13e97    
php5ts!_zval_ptr_dtor+54     05c509ec     05c509c8     044fe9c0    
php5ts!zend_hash_destroy+27     05bc48b0     03bcfa68     72ba1201    
php5ts!zend_object_std_dtor+2b     044fe9c0     03bcfa68     000000e0    
php_mysqli!php_clear_mysql+d1     044fe9c0     03bcfa68     00000000    
php5ts!zend_objects_store_free_object_storage+9c     03c0d2a4     03bcfa68     
71113b4e    
php5ts!shutdown_executor+2fe     03bcfa68     03bcfa68     63e8cc2e    
php5ts!zend_deactivate+91     03bcfa68     03bcfa68     00000000    
php5ts!php_request_shutdown+31f     00000000     00000006     00b398a0    
php5apache2_2!zm_info_apache+1801     0370abd8     0370abd8     00000000    
libhttpd!ap_run_handler+28     0370abd8     0370abd8     0370abd8    
libhttpd!ap_invoke_handler+be     00976ae8     00b849f8     01f5fefc    
libhttpd!ap_die+28e     0370abd8     00000000     00b39c30    
libhttpd!ap_psignature+13d2     00b849f8     00b849f8     00b849f8    
libhttpd!ap_run_process_connection+28     00b849f8     009808a8     01f5ff44    
libhttpd!ap_process_connection+33     00b849f8     00b848a0     00000000    
libhttpd!ap_regkey_value_remove+e3e     00b849f0     498c7afb     00000000    
msvcr90!_endthreadex+44     00000000     01f5ff94     7525ed6c    
msvcr90!_endthreadex+d8     01c3cb08     01f5ffd4     770937f5    
kernel32!BaseThreadInitThunk+e     01c3cb08     614562c5     00000000    
ntdll!__RtlUserThreadStart+70     710d345e     01c3cb08     00000000    
ntdll!_RtlUserThreadStart+1b     710d345e     01c3cb08     00000000    




PHP5TS!ZEND_REGISTER_INTERNAL_CLASS_EX+B87In 
httpd__PID__7580__Date__12_19_2011__Time_02_18_45AM__736__Second_Chance_Exceptio
n_C0000005.dmp the assembly instruction at 
php5ts!zend_register_internal_class_ex+b87 in 
C:\WampDeveloper\Components\Php\php5ts.dll from The PHP Group has caused an 
access violation exception (0xC0000005) when trying to read from memory location 
0x49de7bf0 on thread 4

Module Information 
Image Name: C:\WampDeveloper\Components\Php\php5ts.dll   Symbol Type:  PDB 
Base address: 0x63e80000   Time Stamp:  Tue Aug 23 10:59:32 2011  
Checksum: 0x005b0c63   Comments:   
COM DLL: False   Company Name:  The PHP Group 
ISAPIExtension: False   File Description:  PHP Script Interpreter 
ISAPIFilter: False   File Version:  5.3.8 
Managed DLL: False   Internal Name:  PHP Script Interpreter 
VB DLL: False   Legal Copyright:  Copyright © 1997-2010 The PHP Group 
Loaded Image Name:  php5ts.dll   Legal Trademarks:  PHP 
Mapped Image Name:     Original filename:  php5ts.dll 
Module name:  php5ts   Private Build:   
Single Threaded:  False   Product Name:  PHP 
Module Size:  5.76 MBytes   Product Version:  5.3.8 
Symbol File Name:  C:\php-debug-pack-5.3.8-Win32-VC9-x86\php5ts.pdb   Special 
Build:  & 



Test script:
---------------
None available sorry.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-08-14 17:15 UTC] kilbyc at bellsouth dot net
I have this same problem with 
Win 7 Enterprise x86_64 
(Yes, I know I have a x64 OS, but I am required to test against x86 for compatibilities sake)
Tested and fails on both:
Apache 2.2.17 VC9 PHP 5.3.8 VC9 WIN32 
Apache 2.2.22 VC9 PHP 5.3.15 VC9 WIN32

Jmeter test case: 1000 threads, 0 sec ramp, 5 page views spaced 10 sec apart for each thread. 

Apache conf: php as apache2_2 mod, mpm_winnt:800 threads, no extra mods.

PHP is allotted 512M in PHP ini. Only exts from the PHP distro are enabled.
No cache enabled (I disabled xcache it because I though it was causing the problem) 
Debug backtrace gives me:
Function   Source 
ntdll!NtTerminateProcess+12    
ntdll!RtlExitUserProcess+41    
kernel32!ExitProcessStub+12    
msvcr90!__crtExitProcess+17    
msvcr90!_cinit+154    
msvcr90!exit+11    
php5ts!zend_mm_startup_ex+94   c:\php-sdk\snap_5_3\vc9\x86\php-5.3.15\zend\zend_alloc.c @ 1068 + b 
php5ts!zend_mm_startup+1cc   c:\php-sdk\snap_5_3\vc9\x86\php-5.3.15\zend\zend_alloc.c @ 1194 + 10 
php5ts!alloc_globals_ctor+6   c:\php-sdk\snap_5_3\vc9\x86\php-5.3.15\zend\zend_alloc.c @ 2568 + 5 
php5ts!allocate_new_resource+ab   c:\php-sdk\snap_5_3\vc9\x86\php-5.3.15\tsrm\tsrm.c @ 294 + b 
php5ts!ts_resource_ex+bd   c:\php-sdk\snap_5_3\vc9\x86\php-5.3.15\tsrm\tsrm.c @ 362 
php5apache2_2!php_handler+1f   c:\php-sdk\snap_5_3\vc9\x86\php-5.3.15\sapi\apache2handler\sapi_apache2.c @ 550 
libhttpd!ap_run_handler+25    
libhttpd!ap_invoke_handler+a2    
libhttpd!ap_die+26e    
libhttpd!ap_psignature+15b2    
libhttpd!ap_run_process_connection+25    
libhttpd!ap_process_connection+33    
libhttpd!ap_regkey_value_remove+fe7    
msvcr100!_endthreadex+3f    
msvcr100!_endthreadex+ce    
kernel32!BaseThreadInitThunk+e    
ntdll!__RtlUserThreadStart+70    
ntdll!_RtlUserThreadStart+1b    

Debugger analysis is:
Detected possible blocking or leaked critical section at 0x030d1be8 owned by thread 248 in httpd__PID__14780__Date__08_14_2012__Time_12_50_00PM__485__Thread Exit.dmp
Impact of this lock
5.43% of threads blocked
(Threads 150 154 158 170 174 198 202 206 210 214 218 220 222 226 228 230 234 236 238 242 246 247 250 252 254 256 258 260 262 266 274 276 280 282 288 292 322 330 334 338 374 378 432 809)
The following functions are trying to enter this critical section
php5ts!ts_resource_ex+48

The following module(s) are involved with this critical section
C:\wamp\bin\apache\Apache2.2.22\bin\php5ts.dll from The PHP Group

It appears that phpts grinds to death when attempting to assign new memory fast enough to deal with a flood.
 [2012-08-14 17:19 UTC] kilbyc at bellsouth dot net
It doesnt really bother me that PHP is dying, the thing that is killing me is that when one thread dies with 255, Apache picks up and restarts the whole child process. I end up with a log file full of thread exited with 255, server restarting.
 [2012-08-15 11:09 UTC] pajoye@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.


 [2012-08-15 11:09 UTC] pajoye@php.net
-Status: Open +Status: Feedback
 [2012-08-15 20:14 UTC] kilbyc at bellsouth dot net
This is the simplest test case I could manage. In my production environment, the SoapClient doesn't always throw an error.
<?php 
try { 
    $x = new SoapClient("non-existent.wsdl",array("exceptions" => 1)); 
} catch (SoapFault $E) { 
    echo $E->faultstring;
}  
	$doc = new DOMDocument();
    $doc->loadHTML("<html><body>Test<br></body></html>");
    echo $doc->saveHTML();
	//require "require.php";
	gzcompress(serialize(var_export("<html><body>Test<br></body></html>", true)),6);
	$restart = time()+5;
?>
As reported, I am using ext that are provided with PHP. php.ini, httpd.conf or a zip of the entire problem environment is available upon request.
 [2012-08-15 21:05 UTC] kilbyc at bellsouth dot net
Came up with a simpler test case
Index.php
<?php
exit();
?>

Using the same test parameters in my earlier comment.
 [2012-11-08 08:53 UTC] Q9L_ at HOTMAIL dot COM
تم الاختراق من قبل دكتور سعودي511 Hacked by Dr.KsA511تم الاختراق من قبل دكتور سعودي511 Hacked by Dr.KsA511تم الاختراق من قبل دكتور سعودي511 Hacked by Dr.KsA511تم الاختراق من قبل دكتور سعودي511 Hacked by Dr.KsA511تم الاختراق من قبل دكتور سعودي511 Hacked by Dr.KsA511تم الاختراق من قبل دكتور سعودي511 Hacked by Dr.KsA511تم الاختراق من قبل دكتور سعودي511 Hacked by Dr.KsA511تم الاختراق من قبل دكتور سعودي511 Hacked by Dr.KsA511تم الاختراق من قبل دكتور سعودي511 Hacked by Dr.KsA511تم الاختراق من قبل دكتور سعودي511 Hacked by Dr.KsA511تم الاختراق من قبل دكتور سعودي511 Hacked by Dr.KsA511تم الاختراق من قبل دكتور سعودي511 Hacked by Dr.KsA511تم الاختراق من قبل دكتور سعودي511 Hacked by Dr.KsA511تم الاختراق من قبل دكتور سعودي511 Hacked by Dr.KsA511تم الاختراق من قبل دكتور سعودي511 Hacked by Dr.KsA511تم الاختراق من قبل دكتور سعودي511 Hacked by Dr.KsA511تم الاختراق من قبل دكتور سعودي511 Hacked by Dr.KsA511تم الاختراق من قبل دكتور سعودي511 Hacked by Dr.KsA511تم الاختراق من قبل دكتور سعودي511 Hacked by Dr.KsA511تم الاختراق من قبل دكتور سعودي511 Hacked by Dr.KsA511تم الاختراق من قبل دكتور سعودي511 Hacked by Dr.KsA511تم الاختراق من قبل دكتور سعودي511 Hacked by Dr.KsA511تم الاختراق من قبل دكتور سعودي511 Hacked by Dr.KsA511تم الاختراق من قبل دكتور سعودي511 Hacked by Dr.KsA511تم الاختراق من قبل دكتور سعودي511 Hacked by Dr.KsA511تم الاختراق من قبل دكتور سعودي511 Hacked by Dr.KsA511
 [2012-11-08 08:59 UTC] R at OTMAIL dot COM
تم الاختراق من قبل ملكع هكر ..BY:MLK3 HACKER F-16 اهنيكم ع حماية ههههههههه 
................ لعيون : ابو شنب هكر . ابو لميس . جمره هكر . شيطونه هكر . كوبرا هكر.
 [2013-02-18 00:35 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 08:01:28 2024 UTC