php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #56930 PHP 5.1.2 apache2 segfault
Submitted: 2006-03-30 05:33 UTC Modified: 2009-02-16 20:29 UTC
From: admin at handy-games dot com Assigned:
Status: No Feedback Package: APC (PECL)
PHP Version: 5.1.1 OS: Debian GNU/Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: admin at handy-games dot com
New email:
PHP Version: OS:

 

 [2006-03-30 05:33 UTC] admin at handy-games dot com
Description:
------------
My apache2 error.log contains the following lines:

[Wed Mar 29 20:09:53 2006] [error] [client 85.205.219.4] PHP 
Fatal error:  Non-static method
\xe0\x17X::\x85\xc0~\xf4\x8de\xf4[^_]\xc3\xff@\b\xba\x02() cannot be called statically in /www/htdocs/i.php on line 45
[Wed Mar 29 20:09:53 2006] [error] [client 85.205.219.4] PHP Fatal error:  Non-static method
\xe0\x17X::\x85\xc0~\xf4\x8de\xf4[^_]\xc3\xff@\b\xba\x02() cannot be called statically in /www/htdocs/i.php on line 45
[Wed Mar 29 20:09:53 2006] [notice] child pid 19931 exit signal Segmentation fault (11)
[Wed Mar 29 20:09:53 2006] [notice] child pid 7495 exit signal Segmentation fault (11)
[Wed Mar 29 20:09:53 2006] [notice] child pid 9715 exit signal Segmentation fault (11)
[Wed Mar 29 20:09:57 2006] [notice] child pid 9720 exit signal Segmentation fault (11)

Before this first error occurred everything was ok for several days. I'm not sure this error is due to APC, but otherwise the apache2/php setup is standard (current dotdeb packages for debian, Apache/2.0.54 mpm-prefork).

Settings for APC are default (

apc.cache_by_default	1
apc.enable_cli	0
apc.enabled	1
apc.file_update_protection	2
apc.filters	
apc.gc_ttl	3600
apc.max_file_size	1M
apc.mmap_file_mask	
apc.num_files_hint	1000
apc.optimization	0
apc.shm_segments	1
apc.shm_size	30
apc.slam_defense	0
apc.stat	1
apc.ttl	0
apc.user_entries_hint	100
apc.user_ttl	0

APC Support 	enabled
Version 	3.0.10
MMAP Support 	Enabled
MMAP File Mask 	no value
Revision 	$Revision: 3.84 $
Build Date 	Mar 14 2006 20:28:30

). The error is not reproducible. After reloading apache2 there were no more segfaults so far.

Maybe this bug is related to http://pecl.php.net/bugs/bug.php?id=6634 . (The error reported there for the crashme-files does not occur for me.)



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-04-10 05:38 UTC] admin at handy-games dot com
I keep getting the errors every few days. Still not reproducible afaik, but recurring. Caused probably by symlinks.

[Thu Apr 06 21:18:06 2006] [notice] child pid 8150 exit signal Segmentation fault (11)
[Thu Apr 06 21:18:06 2006] [notice] child pid 9658 exit signal Segmentation fault (11)
[Thu Apr 06 21:18:06 2006] [error] [client 85.205.222.132] PHP Fatal error:  Non-static method \xe0\x17X::\x85\xc0~\xf4\x8de\xf4[^_]\xc3\xff@\b\xba\x02() cannot be called statically in /www/htdocs/i.php on line 45
[Thu Apr 06 21:18:06 2006] [error] [client 85.205.222.132] PHP Fatal error:  Non-static method \xe0\x17X::\x85\xc0~\xf4\x8de\xf4[^_]\xc3\xff@\b\xba\x02() cannot be called statically in /www/htdocs/i.php on line 45
[Thu Apr 06 21:18:07 2006] [error] [client 85.205.222.132] PHP Fatal error:  Non-static method \xe0\x17X::\x85\xc0~\xf4\x8de\xf4[^_]\xc3\xff@\b\xba\x02() cannot be called statically in /www/htdocs/i.php on line 45
[Thu Apr 06 21:18:07 2006] [notice] child pid 21010 exit signal Segmentation fault (11)
[Thu Apr 06 21:18:07 2006] [notice] child pid 31706 exit signal Segmentation fault (11)
[Thu Apr 06 21:18:07 2006] [notice] child pid 15531 exit signal Segmentation fault (11)
[Thu Apr 06 21:18:07 2006] [error] [client 85.205.222.132] PHP Fatal error:  Non-static method \xe0\x17X::\x85\xc0~\xf4\x8de\xf4[^_]\xc3\xff@\b\xba\x02() cannot be called statically in /www/htdocs/i.php on line 45
[Thu Apr 06 21:18:08 2006] [notice] child pid 22909 exit signal Segmentation fault (11)
[Thu Apr 06 21:18:08 2006] [notice] child pid 8156 exit signal Segmentation fault (11)
[Thu Apr 06 21:18:13 2006] [notice] child pid 16110 exit signal Segmentation fault (11)
 [2006-04-10 11:25 UTC] m dot wanat at forall dot pl
