Segfaults in apache2 with libapache2-mod-php5 installed

Bug #418897 reported by Pehr Söderman
34
This bug affects 4 people
Affects Status Importance Assigned to Milestone
php5 (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: php5

Karmic, latest from aptitude.

[Tue Aug 25 23:18:12 2009] [notice] Apache/2.2.12 (Ubuntu) DAV/2 SVN/1.6.1 PHP/5.2.10-2ubuntu2 with Suhosin-Patch mod_python/3.3.1 Python/2.6.2+ configured -- resuming
[Tue Aug 25 23:18:33 2009] [notice] child pid 17627 exit signal Segmentation fault (11)
[Tue Aug 25 23:18:36 2009] [notice] child pid 17628 exit signal Segmentation fault (11)
[Tue Aug 25 23:18:40 2009] [notice] child pid 17629 exit signal Segmentation fault (11)
[Tue Aug 25 23:18:41 2009] [notice] child pid 17630 exit signal Segmentation fault (11)
[Tue Aug 25 23:19:31 2009] [notice] child pid 17634 exit signal Segmentation fault (11)
[Tue Aug 25 23:20:21 2009] [notice] child pid 17637 exit signal Segmentation fault (11)
...

And so it continues. Fresh install of apache2. The following packages that are relevant are installed:

libapache2-mod-php5 (5.2.10.dfsg.1-2ubuntu2)
php5 (5.2.10.dfsg.1-2ubuntu2)
php5-common (5.2.10.dfsg.1-2ubuntu2)
php5-suhosin ( 0.9.27-1)
php5-pgsql ( 5.2.10.dfsg.1-2ubuntu2)

Segmentation faults seems to be generated both regularly and triggered by loading php pages.

Revision history for this message
Michael Phillips (michael-j-phillips) wrote :

I can confirm this as well. Every PHP application fails randomly under Karmic with this.

[Fri Sep 04 08:13:28 2009] [notice] child pid 19059 exit signal Segmentation fault (11)
[Fri Sep 04 08:13:40 2009] [notice] child pid 19060 exit signal Segmentation fault (11)
[Fri Sep 04 08:13:40 2009] [notice] child pid 19061 exit signal Segmentation fault (11)
[Fri Sep 04 08:19:17 2009] [notice] child pid 19063 exit signal Segmentation fault (11)
[Fri Sep 04 08:19:19 2009] [notice] child pid 19064 exit signal Segmentation fault (11)
[Fri Sep 04 08:19:19 2009] [notice] child pid 19129 exit signal Segmentation fault (11)
[Fri Sep 04 08:19:21 2009] [notice] child pid 19154 exit signal Segmentation fault (11)
[Fri Sep 04 08:19:22 2009] [notice] child pid 19155 exit signal Segmentation fault (11)
[Fri Sep 04 08:19:23 2009] [notice] child pid 19062 exit signal Segmentation fault (11)
[Fri Sep 04 08:19:23 2009] [notice] child pid 19156 exit signal Segmentation fault (11)

uname -a
Linux mphill-desktop 2.6.31-9-generic #29-Ubuntu SMP Sun Aug 30 17:39:26 UTC 2009 x86_64 GNU/Linux

php -m
[PHP Modules]
bcmath
bz2
calendar
ctype
curl
date
dba
dom
exif
filter
ftp
gd
gettext
hash
iconv
interbase
json
ldap
libxml
mbstring
mcrypt
mime_magic
mssql
mysql
mysqli
ncurses
odbc
openssl
pcntl
pcre
PDO
pdo_dblib
pdo_mysql
PDO_ODBC
pdo_pgsql
pdo_sqlite
pgsql
posix
readline
Reflection
session
shmop
SimpleXML
soap
sockets
SPL
SQLite
standard
suhosin
sysvmsg
sysvsem
sysvshm
tokenizer
wddx
XCache
xml
xmlreader
xmlwriter
zip
zlib

[Zend Modules]
XCache

apache modules
alias auth_basic authn_file authz_default authz_groupfile authz_host authz_user autoindex cgi dir env mime negotiation php5 setenvif status

Revision history for this message
Michael Phillips (michael-j-phillips) wrote :

I upped my ram for the PHP process too 64MB, it seems to have helped.

Revision history for this message
Ash (ashleyf) wrote :

I experience exactly the same problem.

Workaround fix is:

Edit file /etc/php5/apache2/conf.d/suhosin.ini

Add/change line to read: suhosin.session.encrypt=off

You may also need to edit file /etc/php5/conf.d/suhosin.ini if it is not just a symlink to the first one, or vice versa.

Probably same issue as mentioned here https://bugs.launchpad.net/bugs/424789

Revision history for this message
Richard Harding (rharding) wrote :

Just to verify the workaround above of disabling the session encryption seems to be working so far.

Changed in php5 (Ubuntu):
status: New → Confirmed
Revision history for this message
Chuck Short (zulcss) wrote :

This should be fixed now with the updated php5-suhoshin in the archive now. Thanks again for the bug report.

Regards
chuck

Changed in php5 (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Gerry Patterson (gpatters) wrote :

Hi All,

I am still seeing the above error after adding the line to suhosin.ini (only one file as the other is a link to the same one). I am seeing errors in /var/log/apache2/error.log such as:

[Tue Dec 15 11:50:24 2009] [notice] child pid 6064 exit signal Segmentation fault (11)
[Tue Dec 15 11:50:24 2009] [notice] child pid 6065 exit signal Segmentation fault (11)

with blank pages appearing in the browser. I have tried removing php5-suhosin package, restarting apache2, editing config files, restarting apache2.... Nothing appears to work. The report seems to indicate this is fixed in the latest available packages. I have performed apt-get update && apt-get upgrade. All packages are reported to be up to date.

Am I missing something?

Best Regards,

- Gerry

Revision history for this message
pawciobiel (pawciobiel) wrote :
Download full text (8.3 KiB)

Just to confirm, I got the same issue but it looks like it is not related to php5-suhosin.

$ dpkg -l | grep apache
ii apache2 2.2.12-1ubuntu2.1
Apache HTTP Server metapackage
ii apache2-mpm-prefork 2.2.12-1ubuntu2.1
Apache HTTP Server - traditional non-threade
ii apache2-utils 2.2.12-1ubuntu2.1
utility programs for webservers
ii apache2.2-bin 2.2.12-1ubuntu2.1
Apache HTTP Server common binary files
ii apache2.2-common 2.2.12-1ubuntu2.1
Apache HTTP Server common files
rc libapache2-mod-perl2 2.0.4-5ubuntu1
Integration of perl with the Apache2 web ser
ii libapache2-mod-php5 5.2.10.dfsg.1-2ubuntu6.3
server-side, HTML-embedded scripting languag

======================================================
$apache2 -e debug
[Wed Jan 13 08:26:59 2010] [debug] mod_so.c(246): loaded module
actions_module
[Wed Jan 13 08:26:59 2010] [debug] mod_so.c(246): loaded module
alias_module
[Wed Jan 13 08:26:59 2010] [debug] mod_so.c(246): loaded module
auth_basic_module
[Wed Jan 13 08:26:59 2010] [debug] mod_so.c(246): loaded module
authn_file_module
[Wed Jan 13 08:26:59 2010] [debug] mod_so.c(246): loaded module
authz_default_module
[Wed Jan 13 08:26:59 2010] [debug] mod_so.c(246): loaded module
authz_groupfile_module
[Wed Jan 13 08:26:59 2010] [debug] mod_so.c(246): loaded module
authz_host_module
[Wed Jan 13 08:26:59 2010] [debug] mod_so.c(246): loaded module
authz_user_module
[Wed Jan 13 08:26:59 2010] [debug] mod_so.c(246): loaded module
autoindex_module
[Wed Jan 13 08:26:59 2010] [debug] mod_so.c(246): loaded module
cgi_module
[Wed Jan 13 08:26:59 2010] [debug] mod_so.c(246): loaded module
dir_module
[Wed Jan 13 08:26:59 2010] [debug] mod_so.c(246): loaded module
env_module
[Wed Jan 13 08:26:59 2010] [debug] mod_so.c(246): loaded module
include_module
[Wed Jan 13 08:26:59 2010] [debug] mod_so.c(246): loaded module
mime_module
[Wed Jan 13 08:26:59 2010] [debug] mod_so.c(246): loaded module
negotiation_module
[Wed Jan 13 08:26:59 2010] [debug] mod_so.c(246): loaded module
php5_module
[Wed Jan 13 08:26:59 2010] [debug] mod_so.c(246): loaded module
setenvif_module
[Wed Jan 13 08:26:59 2010] [debug] mod_so.c(246): loaded module
status_module
[Wed Jan 13 08:26:59 2010] [debug] mod_so.c(246): loaded module
vhost_alias_module

=========================================================

$/usr/sbin/apache2 -X
Segmentation fault

=========================================================
$uname -a
Linux pc1477 2.6.31-17-generic #54-Ubuntu SMP Thu Dec 10 16:20:31 UTC
2009 i686 GNU/Linux

=======================================================
$lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 9.10
Release: 9.10
Codename: karmic
==========================================================
$ldd /usr/sbin/apache2
 linux-gate.so.1 => (0x00852000)
 libpcre.so.3 => /lib/libpcre.so.3 (0x00878000)
 libaprutil-1.so.0 => /usr/lib/libaprutil-1.so.0 (0x00d13000)
 libapr-1.so.0 => /usr/lib/libapr-1.so.0 (0x004f2000)
 libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0x00a1a000)
 libc.so.6 => /l...

Read more...

Revision history for this message
pawciobiel (pawciobiel) wrote :

After upgrading to libapache2-mod-php5 5.2.10.dfsg.1-2ubuntu6.4 it started to work, at least for me.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.