Edit report at https://bugs.php.net/bug.php?id=55334&edit=1
ID: 55334
User updated by: bruno at chalopin dot fr
Reported by: bruno at chalopin dot fr
Summary: MySQLi make mod_php crash on stress test
Status: Open
Type: Bug
Package: MySQLi related
Operating System: Windows 2008r2 x64
PHP Version: 5.3.7RC4
Block user comment: N
Private report: N
New Comment:
More informations :
The test database :
-------------------
CREATE TABLE `test` (
`id` int(11) NOT NULL,
`data` text COLLATE latin1_general_ci,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
INSERT INTO `test`(`id`,`data`) VALUES (1,'foo'),(2,'bar'),(3,'gru');
Software version :
------------------
MySql 5.5.14 x86
Apache 2.2.19 x86 VC9 (from apachelounge)
Both have default conf file.
Previous Comments:
------------------------------------------------------------------------
[2011-08-01 09:16:40] bruno at chalopin dot fr
Description:
------------
mod_php crashes on stress test (ab -n 10000 -c 20) due to MySqli (the use of
the mysql extension don't make it crash)
Test script:
---------------
<h1>Test MySqli</h1>
<ul>
<?php
$con = mysqli_connect('127.0.0.1', 'root', 'secret', 'test');
$stmt = mysqli_query($con, 'SELECT * FROM test');
while($row = mysqli_fetch_array($stmt, MYSQLI_ASSOC))
{
echo '<li>' . $row['id'] . ' - ' . $row['data'] . '</li>';
}
?>
</ul>
Actual result:
--------------
Type of Analysis Performed Crash Analysis
Machine Name CHALOPIN-2008R2
Operating System Unexpected Service Pack 1
Number Of Processors 8
Process ID 3444
Process Image D:\SysperTec\webstack\Apache2\bin\httpd.exe
System Up-Time 01:19:31
Process Up-Time 00:00:01
Thread 16 - System ID 3560
Entry point msvcr90!_endthreadex+6f
Create time 01/08/2011 10:35:10
Time spent in user mode 0 Days 0:0:0.0
Time spent in kernel mode 0 Days 0:0:0.0
Function Arg 1 Arg 2 Arg 3 Source
php5ts!zend_register_internal_class_ex+b77 04ae90a0 6f21e664
016b02f0
php5ts!_efree+2e 016b02f0 0544ed20 6f223957
php5ts!_zval_ptr_dtor+54 0544f01c 0544ef50 0544f2b8
php5ts!zend_hash_destroy+27 0544dbe0 04a94b58 72451201
php5ts!zend_object_std_dtor+2b 0544f2b8 04a94b58 05442e4c
php_mysqli!php_clear_mysql+d1 0544f2b8 04a94b58 04a94b58
php5ts!zend_objects_store_del_ref_by_handle_ex+1c1 00000001 72465600
04a94b58
php5ts!zend_objects_store_del_ref+1a 0544e8b0 04a94b58 00000000
php5ts!_zval_dtor_func+7f 0544e8b0 0544dce0 6f223ad2
php5ts!_zval_ptr_dtor+4b 0544dcec 6f223d83 04a94b58
php5ts!zend_hash_clean+112 04a94b58 0262fa9c 0262fa8c
php5ts!zend_hash_reverse_apply+53 04ae7218 6f21deb0 04a94b58
php5ts!shutdown_destructors+77 04a94b58 04a94b58 0262fae0
php5ts!zend_call_destructors+42 04a94b58 04a94b58 00000000
php5ts!php_request_shutdown+f0 00000000 00000004 0156df20
php5apache2_2!zm_info_apache+1801 01d55f30 01d55f30 00cfb3e8
libhttpd!ap_run_handler+25 00000000 00000000 00000000
PHP5TS!ZEND_REGISTER_INTERNAL_CLASS_EX+B77In
httpd__PID__3444__Date__08_01_2011__Time_10_35_10AM__368__Second_Chance_Exception_C0000005.dmp
the assembly instruction at php5ts!zend_register_internal_class_ex+b77 in
d:\SysperTec\webstack\php\php5ts.dll from The PHP Group has caused an access
violation exception (0xC0000005) when trying to read from memory location
0x3c7edce0 on thread 16
Module Information
Image Name: d:\SysperTec\webstack\php\php5ts.dll Symbol Type: PDB
Base address: 0x6f190000 Time Stamp: Thu Jul 28 14:38:06 2011
Checksum: 0x005b1351 Comments:
COM DLL: False Company Name: The PHP Group
ISAPIExtension: False File Description: PHP Script Interpreter
ISAPIFilter: False File Version: 5.3.7RC4
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.7RC4
Symbol File Name: D:\SysperTec\webstack\php-debug\php5ts.pdb Special Build:
&
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=55334&edit=1