php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57729 crash in module shutdown of http_presistent_handle API
Submitted: 2007-07-03 05:36 UTC Modified: 2007-09-18 07:13 UTC
From: rlangner at mch dot osram dot de Assigned: mike (profile)
Status: No Feedback Package: pecl_http (PECL)
PHP Version: 5.1.2 OS: Suse 10.1 x86_64
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2007-07-03 05:36 UTC] rlangner at mch dot osram dot de
Description:
------------
It is not a code problem. Code works fine.
If http.so is in use then (and only then) my apache2 server is crashing
daily at the same time (17.15). Must be a garbage collection problem. With http.so in use the same error can be produced with bash-command: pear5 list

# pear5 list
Installed packages, channel pear.php.net:
=========================================
Package        Version State
Archive_Tar    1.3.1   stable
Console_Getopt 1.2     stable
Fileinfo       1.0.4   stable
PEAR           1.4.6   stable
*** glibc detected *** /usr/bin/php5: free(): invalid pointer: 0x0000000000996b48 ***
======= Backtrace: =========
/lib64/libc.so.6[0x2b3146a3c37e]
/lib64/libc.so.6(__libc_free+0x6c)[0x2b3146a3d99c]
/usr/bin/php5(zend_hash_destroy+0x79)[0x54c4b9]
/usr/lib64/php5/extensions/http.so[0x2b3148fd7eef]
/usr/bin/php5(zend_hash_destroy+0x38)[0x54c478]
/usr/lib64/php5/extensions/http.so(zm_shutdown_http_persistent_handle+0x10)[0x2b3148fd7b20]
/usr/lib64/php5/extensions/http.so(zm_shutdown_http+0x49)[0x2b3148fab019]
/usr/bin/php5(module_destructor+0x28)[0x546858]
/usr/bin/php5[0x54c18a]
/usr/bin/php5(zend_hash_graceful_reverse_destroy+0x18)[0x54c3d8]
/usr/bin/php5(zend_shutdown+0x20)[0x542f00]
/usr/bin/php5(php_module_shutdown+0x2a)[0x503d6a]
/usr/bin/php5(main+0x327)[0x5c0497]
/lib64/libc.so.6(__libc_start_main+0xf4)[0x2b31469ee154]
/usr/bin/php5[0x42c7d9]


and this is from the apache error log:

[Mon Jul 02 17:15:38 2007] [notice] Graceful restart requested, doing restart
*** glibc detected *** /usr/sbin/httpd2-prefork: free(): invalid pointer: 0x0000555555a71158 ***
======= Backtrace: =========
/lib64/libc.so.6[0x2b721f26737e]
/lib64/libc.so.6(__libc_free+0x6c)[0x2b721f26899c]
/usr/lib64/apache2/mod_php5.so(zend_hash_destroy+0x79)[0x2b722120bee9]
/usr/lib64/php5/extensions/http.so[0x2b72245d9e6f]
/usr/lib64/apache2/mod_php5.so(zend_hash_destroy+0x38)[0x2b722120bea8]
/usr/lib64/php5/extensions/http.so(zm_shutdown_http_persistent_handle+0x10)[0x2b72245d9aa0]
/usr/lib64/php5/extensions/http.so(zm_shutdown_http+0x49)[0x2b72245ad079]
/usr/lib64/apache2/mod_php5.so(module_destructor+0x28)[0x2b7221206288]
/usr/lib64/apache2/mod_php5.so[0x2b722120bbba]
/usr/lib64/apache2/mod_php5.so(zend_hash_graceful_reverse_destroy+0x18)[0x2b722120be08]
/usr/lib64/apache2/mod_php5.so(zend_shutdown+0x20)[0x2b7221202930]
/usr/lib64/apache2/mod_php5.so(php_module_shutdown+0x2a)[0x2b72211c391a]
/usr/lib64/apache2/mod_php5.so(php_module_shutdown_wrapper+0x9)[0x2b72211c39b9]
/usr/lib64/apache2/mod_php5.so[0x2b7221280501]
/usr/lib64/libapr-1.so.0[0x2b721ec8c6ed]
/usr/lib64/libapr-1.so.0(apr_pool_clear+0x2d)[0x2b721ec8cebd]
/usr/sbin/httpd2-prefork(main+0x65d)[0x555555579b6d]
"


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-07-03 12:12 UTC] mike@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.

