php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #10265 Apache dumps core during mysql_fetch_array
Submitted: 2001-04-10 12:53 UTC Modified: 2001-05-04 13:19 UTC
From: benedict at chemie dot de Assigned:
Status: Closed Package: Date/time related
PHP Version: 4.0.4pl1 OS: Linux 2.2.18
Private report: No CVE-ID: None
 [2001-04-10 12:53 UTC] benedict at chemie dot de
Apache 1.3.19 dumps core during mysql_fetch_array. The exact point
where this happens seems to be dependent on the number off string
concatenations during the while loop. This happens with mysql versions
3.23.22-beta, 3.23.32, 3.23.36.

configure-line:  ./configure --with-apache=/u/www/src/apache --with-config-file-path=/u/www/conf --without-gd --enable-track-vars --with-system-regex --with-mysql=/u/www/mysql

gdb backtrace:
www@zentrifuge:~/www.pressbot > gdb bin/httpd core
GNU gdb 4.18
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-suse-linux"...
Core was generated by `/u/www/www.pressbot/bin/httpd'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /lib/libpam.so.0...done.
Reading symbols from /lib/libdl.so.2...done.
Reading symbols from /u/www/mysql/lib/mysql/libmysqlclient.so.9...done.Reading symbols from /lib/libresolv.so.2...done.
Reading symbols from /lib/libm.so.6...done.
Reading symbols from /lib/libcrypt.so.1...done.
Reading symbols from /lib/libnsl.so.1...done.
Reading symbols from /usr/lib/libgdbm.so.2...done.
Reading symbols from /lib/libc.so.6...done.
Reading symbols from /lib/ld-linux.so.2...done.
Reading symbols from /usr/lib/libz.so.1...done.
Reading symbols from /lib/libnss_files.so.2...done.
Reading symbols from /usr/lib/gconv/ISO8859-1.so...done.
Reading symbols from /lib/libnss_dns.so.2...done.
#0  chunk_alloc (ar_ptr=0x4019c2c0, nb=112) at malloc.c:2814
2814    malloc.c: No such file or directory.
(gdb) where
#0  chunk_alloc (ar_ptr=0x4019c2c0, nb=112) at malloc.c:2814
#1  0x4011083c in malloc () at malloc.c:2181
#2  0x80e7d84 in _emalloc (size=90) at zend_alloc.c:158
#3  0x80f245e in concat_function (result=0xbfffd848, op1=0x822c3dc, op2#4  0x8115238 in execute (op_array=0x821d81c) at ./zend_execute.c:1029
#5  0x80f4f7b in zend_execute_scripts (type=8, file_count=3) at zend.c:#6  0x8091dcb in php_execute_script (primary_file=0xbffff198) at main.c#7  0x8101a4b in apache_php_module_main (r=0x8204e74, display_source_mo#8  0x808f375 in send_php ()
#9  0x808f3b6 in send_parsed_php ()
#10 0x8123079 in ap_invoke_handler ()
#11 0x81385ef in process_request_internal ()
#12 0x8138662 in ap_process_request ()
#13 0x812f266 in child_main ()
#14 0x812f4ea in make_child ()
#15 0x812f5a6 in startup_children ()
#16 0x812fc2c in standalone_main ()
#17 0x813045c in main ()
#18 0x400d7a8e in __libc_start_main () at ../sysdeps/generic/libc-start(gdb)   

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-05-04 12:17 UTC] benedict at chemie dot de
It took me some time to find out, that this actually
is a bug in date(). Try the following script and have
a look at the H:i:s part of the second date:

------------------------snip-----------
<html><body><pre><?
flush();if (empty($max)) { $max=1000; }
for ($i=0;$i<$max;$i++) {
    echo date("d.m.Y, H:i:s",time())." and now with r: ";
    echo date("r  \o\o\o\p\s>>>>>  H:i:s",time())."\n";
    flush();
}
?></pre></body></html>
------------------------snap------------

(the core dumps only occurred together with mysql,)
 [2001-05-04 13:19 UTC] sniper@php.net
This should be fixed in PHP 4.0.5.
Reopen if not.

--Jani

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 12 23:01:36 2024 UTC