If you're not able to reproduce, try to provide backtrace of this error. This will make developers able to help you.
 [2006-10-10 13:02 UTC] james dot andres at projectopus dot com
I have exactly the same problem!

Running any of the following combinations on my EMT64 Dell 2850 PE Apache will fall apart within 24 hours (segfault until it explodes).

* APC versions 3.0.8 - 3.0.12
* PHP versions 5.0.5, 5.1.2

Note: I use Ubuntu Server, and Debian Unstable.  Both platforms experience the same issues.


My previous server was a 32bit K7 system and I could only run APC 3.0.10 with PHP 5.0.4.  Any other version combination would cause apache to die.  I tried the following with bad results.

* APC 3.0.6 - 3.0.9
* PHP 5.0.4, 5.1.0, 5.1.1, 5.1.2


I only seem to have these problems on my production servers, so it likely rears it's head when traffic loads get high.  Hitting the servers in my lab with ab, seige, etc.. doesn't seem to reproduce the results.  Sigh.

When it works, I love APC.  But I seem to spend more hours debugging it than enjoying it working...  Is there any hope?
 [2006-10-10 15:45 UTC] gopalv82 at yahoo dot com
I have been trying to reproduce all various varieties of segvs for quite a while. 

It does seem that a lot of these issues in the wild can't be reproduced in a controlled scenario. If you have coredumps from the apaches, please (and I mean, please) give me a backtrace. 

I'd love to help you, but my attacks on APC also haven't yielded too many cases I can debug.
 [2006-10-26 14:55 UTC] james dot andres at projectopus dot com
Hi gopalv,

I finally got around to learning how to make core dumps :-).

Here's a crash that occured within a few minutes of starting our system with APC.

http://www.projectopus.com/apache2.0.55+php5.1.2-2.6.15-26-amd64-xeon-core.tar.bz2 (~6MB)

Specific software versions are:
APC: CVS 3.0.13-dev (Checked out at ~ 11AM Oct 26th, 2006)
Apache: 2.0.55 (ubuntu dapper newest)
PHP: 5.1.2 (ubuntu dapper newest)
Kernel: 2.6.15-26-amd64-xeon

Hardware:
CPUs: 2x XEON (single core, "three point something" GHz, with HT)
System: Dell PE 2850
RAM: 4GB
... etc (email me if you need more info.)

Configuration:

Was defaults (from INSTALL file), but recently tweaked a bit in hopes of helping the crashing problem (it didn't help).

extension=apc.so
apc.enabled=1
apc.shm_segments=1
apc.optimization=0
apc.shm_size=64
apc.ttl=3600 ; Was 7200
apc.user_ttl=3600 ; Was 7200
apc.num_files_hint=700 ; As of Oct 26th, 2006
apc.mmap_file_mask=/tmp/apc.XXXXXX
apc.enable_cli=0
apc.slam_defense=75

If you need any further help feel free to email me.

James Andres
Lead Developer - www.projectopus.com
 [2006-10-26 15:10 UTC] gopalv82 at yahoo dot com
I can't do anything with the core dump without the original binaries. So you'll have to debug a bit.

Try the following 

bash$ gdb /usr/sbin/apache2 <core>

(gdb) bt full

And paste at least the first ~20-30 lines here ?
 [2006-10-27 12:17 UTC] james dot andres at projectopus dot com
Higopalv,

Sorry, wasn't sure how to make the backtrace (I'm not much of a linux developer as you can probably tell).

