|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2009-09-11 14:14 UTC] matroy at investpsp dot ca
Description: ------------ PHP crashes after running a script in command line for a while. The script is executing the same code in a loop and crashes randomly with a windows event entry like this one: ------------ Event Type: Error Event Source: Application Error Event Category: (100) Event ID: 1000 Date: 9/11/2009 Time: 9:41:31 AM User: N/A Computer: STSMTL02 Description: Faulting application php.exe, version 5.2.6.6, faulting module php5ts.dll, version 5.2.6.6, fault address 0x0000acca. For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp. Data: 0000: 41 70 70 6c 69 63 61 74 Applicat 0008: 69 6f 6e 20 46 61 69 6c ion Fail 0010: 75 72 65 20 20 70 68 70 ure php 0018: 2e 65 78 65 20 35 2e 32 .exe 5.2 0020: 2e 36 2e 36 20 69 6e 20 .6.6 in 0028: 70 68 70 35 74 73 2e 64 php5ts.d 0030: 6c 6c 20 35 2e 32 2e 36 ll 5.2.6 0038: 2e 36 20 61 74 20 6f 66 .6 at of 0040: 66 73 65 74 20 30 30 30 fset 000 0048: 30 61 63 63 61 0acca -------------------------------------------- Here is the crash analysis --------------------------- Type of Analysis Performed Crash Analysis Machine Name STSMTL02 Operating System Windows Server 2003 Service Pack 2 Number Of Processors 1 Process ID 4880 Process Image c:\Soft\PHP5\php.exe System Up-Time 19 day(s) 12:24:24 Process Up-Time 00:02:25 Thread 0 - System ID 4228 Entry point php!mainCRTStartup Create time 9/11/2009 9:44:50 AM Time spent in user mode 0 Days 0:0:1.312 Time spent in kernel mode 0 Days 0:0:8.593 Function Arg 1 Arg 2 Arg 3 Source php5ts!_zend_mm_free_int+1fd 002250f0 00000040 1009b3d9 php5ts!_efree+39 05b8b3f8 00c0fd78 05ce6b38 php5ts!zend_hash_destroy+59 05b76dc0 05ce6b38 100ab410 php5ts!zend_object_std_dtor+2b 05ce6b38 00223b68 00223b68 php5ts!zend_objects_free_object_storage+10 05ce6b38 00223b68 022d9bd8 php5ts!zend_objects_store_del_ref_by_handle+140 00000336 00223b68 0244ced8 php5ts!zend_objects_store_del_ref+19 0244ced8 00223b68 00000000 php5ts!_zval_dtor_func+77 0244ced8 01a82888 00223b68 php5ts!ZEND_ASSIGN_DIM_SPEC_VAR_CV_HANDLER+1355 00c0f5e8 00223b68 05d8e864 php5ts!execute+1c5 0234c088 00223b68 00223b68 php5ts!zend_do_fcall_common_helper_SPEC+8ca 00c0f690 00223b01 1001c635 php5ts!ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER+15 00c0f690 00223b68 05addb14 php5ts!execute+1c5 0234a1a0 00223b68 00223b68 php5ts!zend_do_fcall_common_helper_SPEC+8ca 00c0f738 00223b01 1001c635 php5ts!ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER+15 00c0f738 00223b68 05b8ec34 php5ts!execute+1c5 0234a0c8 00223b68 00223b68 php5ts!zend_do_fcall_common_helper_SPEC+8ca 00c0f7e0 00223b01 1001c635 php5ts!ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER+15 00c0f7e0 00223b68 08112234 php5ts!execute+1c5 023220a0 00223b68 00223b68 php5ts!zend_do_fcall_common_helper_SPEC+8ca 00c0f888 00223b01 1001c635 php5ts!ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER+15 00c0f888 00223b68 05bf6054 php5ts!execute+1c5 02320250 00223b68 00223b68 php5ts!zend_do_fcall_common_helper_SPEC+8ca 00c0f930 00223b01 1001c635 php5ts!ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER+15 00c0f930 00223b68 05a4a5c4 php5ts!execute+1c5 0232aa48 00223b68 00223b68 php5ts!zend_do_fcall_common_helper_SPEC+8ca 00c0f9d8 00223b01 1001c635 php5ts!ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER+15 00c0f9d8 00223b68 05a5e6a4 php5ts!execute+1c5 0232d518 00223b68 00223b68 php5ts!zend_do_fcall_common_helper_SPEC+8ca 00c0fa80 00223b01 1001c635 php5ts!ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER+15 00c0fa80 00223b68 01a15514 php5ts!execute+1c5 0232d690 00223b68 00223b68 php5ts!zend_do_fcall_common_helper_SPEC+8ca 00c0fb28 00223b01 1001c635 php5ts!ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER+15 00c0fb28 00223b68 00c0fc2c php5ts!execute+1c5 01a0fa58 00223b68 00000000 php5ts!zend_do_fcall_common_helper_SPEC+8ca 00c0fbd0 00223b01 1001c635 php5ts!ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER+15 00c0fbd0 00223b68 00223b68 php5ts!execute+1c5 01a0bd10 00223b68 00000000 php5ts!zend_execute_scripts+107 00000008 00223b68 00000000 php5ts!php_execute_script+20d 00c0fec8 00223b68 00000000 php!main+bca 00000003 00223af8 00222a38 php!mainCRTStartup+e3 00000000 00000000 7ffd6000 kernel32!BaseProcessStart+23 00402f72 00000000 00000000 PHP5TS!_ZEND_MM_FREE_INT+1FDIn php__PID__4880__Date__09_11_2009__Time_09_47_15AM__243__Second_Chance_Exception_C0000005.dmp the assembly instruction at php5ts!_zend_mm_free_int+1fd in c:\Soft\PHP5\php5ts.dll from The PHP Group has caused an access violation exception (0xC0000005) when trying to read from memory location 0x00000000 on thread 0 Module Information Image Name: c:\Soft\PHP5\php5ts.dll Symbol Type: PDB Base address: 0x10000000 Time Stamp: Wed Jun 17 11:16:31 2009 Checksum: 0x00000000 Comments: COM DLL: False Company Name: The PHP Group ISAPIExtension: False File Description: PHP Script Interpreter ISAPIFilter: False File Version: 5.2.10.10 Managed DLL: False Internal Name: php5ts.dll VB DLL: False Legal Copyright: Copyright ? 1997-2007 The PHP Group Loaded Image Name: php5ts.dll Legal Trademarks: PHP Mapped Image Name: c:\Soft\PHP5\php5ts.dll Original filename: php5ts.dll Module name: php5ts Private Build: Single Threaded: False Product Name: PHP Script Interpreter Module Size: 4.98 MBytes Product Version: 5.2.10 Symbol File Name: C:\Soft\PHP5DBG\php5ts.pdb Special Build: & PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 08:00:01 2025 UTC |
It looks like httpd crashes after this error msg in the event viewer. PHP Fatal error: Maximum execution time of 30 seconds exceeded in C:\ftproot\LocalUser\linkmarket\framework\common\php\session.class.php on line 71. That is public function write($id, $data) from the code below: <?php class Session { /** * a database connection resource * @var resource */ private $_sess_db; /** * Open the session * @return bool */ public function open() { if ($this->_sess_db = mysql_connect('server:port', 'user', 'pw')) { return mysql_select_db('db', $this->_sess_db); } return false; } /** * Close the session * @return bool */ public function close() { if(is_resource($this->_sess_db)) { return mysql_close($this->_sess_db); } return false; } /** * Read the session * @param int session id * @return string string of the sessoin */ public function read($id) { $id = mysql_real_escape_string($id); $sql = sprintf("SELECT data FROM sessions WHERE id = '%s'", $id); if ($result = mysql_query($sql, $this->_sess_db)) { if (mysql_num_rows($result)) { $record = mysql_fetch_assoc($result); //free mysql result mysql_free_result($result); return $record['data']; } } return ''; } /** * Write the session * @param int session id * @param string data of the session */ public function write($id, $data) { $sql = sprintf("REPLACE INTO sessions (id,data,timestamp,ip,url) VALUES('%s', '%s', '%s','%s','%s')", mysql_real_escape_string($id), mysql_real_escape_string($data), mysql_real_escape_string(time()), mysql_real_escape_string($_SERVER['REMOTE_ADDR']), mysql_real_escape_string("http://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'])); return mysql_query($sql, $this->_sess_db); } /** * Destoroy the session * @param int session id * @return bool */ public function destroy($id) { $sql = sprintf("DELETE FROM sessions WHERE id = '%s'", $id); return mysql_query($sql, $this->_sess_db); } /** * Garbage Collector * @param int life time (sec.) * @return bool * @see session.gc_divisor 100 * @see session.gc_maxlifetime 1440 * @see session.gc_probability 1 * @usage execution rate 1/100 * (session.gc_probability/session.gc_divisor) */ public function gc($max) { $sql = sprintf("DELETE FROM sessions WHERE timestamp < '%s'", mysql_real_escape_string(time() - $max)); return mysql_query($sql, $this->_sess_db); } } //ini_set('session.gc_probability', 50); ini_set('session.save_handler', 'user'); $session = new Session(); session_set_save_handler(array($session, 'open'), array($session, 'close'), array($session, 'read'), array($session, 'write'), array($session, 'destroy'), array($session, 'gc')); ?>