I encountered segfaults with php 5.2.10 installations on various servers. After googling around, I found this blog-entry: http://www.dotdeb.org/2009/06/25/php-5-2-10-packages-for-lennyetch-are-now-available/ It's about debian, but the issue seems to be the same and appears in combination with suhosin. disabling suhosin session encryption workarounds the issue.
Hmm, hadn't heard about that. First thought was that we are not using the 5.2.10 version of the suhosin patch, but the previous one. But apparently the problem is caused by the extension and not by the patch. The linked post suggests suhosin.session.encrypt = Off as a workaround. Please retry with php-5.2.10-r1, which has the new suhosin patch. If it doesn't help, please reopen and we'll have to wait for news from suhosin upstream.
Still happens with -r1: Jul 6 10:30:06 milch grsec: From 82.113.121.149: signal 11 sent to /usr/lib64/php5/bin/php-cgi[php-cgi:20827] uid/euid:1002/1002 gid/egid:100/100, parent /usr/lib64/php5/bin/php-cgi[php-cgi:20826] uid/euid:1002/1002 gid/egid:100/100 Jul 6 10:30:56 milch php-cgi[20830]: segfault at 12a2ce4 ip 00000000006e63d2 sp 00007fff34d042d0 error 4 in php-cgi[400000+6bf000] Jul 6 10:30:56 milch grsec: From 82.113.121.149: signal 11 sent to /usr/lib64/php5/bin/php-cgi[php-cgi:20830] uid/euid:1002/1002 gid/egid:100/100, parent /usr/lib64/php5/bin/php-cgi[php-cgi:20826] uid/euid:1002/1002 gid/egid:100/100
Same problem here, I need to downgrade to version 5.2.9 to get webserver working without problems again... This was from my error_log: [Thu Jul 02 07:22:37 2009] [notice] child pid 31597 exit signal Segmentation fault (11) [Thu Jul 02 07:58:34 2009] [notice] child pid 1393 exit signal Segmentation fault (11) [Thu Jul 02 08:01:48 2009] [notice] child pid 1395 exit signal Segmentation fault (11) [Thu Jul 02 08:04:44 2009] [notice] child pid 8777 exit signal Segmentation fault (11) [Thu Jul 02 08:05:21 2009] [notice] child pid 8422 exit signal Segmentation fault (11) [Thu Jul 02 08:11:06 2009] [notice] child pid 9461 exit signal Segmentation fault (11) [Thu Jul 02 08:12:02 2009] [notice] child pid 9281 exit signal Segmentation fault (11)
encountering the same problem, first thought that it was related to mod_fcgid, so installed mod_fastcgi. But this resolved nothing. The errors: [Tue Jul 07 12:14:57 2009] [warn] FastCGI: (dynamic) server "/var/www/fcgi-bin.d/php5-default_vhost/php-fcgi-wrapper" (pid 24837) terminated due to uncaught signal '11' (Segmentation fault) [Tue Jul 07 12:22:00 2009] [notice] mod_fcgid: process /var/www/fcgi-bin.d/php5-default_vhost/php-fcgi-wrapper(26220) exit(communication error), get unexpected signal 11 Downgrading to php-5.2.9-r2 does resolve the issue. My php use flags: [ebuild R ] dev-lang/php-5.2.10 USE="bcmath berkdb bzip2 calendar cgi crypt curl curlwrappers exif filter force-cgi-redirect ftp gd hash iconv imap inifile mysql mysqli nls pcre pic posix readline session simplexml snmp soap sockets spl ssl suhosin threads tokenizer truetype unicode xml xmlreader xmlrpc xmlwriter zip zlib -adabas -apache2 -birdstep -cdb -cjk -cli -concurrentmodphp -ctype -db2 -dbase -dbmaker -debug -discard-path -doc -empress -empress-bcs -esoob -fastbuild -fdftk -firebird -flatfile -frontbase -gd-external -gdbm -gmp -interbase -iodbc -ipv6 (-java-external) -json -kerberos -kolab -ldap -ldap-sasl -libedit -mcve -mhash -msql -mssql -ncurses -oci8 (-oci8-instant-client) -odbc -pcntl -pdo -postgres -qdbm -recode -reflection -sapdb -sharedext -sharedmem -solid -spell -sqlite -sybase -sybase-ct -sysvipc -tidy -wddx -xpm -xsl -yaz" 0 kB
Same here with dev-lang/php-5.2.10 and dev-lang/php-5.2.10-r1 in combination with dev-php5/suhosin-0.9.27, www-apache/mod_fcgid-2.2 and www-servers/apache-2.2.11-r1. I get messages like those in #4, with dev-php5/eaccelerator its more detailed: [notice] mod_fcgid: process *** exit(communication error), get unexpected signal 11 EACCELERATOR: PHP crashed on opline 527 of session_start() at ***:*** Both suggestions (downgrade to dev-lang/php-5.2.9-r2 or suhosin.session.encrypt = Off) seem to work. Also note that according to the link posted in the original report this should only affect (f)CGI-based systems.
Just curious, did you try rebuilding the extensions in question? (suhosin and/or eA)? If not, please do so. I'm not able to reproduce it atm and I haven't found anything new on the web (esp. on the debian bug). I quickly asked upstream, the tenor was "ea and suhosin poke the innards in a way that we cannot guarantee will not break at any time", so I guess we cannot expect a "fix" or workaround from upstream, unless we prove it is a php bug :( Let's hope for some news from the maintainers of the affected extensions, also, I might provide a php-5.2.10-r2 in a few days (once the php cvs -> svn conversion has completed) which reverts the huge ext/session change from 5.2.10.
Please try php-5.2.10-r2 from the php-testing overlay. It contains a patch which reverts ext/session to the state of php-5.2.9. This should just be used to track down the bug and to provide an intermediate solution (it's better using this version than reverting to 5.2.9 in completely). Hope this helps, please report back. As this is only a (possible) workaround and no solution, I'm leaving the bug open.
I had rebuilded all extensions, this didn't change anything. I've just tried with your -r2-ebuild, same issue (also with rebuilding extensions). Have you contacted Stefan Esser about the issue yet?
I can't try php-5.2.10-r2, the server is already in production, but with php-5.2.9. But the error appeared on a clean installed (hardened) machine. Not after updating for years.
I have 'segmentation fault' with php 5.2.10 using imap. I have no suhosin ext enabled. This is my use flag for php [ebuild R ] dev-lang/php-5.2.10 USE="apache2 berkdb bzip2 calendar cli crypt ctype curl dbase exif gd gdbm hash iconv imap json mysql mysqli ncurses nls pcre pdo readline reflection session simplexml soap sockets spell spl sqlite ssl tidy tokenizer truetype unicode xml xsl zlib (-adabas) -bcmath (-birdstep) -cdb -cgi -cjk -concurrentmodphp -curlwrappers -db2 (-dbmaker) -debug -discard-path -doc (-empress) (-empress-bcs) (-esoob) -fastbuild (-fdftk) -filter (-firebird) -flatfile -force-cgi-redirect (-frontbase) -ftp -gd-external -gmp -inifile -interbase -iodbc -ipv6 (-java-external) -kerberos -kolab -ldap -ldap-sasl -libedit -mcve -mhash -msql -mssql -oci8 -oci8-instant-client -odbc -pcntl -pic -posix -postgres -qdbm -recode -sapdb -sharedext -sharedmem -snmp (-solid) -suhosin (-sybase) (-sybase-ct) -sysvipc -threads -wddx -xmlreader -xmlrpc -xmlwriter -xpm -yaz -zip" 0 kB
Same issue with apache 2.2.11-r2, it does not matter whether it's built with suhosin or not (it's the first thing that i've tried to disable). USE Flags: dev-lang/php sharedmem snmp soap cli crypt iconv pcre libedit session spl zlib apache2 bcmath bzip2 calendar ctype curl exif ftp gd gmp hardenedphp hash imap mhash mysqli mysql posix simplexml sockets sqlite tidy truetype xml xmlreader xmlrpc xmlwriter xsl tokenizer filter suhosin json ldap pdo make.conf's optimization flags for GCC were disabled too to test if they're the issue, no effect: [Thu Jul 23 16:22:48 2009] [notice] Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.8k PHP/5.2.10-pl0-gentoo with Suhosin-Patch configured -- resuming normal operations [Thu Jul 23 16:23:06 2009] [notice] child pid 4607 exit signal Segmentation fault (11) [Thu Jul 23 16:23:15 2009] [notice] child pid 4609 exit signal Segmentation fault (11) [Thu Jul 23 16:23:17 2009] [notice] child pid 4611 exit signal Segmentation fault (11) The issue is easily reproduced with phpMyAdmin (just open random pages there, the segfaults will happen on a stable basis)
I was experiencing the same problem with phpMyAdmin, with suhosin enabled. I didn't try withouth suhosin, I simply downgraded to 5.2.9 and the segfaults went away.
I was able to create a stable (non-segfaulting) php 5.2.10 installation by disable the suhosin extension (I still have php's suhosin use flag enabled) and using -threads for php and apache (switching the apache MPM to prefork). Enabling either the suhosin extension or using the worker MPM causes PHP to segfault, or throw random, nonsense errors (such as syntax errors where there are none). www-servers/apache-2.2.11-r3 dev-lang/php-5.2.10-r1
You might be hitting an (incredibly stupid) APC bug, try putting suhosin.apc_bug_workaround = on into the suhosin conf file.. if that don't work, try with suhosin.session.encrypt = off
I hit the same bug, yet there are rumours in the debian bugtracker that it is solved in 0.9.28
I've committed suhosin 0.9.29 to the tree. Though the machine I saw this error is a production one, so I don't want to try out, can others please see if this fixes this bug?
As the most recent version apparently fixes these rather critical issues, which are happening with stable php, I guess we should stabilize this version. Arches, please test and mark stable: =dev-php5/suhosin-0.9.29 Target keywords : "alpha amd64 arm hppa ia64 ppc ppc64 s390 sh sparc x86"
same here, php-5.2.10 , apache-2.2.11-r2 , suhosin-0.9.27 appear very often with phpmyadmin I now try : php_flag suhosin.executor.disable_eval Off php_flag suhosin.apc_bug_workaround on before downgrading to php 5.2.9
x86 stable
Stable for HPPA.
alpha/arm/ia64/s390/sh/sparc stable
ppc stable
amd64 stable, mainly to be able to add the php dependency on suhosin per bug 276583
ppc64 done
amd64 stable as per comment #23, removing CC.
All arches done. Will be mentioned in GLSA for PHP bugs.