php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #48134 crash after a few days (backtrace attached) with worker MPM
Submitted: 2009-05-03 11:03 UTC Modified: 2009-09-26 01:00 UTC
From: jimbobpalmer at gmail dot com Assigned:
Status: No Feedback Package: Apache2 related
PHP Version: 5.2.9 OS: * (ZTS only)
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: jimbobpalmer at gmail dot com
New email:
PHP Version: OS:

 

 [2009-05-03 11:03 UTC] jimbobpalmer at gmail dot com
Description:
------------
5.2.8-pl2-gentoo, I can't upgrade atm. No crashes for a few days, then logs, like this one:

Backtrace:

pid 19488 mod_backtrace main() is at 8066050
/usr/lib/apache2/modules/mod_backtrace.so[0xb7b7aa9a]
/usr/sbin/apache2(ap_run_fatal_exception+0x3f)[0x80827ef]
/usr/sbin/apache2[0x8082be8]
[0xb7f67400]
/usr/lib/apache2/modules/libphp5.so[0xb78407cf]
/usr/sbin/apache2(ap_run_handler+0x57)[0x807a127]
/usr/sbin/apache2(ap_invoke_handler+0x91)[0x807d4b1]
/usr/sbin/apache2(ap_process_request+0x196)[0x80887e6]
/usr/sbin/apache2[0x80857d8]
/usr/sbin/apache2(ap_run_process_connection+0x57)[0x80814b7]
/usr/sbin/apache2[0x808e6ac]
/usr/lib/libapr-1.so.0[0xb7d77e8e]
/lib/libpthread.so.0[0xb7d0419b]
/lib/libc.so.6(clone+0x5e)[0xb7c8886e]

I have to restart Apache.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-05-06 09:56 UTC] lbarnaud@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.

A gdb backtrace would be helpful. Allow your apache user to generate large enough core files, remove mod_backtrace, and wait for core files to appear. Then load them in gdb and send a gdb backtrace.
 [2009-05-07 06:53 UTC] jimbobpalmer at gmail dot com
# gdb -q /usr/sbin/apache2 /var/tmp/core.6111 
(no debugging symbols found)