Here you go:

james@simon:~$ gdb /usr/sbin/apache2 ./core 
GNU gdb 6.4-debian
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-linux-gnu"...(no debugging symbols found)
Using host libthread_db library "/lib/libthread_db.so.1".

Core was generated by `/usr/sbin/apache2 -k start -DSSL'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/lib/libpcre.so.3...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libpcre.so.3
Reading symbols from /usr/lib/libz.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libz.so.1
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/libaprutil-0.so.0...
(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libaprutil-0.so.0
Reading symbols from /usr/lib/libldap_r.so.2...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libldap_r.so.2
Reading symbols from /usr/lib/liblber.so.2...
(no debugging symbols found)...done.
Loaded symbols for /usr/lib/liblber.so.2
Reading symbols from /usr/lib/libdb-4.3.so...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libdb-4.3.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-0.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libapr-0.so.0
Reading symbols from /lib/librt.so.1...
(no debugging symbols found)...done.
Loaded symbols for /lib/librt.so.1
Reading symbols from /lib/libm.so.6...(no debugging symbols found)...done.
Loaded symbols for /lib/libm.so.6
Reading symbols from /lib/libcrypt.so.1...
(no debugging symbols found)...done.
Loaded symbols for /lib/libcrypt.so.1
Reading symbols from /lib/libnsl.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/libnsl.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/libresolv.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib/libresolv.so.2
Reading symbols from /usr/lib/libsasl2.so.2...
(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libsasl2.so.2
Reading symbols from /usr/lib/libgnutls.so.12...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libgnutls.so.12
Reading symbols from /lib/ld-linux-x86-64.so.2...
(no debugging symbols found)...done.
Loaded symbols for /lib64/ld-linux-x86-64.so.2
Reading symbols from /usr/lib/libtasn1.so.2...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libtasn1.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
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/apache2/modules/mod_cgi.so...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/apache2/modules/mod_cgi.so
Reading symbols from /usr/lib/apache2/modules/mod_perl.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/lib/apache2/modules/mod_perl.so
Reading symbols from /usr/lib/libperl.so.5.8...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libperl.so.5.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/libgdbm.so.3...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libgdbm.so.3
Reading symbols from /lib/libbz2.so.1.0...
(no debugging symbols found)...done.
Loaded symbols for /lib/libbz2.so.1.0
Reading symbols from /usr/lib/libgssapi_krb5.so.2...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libgssapi_krb5.so.2
Reading symbols from /usr/lib/libkrb5.so.3...
---Type <return> to continue, or q <return> to quit---
(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libkrb5.so.3
Reading symbols from /usr/lib/libk5crypto.so.3...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libk5crypto.so.3
Reading symbols from /lib/libcom_err.so.2...
(no debugging symbols found)...done.
Loaded symbols for /lib/libcom_err.so.2
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/libkrb5support.so.0...
(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libkrb5support.so.0
Reading symbols from /usr/lib/apache2/modules/mod_cache.so...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/apache2/modules/mod_cache.so
Reading symbols from /usr/lib/apache2/modules/mod_disk_cache.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/lib/apache2/modules/mod_disk_cache.so
Reading symbols from /usr/lib/apache2/modules/mod_proxy.so...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/apache2/modules/mod_proxy.so
Reading symbols from /usr/lib/apache2/modules/mod_proxy_http.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/lib/apache2/modules/mod_proxy_http.so
Reading symbols from /usr/lib/apache2/modules/mod_proxy_connect.so...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/apache2/modules/mod_proxy_connect.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/php5/20051025/memcache.so...done.
Loaded symbols for /usr/lib/php5/20051025/memcache.so
Reading symbols from /usr/lib/php5/20051025/apc.so...done.
Loaded symbols for /usr/lib/php5/20051025/apc.so
Reading symbols from /usr/lib/php5/20051025/gd.so...done.
Loaded symbols for /usr/lib/php5/20051025/gd.so
Reading symbols from /usr/lib/libgd.so.2...done.
Loaded symbols for /usr/lib/libgd.so.2
Reading symbols from /usr/lib/libt1.so.5...done.
Loaded symbols for /usr/lib/libt1.so.5
Reading symbols from /usr/lib/libfreetype.so.6...done.
Loaded symbols for /usr/lib/libfreetype.so.6
Reading symbols from /usr/lib/libX11.so.6...done.
Loaded symbols for /usr/lib/libX11.so.6
Reading symbols from /usr/lib/libXpm.so.4...done.
Loaded symbols for /usr/lib/libXpm.so.4
Reading symbols from /usr/lib/libpng12.so.0...done.
Loaded symbols for /usr/lib/libpng12.so.0
Reading symbols from /usr/lib/libjpeg.so.62...done.
Loaded symbols for /usr/lib/libjpeg.so.62
Reading symbols from /usr/lib/libfontconfig.so.1...done.
Loaded symbols for /usr/lib/libfontconfig.so.1
Reading symbols from /usr/lib/libXau.so.6...done.
Loaded symbols for /usr/lib/libXau.so.6
Reading symbols from /usr/lib/php5/20051025/mysql.so...done.
Loaded symbols for /usr/lib/php5/20051025/mysql.so
Reading symbols from /usr/lib/libmysqlclient.so.15...done.
Loaded symbols for /usr/lib/libmysqlclient.so.15
Reading symbols from /usr/lib/php5/20051025/mhash.so...done.
Loaded symbols for /usr/lib/php5/20051025/mhash.so
Reading symbols from /usr/lib/libmhash.so.2...done.
Loaded symbols for /usr/lib/libmhash.so.2
Reading symbols from /usr/lib/php5/20051025/mysqli.so...done.
Loaded symbols for /usr/lib/php5/20051025/mysqli.so
Reading symbols from /usr/lib/php5/20051025/curl.so...done.
Loaded symbols for /usr/lib/php5/20051025/curl.so
Reading symbols from /usr/lib/libcurl.so.3...done.
Loaded symbols for /usr/lib/libcurl.so.3
Reading symbols from /usr/lib/libidn.so.11...done.
Loaded symbols for /usr/lib/libidn.so.11
#0  0x00002aaaad07f94b in _efree ()
   from /usr/lib/apache2/modules/libphp5.so
(gdb)

Let me know if you need anything further.

James.
 [2006-11-06 14:18 UTC] gopalv82 at yahoo dot com
sorry to be a bit late on this, but yes ... I need ~20-30 more lines from what 

(gdb) bt full

dumps out, if you can.
 [2006-11-21 18:53 UTC] james dot andres at projectopus dot com
Hi gopalv,

Sorry, that was the full dump. :-/  If I get anything more out of it I'll let you know.

<offtopic>
This isn't the place for it, I know, but if anyone knows of a stable Apache 2.0,x/PHP 5.1.x/MySQL 5.x combination (running on Debian / Ubuntu Xeon w/ SMP) I'd love to hear about it ... the boss isn't happy to shell out the cash for Zend Platform if we don't really need it.

In other news, have people had better luck with PHP 5.1.6 or PHP 5.1.4?
</offtopic>

Good luck with the debugging gopalv :-)

James.
 [2007-02-13 13:13 UTC] jon at gamingsolutions dot ca
In the last backtrace call, you omitted the "bt full" part. After you run gdb, you need to type "bt full" at the gdb prompt to actually generate the backtrace - all you displayed is the result of gdb loading debugging symbols for the linked binaries, not an actual backtrace.

For what it's worth, I'm also experiencing similar problems, but I'm not sure if it's specifically this problem. We had APC in testing (including heavy stress testing) for the better part of 4 months without problems, and it's now been in production for about 2 months. Out of nowhere, yesterday, it started segfaulting like mad.

To top it all off, it is nearly impossible to reproduce.
 [2007-02-24 19:47 UTC] rasmus@php.net
This bug is quite old now.  The code has changed a lot.  Please try version 3.0.13 that was just released and get back to us if you are still seeing problems.
 [2009-02-16 20:29 UTC] shire@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-2020 The PHP Group
All rights reserved.
Last updated: Mon Jan 27 13:01:25 2020 UTC