ID: 24557
User updated by: wmeler at wp-sa dot pl
Reported By: wmeler at wp-sa dot pl
-Status: Feedback
+Status: Open
Bug Type: Network related
Operating System: RH 7.3
PHP Version: 4CVS-2003-07-09 (stable)
New Comment:
PHP is taken from snaps.php.net : php4-STABLE-200307081130
'./configure' \
'--with-thttpd=../thttpd' \
'--enable-experimental-zts' \
'--with-tsrm-pthreads' \
'--with-regex=system' \
'--with-mysql=/usr' \
'--with-oci8=/opt/oracle' \
'--with-ldap=/opt/iplanet' \
'--with-mhash' \
'--enable-ftp' \
'--with-zlib' \
'--with-gdbm' \
'--with-gettext' \
'--with-xml' \
'--enable-debug' \
"$@"
I've patched thttpd and PHP so it worked fine together in ZTS. I
haven't touched streams. It worked until streams were introduced
(4.3?).
BTW are memory and fds freed if there is no msg in log like
"stream_free ...."
I think I won't be able to write short script which reproduct this
error because it isn't on each request :(.
Previous Comments:
------------------------------------------------------------------------
[2003-07-09 04:39:52] [EMAIL PROTECTED]
Thanks for the detailed trace;
A short self-contained reproducing script would help a great deal here
also.
Also, it seems that you are running a thread-safe build; could you let
us know the configure line you used, and also the version of PHP (are
you really using the PHP_4_3 branch of cvs?).
------------------------------------------------------------------------
[2003-07-09 04:26:51] wmeler at wp-sa dot pl
after turning on STREAMS_DEBUG I've got better core:
#0 0x08088603 in _php_stream_free (stream=0x45c22290,
close_options=11, tsrm_ls=0x8523d68)
at /home/wmeler/rpm/BUILD/aris-1.6/php/main/streams.c:294
#1 0x0808b12f in stream_resource_regular_dtor (rsrc=0x46c50910,
tsrm_ls=0x8523d68)
at /home/wmeler/rpm/BUILD/aris-1.6/php/main/streams.c:2291
#2 0x080ad2e2 in list_entry_destructor (ptr=0x46c50910) at
/home/wmeler/rpm/BUILD/aris-1.6/php/Zend/zend_list.c:177
#3 0x080ab8e0 in zend_hash_del_key_or_index (ht=0x8862ccc, arKey=0x0,
nKeyLength=0, h=5, flag=1)
at /home/wmeler/rpm/BUILD/aris-1.6/php/Zend/zend_hash.c:514
#4 0x080ad0a4 in _zend_list_delete (id=5, tsrm_ls=0x8523d68)
at /home/wmeler/rpm/BUILD/aris-1.6/php/Zend/zend_list.c:56
#5 0x080a5ac2 in _zval_dtor (zvalue=0x46c502d8,
__zend_filename=0x8199080
"/home/wmeler/rpm/BUILD/aris-1.6/php/Zend/zend_execute_API.c",
__zend_lineno=291)
at /home/wmeler/rpm/BUILD/aris-1.6/php/Zend/zend_variables.c:69
#6 0x0809e27e in _zval_ptr_dtor (zval_ptr=0x45c01010,
__zend_filename=0x8195c60
"/home/wmeler/rpm/BUILD/aris-1.6/php/Zend/zend_execute.h",
__zend_lineno=96)
at /home/wmeler/rpm/BUILD/aris-1.6/php/Zend/zend_execute_API.c:291
#7 0x080bbcbd in execute (op_array=0x429d5ee0, tsrm_ls=0x8523d68)
at /home/wmeler/rpm/BUILD/aris-1.6/php/Zend/zend_execute.h:96
The function called from PHP userspace was fclose.
I also found in log 1069 msg looks like:
stream_alloc: socket:0x43d64f08 persistent=(null)
and only 48 msg pairs like:
stream_free: socket:0x4849caf8[(null)] in_free=0 opts=00000003
stream_free: socket:0x4849caf8[(null)] preserve_handle=0 release_cast=1
remove_rsrc=1
I also got about 40 core dumps.
If you want more information please describe what kind of information
you want.
------------------------------------------------------------------------
[2003-07-09 03:32:34] [EMAIL PROTECTED]
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php
If you can provide more information, feel free to add it
to this bug and change the status back to "Open".
Thank you for your interest in PHP.
------------------------------------------------------------------------
[2003-07-09 03:12:09] wmeler at wp-sa dot pl
Description:
------------
My application uses fsockopen. Since streams has been introduced I
notice SIG_SEGVs. As you can see below stack is corrupted and stream
memory is freed (if it is really it's memory)
(gdb) bt full
#0 _php_stream_flush (stream=Error accessing memory address
0xb71fd09c: No such process.
) at /home/wmeler/rpm/BUILD/aris-1.6/php/main/streams.c:875
stream = (php_stream *) 0x4a9ce250
tsrm_ls = (void ***) 0x8779ef0
ret = 0
Error accessing memory address 0xb71fd094: No such process.
(gdb) print *(php_stream *) 0x4a9ce250
$1 = {ops = 0x4652c678, abstract = 0x1, filterhead = 0x10003,
filtertail = 0x2a8fcc84,
wrapper = 0x5a5a5a5a, wrapperthis = 0x3d, wrapperdata = 0x4e6a3ec0,
fgetss_state = 135898848, is_persistent = 110,
mode = "\001", '\000' <repeats 11 times>, ": \a", rsrc_id =
1251795496, in_free = 1,
fclose_stdiocast = 2, stdiocast = 0xcc840030, __exposed = 1515858575,
__orig_path = 0x5a5a5a5a <Error reading address 0x5a5a5a5a: No such
process>,
context = 0x31, flags = 1279301096, position = 1185939604,
readbuf = 0x5a5a5a5a <Error reading address 0x5a5a5a5a: No such
process>,
readbuflen = 1515870810, readpos = 1515870810, writepos = 1515870810,
chunk_size = 1515870810, eof = 1515870810}
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=24557&edit=1