warning: Can't read pathname for load map: Input/output error.
Reading symbols from /lib/libm.so.6...(no debugging symbols found)...done.
Loaded symbols for /lib/libm.so.6
Reading symbols from /usr/lib/libpcre.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libpcre.so.0
Reading symbols from /lib/libz.so.1...
(no debugging symbols found)...done.
Loaded symbols for /lib/libz.so.1
Reading symbols from /lib/libbz2.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/libbz2.so.1
Reading symbols from /usr/lib/libaprutil-1.so.0...
(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libaprutil-1.so.0
Reading symbols from /usr/lib/libgdbm.so.3...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libgdbm.so.3
Reading symbols from /usr/lib/libdb-4.5.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libdb-4.5.so
Reading symbols from /usr/lib/libexpat.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libexpat.so.1
Reading symbols from /usr/lib/libapr-1.so.0...
(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libapr-1.so.0
Reading symbols from /lib/libuuid.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/libuuid.so.1
Reading symbols from /lib/librt.so.1...
(no debugging symbols found)...done.
Loaded symbols for /lib/librt.so.1
Reading symbols from /lib/libcrypt.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/libcrypt.so.1
Reading symbols from /lib/libpthread.so.0...
(no debugging symbols found)...done.
Loaded symbols for /lib/libpthread.so.0
Reading symbols from /lib/libdl.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib/libdl.so.2
Reading symbols from /lib/libc.so.6...
(no debugging symbols found)...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /lib/ld-linux.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /lib/libnsl.so.1...
(no debugging symbols found)...done.
Loaded symbols for /lib/libnsl.so.1
Reading symbols from /lib/libnss_compat.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib/libnss_compat.so.2
Reading symbols from /lib/libnss_nis.so.2...
(no debugging symbols found)...done.
Loaded symbols for /lib/libnss_nis.so.2
Reading symbols from /lib/libnss_files.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib/libnss_files.so.2
Reading symbols from /usr/lib/gcc/i686-pc-linux-gnu/4.3.2/libgcc_s.so.1...
(no debugging symbols found)...done.
Loaded symbols for /usr/lib/gcc/i686-pc-linux-gnu/4.3.2/libgcc_s.so.1
Reading symbols from /usr/lib/apache2/modules/mod_auth_basic.so...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/apache2/modules/mod_auth_basic.so
Reading symbols from /usr/lib/apache2/modules/mod_authn_default.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/lib/apache2/modules/mod_authn_default.so
Reading symbols from /usr/lib/apache2/modules/mod_authn_file.so...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/apache2/modules/mod_authn_file.so
Reading symbols from /usr/lib/apache2/modules/mod_authz_default.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/lib/apache2/modules/mod_authz_default.so
Reading symbols from /usr/lib/apache2/modules/mod_authz_host.so...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/apache2/modules/mod_authz_host.so
Reading symbols from /usr/lib/apache2/modules/mod_authz_user.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/lib/apache2/modules/mod_authz_user.so
Reading symbols from /usr/lib/apache2/modules/mod_headers.so...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/apache2/modules/mod_headers.so
Reading symbols from /usr/lib/apache2/modules/mod_log_config.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/lib/apache2/modules/mod_log_config.so
Reading symbols from /usr/lib/apache2/modules/mod_rewrite.so...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/apache2/modules/mod_rewrite.so
Reading symbols from /usr/lib/apache2/modules/mod_setenvif.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/lib/apache2/modules/mod_setenvif.so
Reading symbols from /usr/lib/apache2/modules/mod_status.so...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/apache2/modules/mod_status.so
Reading symbols from /usr/lib/apache2/modules/mod_unique_id.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/lib/apache2/modules/mod_unique_id.so
Reading symbols from /usr/lib/apache2/modules/mod_mime.so...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/apache2/modules/mod_mime.so
Reading symbols from /usr/lib/apache2/modules/mod_dir.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/lib/apache2/modules/mod_dir.so
Reading symbols from /usr/lib/apache2/modules/mod_ssl.so...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/apache2/modules/mod_ssl.so
Reading symbols from /usr/lib/libssl.so.0.9.8...
(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libssl.so.0.9.8
Reading symbols from /usr/lib/libcrypto.so.0.9.8...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libcrypto.so.0.9.8
Reading symbols from /usr/lib/apache2/modules/libphp5.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/lib/apache2/modules/libphp5.so
Reading symbols from /usr/lib/libexslt.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libexslt.so.0
Reading symbols from /lib/libhistory.so.5...
(no debugging symbols found)...done.
Loaded symbols for /lib/libhistory.so.5
Reading symbols from /lib/libreadline.so.5...(no debugging symbols found)...done.
Loaded symbols for /lib/libreadline.so.5
Reading symbols from /lib/libncurses.so.5...
(no debugging symbols found)...done.
Loaded symbols for /lib/libncurses.so.5
Reading symbols from /usr/lib/libpanel.so.5...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libpanel.so.5
Reading symbols from /usr/lib/libmcrypt.so.4...
---Type <return> to continue, or q <return> to quit--- 
(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libmcrypt.so.4
Reading symbols from /usr/lib/libltdl.so.3...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libltdl.so.3
Reading symbols from /lib/libpam.so.0...
(no debugging symbols found)...done.
Loaded symbols for /lib/libpam.so.0
Reading symbols from /usr/lib/libgmp.so.3...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libgmp.so.3
Reading symbols from /usr/lib/libt1.so.5...
(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libt1.so.5
Reading symbols from /usr/lib/libfreetype.so.6...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libfreetype.so.6
Reading symbols from /usr/lib/libpng12.so.0...
(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libpng12.so.0
Reading symbols from /usr/lib/libjpeg.so.62...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libjpeg.so.62
Reading symbols from /lib/libresolv.so.2...
(no debugging symbols found)...done.
Loaded symbols for /lib/libresolv.so.2
Reading symbols from /usr/lib/libcurl.so.4...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libcurl.so.4
Reading symbols from /usr/lib/mysql/libmysqlclient_r.so.15...
(no debugging symbols found)...done.
Loaded symbols for /usr/lib/mysql/libmysqlclient_r.so.15
Reading symbols from /usr/lib/libnetsnmp.so.15...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libnetsnmp.so.15
Reading symbols from /usr/lib/libxslt.so.1...
(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libxslt.so.1
Reading symbols from /usr/lib/libxml2.so.2...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libxml2.so.2
Reading symbols from /usr/lib/libgcrypt.so.11...
(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libgcrypt.so.11
Reading symbols from /usr/lib/libgpg-error.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libgpg-error.so.0

(no debugging symbols found)
Core was generated by `/usr/sbin/apache2 -D PHP5 -D SSL -d /usr/lib/apache2 -f /etc/apache2/httpd'.
Program terminated with signal 11, Segmentation fault.
[New process 6150]
[New process 6179]
[New process 6178]
[New process 6177]
[New process 6176]
[New process 6175]
[New process 6174]
[New process 6173]
[New process 6172]
[New process 6171]
[New process 6170]
[New process 6169]
[New process 6168]
[New process 6167]
[New process 6166]
[New process 6165]
[New process 6164]
[New process 6163]
[New process 6162]
[New process 6161]
[New process 6160]
[New process 6159]
[New process 6158]
[New process 6157]
[New process 6156]
[New process 6155]
[New process 6154]
[New process 6153]
[New process 6152]
[New process 6151]
[New process 6111]
[New process 6149]
[New process 6148]
[New process 6118]
#0  0xb75dbbad in zend_hash_move_forward_ex ()
   from /usr/lib/apache2/modules/libphp5.so
(gdb) bt
#0  0xb75dbbad in zend_hash_move_forward_ex ()
   from /usr/lib/apache2/modules/libphp5.so
#1  0xb7656f6f in apply_config () from /usr/lib/apache2/modules/libphp5.so
#2  0xb765631e in ?? () from /usr/lib/apache2/modules/libphp5.so
#3  0x08724a68 in ?? ()
#4  0x08bc2190 in ?? ()
#5  0xb7655bbf in ?? () from /usr/lib/apache2/modules/libphp5.so
#6  0x08063c00 in __ctype_toupper_loc@plt ()
#7  0x08a9e910 in ?? ()
#8  0x08724ab0 in ?? ()
#9  0x00000008 in ?? ()
#10 0xb7d6e228 in apr_palloc () from /usr/lib/libapr-1.so.0
#11 0x0807a127 in ap_run_handler ()
#12 0x0807d4b1 in ap_invoke_handler ()
#13 0x080887e6 in ap_process_request ()
#14 0x080857d8 in ?? ()
#15 0x08a9e950 in ?? ()
#16 0x00000004 in ?? ()
#17 0x08a9e950 in ?? ()
#18 0x00000000 in ?? ()
(gdb)
 [2009-05-07 08:02 UTC] jani@php.net
Do you have some php settings done using the php_value / php_flag / 
php_admin_value / php_admin_flag directives in httpd.conf, some file 
included by httpd.conf or some .htaccess file in your filesystem?
 [2009-05-07 09:26 UTC] jimbobpalmer at gmail dot com
Yes, we use php_admin_value per vhost.

I noticed we have a few boolean php_admin_value options. I have changed these to php_admin_flag.
 [2009-05-07 12:47 UTC] jani@php.net
Was that backtrace really produced with debug build? ie. with PHP build 
using --enable-debug ?? 
 [2009-05-07 13:10 UTC] jimbobpalmer at gmail dot com
Yes. Both apache and php are compiled with debug.
 [2009-05-07 13:19 UTC] jani@php.net
Exactly what MPM are you using and what PHP SAPI module?
 [2009-05-07 13:44 UTC] jimbobpalmer at gmail dot com
Worker MPM + apache2handler
 [2009-05-07 14:00 UTC] jani@php.net
That explains it. You propably wouldn't have any problems if you didn't 
use threaded MPM. Try the more stable prefork MPM instead.
 [2009-05-07 19:08 UTC] jimbobpalmer at gmail dot com
Is php not thread safe?
 [2009-05-07 22:42 UTC] jani@php.net
Can you just try with prefork MPM so we can make the list of possible 
issues a bit shorter..? 

And yes, supposedly PHP is thread safe, just some libraries might not be 
and of course there might be bugs in PHP. 
 [2009-05-13 09:38 UTC] jimbobpalmer at gmail dot com
> Can you just try with prefork MPM so we can make the list of
> possible issues a bit shorter..? 

Prefork has had no segfaults in more than two days, versus 10 hours for the first segfault with the worker mpm (then a mass of segfaults a day or two later).
 [2009-05-18 13:03 UTC] jimbobpalmer at gmail dot com
Still no segfaults. What do you want me to do next?
 [2009-09-18 19:04 UTC] jani@php.net
Please try using this snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/


 [2009-09-26 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 20:01:29 2024 UTC