I'd need a better backtrace, preferrably with a debug build?

Thank you.
 [2007-07-04 10:32 UTC] rlangner at mch dot osram dot de
Here is a better backtrace:

# gdb /usr/bin/php5
GNU gdb 6.4
Copyright 2005 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 "x86_64-suse-linux"...(no debugging symbols found)
Using host libthread_db library "/lib64/libthread_db.so.1".

(gdb) set args -C -q "-d include_path=/usr/share/php5/PEAR" -d output_buffering=1 /usr/share/php5/PEAR/pearcmd.php list
(gdb) run
Starting program: /usr/bin/php5 -C -q "-d include_path=/usr/share/php5/PEAR" -d output_buffering=1 /usr/share/php5/PEAR/pearcmd.php list
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread 47860898304080 (LWP 16408)]
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
Installed packages, channel pear.php.net:
=========================================
Package        Version State
Archive_Tar    1.3.1   stable
Console_Getopt 1.2     stable
PEAR           1.4.6   stable
*** glibc detected *** /usr/bin/php5: free(): invalid pointer: 0x00000000008effa8 ***
======= Backtrace: =========
/lib64/libc.so.6[0x2b877ba9d37e]
/lib64/libc.so.6(__libc_free+0x6c)[0x2b877ba9e99c]
/usr/bin/php5(zend_hash_destroy+0xb5)[0x567455]
/usr/lib64/php5/extensions/http.so[0x2b877c506f3f]
/usr/bin/php5(zend_hash_destroy+0x53)[0x5673f3]
/usr/lib64/php5/extensions/http.so(zm_shutdown_http_persistent_handle+0x10)[0x2b877c506b20]
/usr/lib64/php5/extensions/http.so(zm_shutdown_http+0x49)[0x2b877c4d50c9]
/usr/bin/php5(module_destructor+0x28)[0x560808]
/usr/bin/php5[0x56704a]
/usr/bin/php5(zend_hash_graceful_reverse_destroy+0x28)[0x5672e8]
/usr/bin/php5(zend_shutdown+0x20)[0x55c840]
/usr/bin/php5(php_module_shutdown+0x2a)[0x51655a]
/usr/bin/php5(main+0x327)[0x5e8e17]
/lib64/libc.so.6(__libc_start_main+0xf4)[0x2b877ba4f154]
/usr/bin/php5[0x42cb59]
======= Memory map: ========
00400000-0065b000 r-xp 00000000 03:02 117839                             /usr/bin/php5
0075b000-007d9000 rw-p 0025b000 03:02 117839                             /usr/bin/php5
007d9000-01035000 rw-p 007d9000 00:00 0                                  [heap]
2b877ad06000-2b877ad21000 r-xp 00000000 03:02 31010                      /lib64/ld-2.4.so
2b877ad21000-2b877ad22000 rw-p 2b877ad21000 00:00 0
2b877ad47000-2b877ad48000 rw-p 2b877ad47000 00:00 0
2b877ad48000-2b877ad83000 r--p 00000000 03:02 35413                      /usr/lib/locale/de_DE.utf8/LC_CTYPE
2b877ad83000-2b877ad8a000 r--s 00000000 03:02 252076                     /usr/lib64/gconv/gconv-modules.cache
2b877ae21000-2b877ae23000 rw-p 0001b000 03:02 31010                      /lib64/ld-2.4.so
2b877ae23000-2b877ae2c000 r-xp 00000000 03:02 31021                      /lib64/libcrypt-2.4.so
2b877ae2c000-2b877af2b000 ---p 00009000 03:02 31021                      /lib64/libcrypt-2.4.so
2b877af2b000-2b877af2e000 rw-p 00008000 03:02 31021                      /lib64/libcrypt-2.4.so
2b877af2e000-2b877af5c000 rw-p 2b877af2e000 00:00 0
2b877af5c000-2b877af60000 r-xp 00000000 03:02 41704                      /usr/lib64/libmm.so.14.0.20
2b877af60000-2b877b05f000 ---p 00004000 03:02 41704                      /usr/lib64/libmm.so.14.0.20
2b877b05f000-2b877b060000 rw-p 00003000 03:02 41704                      /usr/lib64/libmm.so.14.0.20
2b877b060000-2b877b150000 r-xp 00000000 03:02 40233                      /usr/lib64/libdb-4.3.so
2b877b150000-2b877b24f000 ---p 000f0000 03:02 40233                      /usr/lib64/libdb-4.3.so
2b877b24f000-2b877b254000 rw-p 000ef000 03:02 40233                      /usr/lib64/libdb-4.3.so
2b877b254000-2b877b255000 rw-p 2b877b254000 00:00 0
2b877b255000-2b877b266000 r-xp 00000000 03:02 31045                      /lib64/libresolv-2.4.so
2b877b266000-2b877b365000 ---p 00011000 03:02 31045                      /lib64/libresolv-2.4.so
2b877b365000-2b877b367000 rw-p 00010000 03:02 31045                      /lib64/libresolv-2.4.so
2b877b367000-2b877b369000 rw-p 2b877b367000 00:00 0
2b877b369000-2b877b3bd000 r-xp 00000000 03:02 31025                      /lib64/libm-2.4.so
2b877b3bd000-2b877b4bc000 ---p 00054000 03:02 31025                      /lib64/libm-2.4.so
2b877b4bc000-2b877b4be000 rw-p 00053000 03:02 31025                      /lib64/libm-2.4.so
2b877b4be000-2b877b4d1000 r-xp 00000000 03:02 31028                      /lib64/libnsl-2.4.so
2b877b4d1000-2b877b5d0000 ---p 00013000 03:02 31028                      /lib64/libnsl-2.4.so
2b877b5d0000-2b877b5d2000 rw-p 00012000 03:02 31028                      /lib64/libnsl-2.4.so
2b877b5d2000-2b877b5d5000 rw-p 2b877b5d2000 00:00 0
2b877b5d5000-2b877b5e9000 r-xp 00000000 03:02 36781                      /lib64/libz.so.1.2.3
2b877b5e9000-2b877b6e8000 ---p 00014000 03:02 36781                      /lib64/libz.so.1.2.3
2b877b6e8000-2b877b6e9000 rw-p 00013000 03:02 36781                      /lib64/libz.so.1.2.3
2b877b6e9000-2b877b81d000 r-xp 00000000 03:02 62421                      /usr/lib64/libxml2.so.2.6.23
2b877b81d000-2b877b91d000 ---p 00134000 03:02 62421
Program received signal SIGABRT, Aborted.
[Switching to Thread 47860898304080 (LWP 16408)]
0x00002b877ba61aa5 in raise () from /lib64/libc.so.6
(gdb) bt
#0  0x00002b877ba61aa5 in raise () from /lib64/libc.so.6
#1  0x00002b877ba62e60 in abort () from /lib64/libc.so.6
#2  0x00002b877ba9836b in __libc_message () from /lib64/libc.so.6
#3  0x00002b877ba9d37e in malloc_printerr () from /lib64/libc.so.6
#4  0x00002b877ba9e99c in free () from /lib64/libc.so.6
#5  0x0000000000567455 in zend_hash_destroy ()
#6  0x00002b877c506f3f in http_persistent_handles_hash_dtor (p=<value optimized out>)
    at /tmp/tmpnUWFYQ/pecl_http-1.5.4/http_persistent_handle_api.c:183
#7  0x00000000005673f3 in zend_hash_destroy ()
#8  0x00002b877c506b20 in zm_shutdown_http_persistent_handle (type=<value optimized out>, module_number=16408)
    at /tmp/tmpnUWFYQ/pecl_http-1.5.4/http_persistent_handle_api.c:197
#9  0x00002b877c4d50c9 in zm_shutdown_http (type=1, module_number=12) at /tmp/tmpnUWFYQ/pecl_http-1.5.4/http.c:335
#10 0x0000000000560808 in module_destructor ()
#11 0x000000000056704a in zend_hash_quick_find ()
#12 0x00000000005672e8 in zend_hash_graceful_reverse_destroy ()
#13 0x000000000055c840 in zend_shutdown ()
#14 0x000000000051655a in php_module_shutdown ()
#15 0x00000000005e8e17 in main ()
(gdb)
 [2007-07-05 14:47 UTC] mike@php.net
Doesn't help either, sorry. I don't see any obvious issues.
 [2007-08-21 04:05 UTC] mike@php.net
Do you still experience this issue?
 [2007-09-18 07:13 UTC] mike@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.


 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Sun Apr 21 20:01:26 2019 UTC