Apache complains of a segmentation fault caused by libphp5.so while browsing a site constructed from PHP scripts. Error appears to be transparent to website user. Reproducible: Sometimes Steps to Reproduce: 1.Serve up a PHP site via Apache 2. 3. Actual Results: Apache segfault Expected Results: No errors in /var/apache2/error_log This bug is a follow-on from bug # 192967 server ~ # emerge --info Portage 2.1.2.12 (default-linux/x86/2007.0/server, gcc-4.1.2, glibc-2.5-r4, 2.6.19-gentoo-r5 i686) ================================================================= System uname: 2.6.19-gentoo-r5 i686 Pentium III (Katmai) Gentoo Base System release 1.12.9 Timestamp of tree: Thu, 20 Sep 2007 10:50:01 +0000 distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled] ccache version 2.4 [disabled] app-shells/bash: 3.2_p17 dev-java/java-config: 1.3.7, 2.0.31-r5 dev-lang/python: 2.4.4-r4 dev-python/pycrypto: 2.0.1-r6 dev-util/ccache: 2.4-r7 sys-apps/baselayout: 1.12.9-r2 sys-apps/sandbox: 1.2.17 sys-devel/autoconf: 2.13, 2.61-r1 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10 sys-devel/binutils: 2.17 sys-devel/gcc-config: 1.3.16 sys-devel/libtool: 1.5.24 virtual/os-headers: 2.6.17-r2 ACCEPT_KEYWORDS="x86" CBUILD="i686-pc-linux-gnu" CFLAGS="-O2 -march=pentium3 -fomit-frame-pointer -pipe -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc" CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo" CXXFLAGS="-O2 -march=pentium3 -fomit-frame-pointer -pipe -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig distcc distlocks fixpackages metadata-transfer parallel-fetch sandbox sfperms strict" GENTOO_MIRRORS="http://ftp.snt.utwente.nl/pub/os/linux/gentoo http://www.gigaload.org/gentoo.org/ http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/" LANG="en_GB.utf8" LINGUAS="en_GB" MAKEOPTS="-j4" PKGDIR="/usr/portage/packages" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage" USE="acl acpi apache2 berkdb bitmap-fonts bzlib cgi cli cracklib crypt ctype dba doc dri evo fam fortran gdbm gpm iconv imap isdnlog java5 libwww logrotate maildir mailwrapper midi mmx mudflap mysql ncurses nls nptl nptlonly openmp pam pcre perl ppds pppd python readline reflection sasl session spl ssl tcpd threads truetype-fonts type1-fonts unicode userlocales vim vim-syntax x86 xml xmlrpc xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en_GB" USERLAND="GNU" VIDEO_CARDS="apm ark chips cirrus cyrix dummy fbdev glint i128 i740 i810 imstt mach64 mga neomagic nsc nv r128 radeon rendition s3 s3virge savage siliconmotion sis sisusb tdfx tga trident tseng v4l vesa vga via vmware voodoo" Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Created attachment 131448 [details] Copy of /var/log/apache2/error_log
At least I am unable to extract any useful data from the log and I think there isn't much we can do about. Can you please try to reproduce the problem without any 3rd-party extensions (xcache, eA, APC, xdebug etc., if you use any of those)? If it's still reproducible you should try to use a vanilla snapshot [1] and build it from source (don't use any of our patches). If it still segfaults for you then, file an upstream bug [2] (and please link the bug you file here). If not then it is our problem. Sorry that I have to ask you to do so much debugging, but I really cannot guess what the problem is from the given information. A gdb backtrace *could* also help (and maybe upstream wants one as well if you file a bug). Also, is this reproducible using a very simple PHP file (<?php echo "foo"; ?>) as well or does it only happen on your (maybe complex) set up? [1] http://snaps.php.net/ [2] http://bugs.php.net/
Re-emerging with: USE='mpm-prefork -threads' emerge -av --newuse apache php appears to have stopped the crashes happening. Not sure I fully understand the performance impact of this step, but I just need a development platform for the moment. hoffie, to respond to your points: I haven't put in any third party extension myself, but I don't know if there were some as part of the original packages? I am not using any of the apps. listed. I could not reproduce the segfault with a simple PHP file. It is Horde that I am currently trying to get to work, which I guess you can describe as a complex setup (although I am not too far removed from just a basic Gentoo install).