ID: 29681
Updated by: jorton@php.net
Reported By: tony at marston-home dot demon dot co dot uk
Status: Open
-Bug Type: Apache2 related
+Bug Type: Zend Engine 2 problem
Operating System: WindowsXP
PHP Version: 5.0.1
New Comment:
The original problem here, reproduced using the script bundle posted by
Tony, triggers crashes in free() when run with "MALLOC_CHECK_=3", using
5.0.4-dev. Backtrace below. Doesn't look like this is
Apache-related:
#5 0x0041baca in free () from /lib/tls/libc.so.6
No symbol table info available.
#6 0x010035b7 in _efree (ptr=0x86e443c) at
/net/jedi/local/php/5.0/Zend/zend_alloc.c:287
p = (zend_mem_header *) 0x4e0800
cache_index = 6
#7 0x0101f1fa in zend_hash_destroy (ht=0x86f1714)
at /net/jedi/local/php/5.0/Zend/zend_hash.c:526
p = (Bucket *) 0x0
q = (Bucket *) 0x86e47dc
#8 0x01029c7f in zend_objects_free_object_storage (object=0x872be84)
at /net/jedi/local/php/5.0/Zend/zend_objects.c:91
No locals.
#9 0x0102c24a in zend_objects_store_del_ref (zobject=0x0)
at /net/jedi/local/php/5.0/Zend/zend_objects_API.c:159
handle = 1
obj = (struct _store_object *) 0x86d9b88
#10 0x010170d0 in _zval_dtor (zvalue=0x86efb2c)
at /net/jedi/local/php/5.0/Zend/zend_variables.c:61
No locals.
#11 0x0100c491 in _zval_ptr_dtor (zval_ptr=0x10a995c)
at /net/jedi/local/php/5.0/Zend/zend_execute_API.c:392
No locals.
#12 0x0104b894 in zend_do_fcall_common_helper
(execute_data=0xbff34610,
opline=0x86ee780, op_array=0x86e306c)
at /net/jedi/local/php/5.0/Zend/zend_execute.c:2797
i = 141458196
p = (zval **) 0x86efb2c
arg_count = 17471360
original_return_value = (zval **) 0xbff346ac
current_scope = (zend_class_entry *) 0x0
current_this = (zval *) 0x0
return_value_used = 1
should_change_scope = 1 '\001'
#13 0x0104ba48 in zend_do_fcall_by_name_handler (execute_data=0x0,
opline=0x86ee780,
op_array=0x86e306c) at
/net/jedi/local/php/5.0/Zend/zend_execute.c:2825
No locals.
#14 0x01039b77 in execute (op_array=0x86e306c)
at /net/jedi/local/php/5.0/Zend/zend_execute.c:1400
execute_data = {opline = 0x86ee780, function_state = {
function_symbol_table = 0x870e404, function = 0x872a444, reserved =
{0x100f260,
0x86e3364, 0xbff36970, 0x0}}, fbc = 0x872a444, fbc_constructor =
0x0,
op_array = 0x86e306c, object = 0x86efb2c, Ts = 0xbff33430,
original_in_execution = 0 '\0', calling_scope = 0x86f0a54,
prev_execute_data = 0x0}
#15 0x01018b25 in zend_execute_scripts (type=8, retval=0x0,
file_count=3)
at /net/jedi/local/php/5.0/Zend/zend.c:1069
files = 0xbff34764 ""
i = 1
file_handle = (zend_file_handle *) 0xbff36970
orig_op_array = (zend_op_array *) 0x0
local_retval = (zval *) 0x0
Previous Comments:
------------------------------------------------------------------------
[2004-12-19 15:37:13] jason at amp-design dot net
I also get this error in one of my scripts. I have a feeling it is to
do with either Exceptions or overloading using SPL ArrayAccess (or a
combination of the two).
------------------------------------------------------------------------
[2004-12-08 20:16:54] akomasinski at gmail dot com
Same error in 5.0.2 + Apache 2.0.50 + MySQL 4.0.22
Windows XP SP1
------------------------------------------------------------------------
[2004-12-02 05:40:02] aristotle at brettia dot com
I had this same problem. My stats:
Windows XP SP2, AMD Athlon 64 (32-bit Windows, though)
PHP 5.0.1, Apache 2.0.50, MySQL 4.0.22
Apache Error Log Excerpts:
(Restarted Server)
[Wed Dec 01 21:14:56 2004] [notice] mod_python: Creating 32 session
mutexes based on 0 max processes and 250 max threads.
[Wed Dec 01 21:14:57 2004] [notice] Parent: Created child process 3960
[Wed Dec 01 21:14:57 2004] [notice] mod_python: Creating 32 session
mutexes based on 0 max processes and 250 max threads.
[Wed Dec 01 21:14:57 2004] [notice] Child 3960: Child process is
running
[Wed Dec 01 21:14:57 2004] [notice] Child 3960: Acquired the start
mutex.
[Wed Dec 01 21:14:57 2004] [notice] Child 2080: Released the start
mutex
[Wed Dec 01 21:14:57 2004] [notice] Child 3960: Starting 250 worker
threads.
[Wed Dec 01 21:14:58 2004] [notice] Child 2080: Waiting for 250 worker
threads to exit.
[Wed Dec 01 21:14:58 2004] [notice] Child 2080: All worker threads have
exited.
[Wed Dec 01 21:14:59 2004] [notice] Child 2080: Child process is
exiting
(This error happens upon running a script.)
[Wed Dec 01 21:15:04 2004] [notice] Parent: child process exited with
status 3221225477 -- Restarting.
[Wed Dec 01 21:15:04 2004] [notice] mod_python: Creating 32 session
mutexes based on 0 max processes and 250 max threads.
[Wed Dec 01 21:15:04 2004] [notice] Parent: Created child process 2280
[Wed Dec 01 21:15:04 2004] [notice] mod_python: Creating 32 session
mutexes based on 0 max processes and 250 max threads.
[Wed Dec 01 21:15:04 2004] [notice] Child 2280: Child process is
running
[Wed Dec 01 21:15:04 2004] [notice] Child 2280: Acquired the start
mutex.
[Wed Dec 01 21:15:04 2004] [notice] Child 2280: Starting 250 worker
threads.
[Wed Dec 01 21:19:35 2004] [notice] Parent: Received restart signal --
Restarting the server.
[Wed Dec 01 21:19:35 2004] [notice] Child 2280: Exit event signaled.
Child process is ending.
[Wed Dec 01 21:19:35 2004] [notice] Parent: Created child process 2088
[Wed Dec 01 21:19:36 2004] [notice] Child 2088: Child process is
running
[Wed Dec 01 21:19:36 2004] [notice] Child 2088: Acquired the start
mutex.
[Wed Dec 01 21:19:36 2004] [notice] Child 2280: Released the start
mutex
[Wed Dec 01 21:19:36 2004] [notice] Child 2088: Starting 250 worker
threads.
[Wed Dec 01 21:19:37 2004] [notice] Child 2280: Waiting for 250 worker
threads to exit.
[Wed Dec 01 21:19:41 2004] [notice] Child 2280: All worker threads have
exited.
[Wed Dec 01 21:19:41 2004] [notice] Child 2280: Child process is
exiting
(I don't know how much of this is useful, so I didn't prune much out.)
How Problem Was Fixed
1. Disabled mod_python (Worked once without error)
2. Enabled mod_python
3. Fixed code bug where I was attempting to __get() a non-existent key
from an array that was a property of an overloaded (I think) object.
The __get() function in question:
public function __get($key) {
if($this->isValid($key)) {
return $this->data_array[$key];
} else {
throw new ArrayStoreException('Variable with key [' . $key . ']
does not exist in the data array.',1);
return false;
}
}
And the isValid function which __get() calls:
public function isValid($key) {
if(array_key_exists($key,$this->data_array)) {
return true;
} else {
return false;
}
}
4. Reran the script, everything was fine.
------------------------------------------------------------------------
[2004-11-16 12:23:16] php_bug at cklowe dot com
This bug looks to be the same as bug 26286:
http://bugs.php.net/bug.php?id=26286
------------------------------------------------------------------------
[2004-10-21 19:20:21] tony at marston-home dot demon dot co dot uk
I have reinstated my sample code at
http://www.tonymarston.co.uk/error.zip
There are instructions inside on how to reproduce the error.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/29681
--
Edit this bug report at http://bugs.php.net/?id=29681&edit=1