[php-maint] Bug#520128: php5 segfaulting - unknown cause

Simon Waters simon at technocool.net
Tue Mar 17 15:59:12 UTC 2009


Package: php5
Version: 5.2.6.dfsg.1-1+lenny2
Severity: normal


We have a web server providing shared hosting and using PHP5.

It was upgraded from Debian Sarge via Etch, to Lenny recently, at which point it switched to using the
Debian stock PHP5 packages (from dotdeb).

Since the upgrade to Lenny /var/log/kern.log reports errors like these below:

Mar 17 00:21:50 bannerman kernel: [1734694.376460] php5[12943]: segfault at b73ace90 ip b73ace90 sp b73123ac error 4
Mar 17 10:33:09 bannerman kernel: [1777900.035469] php5[31167]: segfault at b7380e90 ip b7380e90 sp b72e63ac error 4
Mar 17 10:33:09 bannerman kernel: [1777900.097567] php5[31172]: segfault at b735ae90 ip b735ae90 sp b72c03ac error 4
Mar 17 11:15:55 bannerman kernel: [1780900.194070] php5[1956]: segfault at b7393e90 ip b7393e90 sp b72f93ac error 4
Mar 17 12:07:21 bannerman kernel: [1784532.661333] php5[5707]: segfault at b7367e90 ip b7367e90 sp b72cd3ac error 4
Mar 17 12:10:18 bannerman kernel: [1784730.423855] php5[5935]: segfault at b73c4e90 ip b73c4e90 sp b732a3ac error 4 in libXdmcp.so.6.0.0[b756c000+4000]
Mar 17 12:34:38 bannerman kernel: [1786325.239402] php5[7494]: segfault at b7311eae ip b77c33cf sp b72770b8 error 4 in libgcc_s.so.1[b77bc000+c000]
Mar 17 12:56:44 bannerman kernel: [1787722.617181] php5[9157]: segfault at b7326eae ip b77e33cf sp b728c0b8 error 4 in libgcc_s.so.1[b77dc000+c000]
Mar 17 12:57:50 bannerman kernel: [1787791.566056] php5[9200]: segfault at b732aeae ip b77dc3cf sp b72900b8 error 4 in libgcc_s.so.1[b77d5000+c000]
Mar 17 13:06:51 bannerman kernel: [1788346.584255] php5[10160]: segfault at b73c8eae ip b6b283cf sp b732e0b8 error 4 in libgcc_s.so.1[b6b21000+c000]
Mar 17 14:08:17 bannerman kernel: [1792271.934516] php5[15318]: segfault at b73c2e90 ip b73c2e90 sp b73283ac error 4
Mar 17 14:13:18 bannerman kernel: [1792595.928153] php5[15813]: segfault at b73c9e90 ip b73c9e90 sp b732f3ac error 4 in libXdmcp.so.6.0.0[b7571000+4000]
Mar 17 14:14:13 bannerman kernel: [1792654.308685] php5[15900]: segfault at b73a6e90 ip b73a6e90 sp b730c3ac error 4
Mar 17 14:26:14 bannerman kernel: [1793440.305320] php5[17196]: segfault at b7385eae ip b78373cf sp b72eb0b8 error 4 in libgcc_s.so.1[b7830000+c000]
Mar 17 14:27:05 bannerman kernel: [1793495.373920] php5[17264]: segfault at b7383e90 ip b7383e90 sp b72e93ac error 4
Mar 17 14:32:54 bannerman kernel: [1793876.853796] php5[17771]: segfault at b7334e90 ip b7334e90 sp b729a3ac error 4 in libXdmcp.so.6.0.0[b74dc000+4000]
Mar 17 15:04:14 bannerman kernel: [1795805.673468] php5[20853]: segfault at b73b5e90 ip b73b5e90 sp b731b3ac error 4
Mar 17 15:05:41 bannerman kernel: [1795895.647003] php5[21028]: segfault at b7327eae ip b77e43cf sp b728d0b8 error 4 in libgcc_s.so.1[b77dd000+c000]
Mar 17 15:13:13 bannerman kernel: [1796371.494733] php5[21878]: segfault at b7304e90 ip b7304e90 sp b726a3ac error 4
Mar 17 15:15:02 bannerman kernel: [1796489.420244] php5[22172]: segfault at b7379e90 ip b7379e90 sp b72df3ac error 4
Mar 17 15:16:14 bannerman kernel: [1796565.944645] php5[22287]: segfault at b73cceae ip b6b2c3cf sp b73320b8 error 4 in libgcc_s.so.1[b6b25000+c000]
Mar 17 15:16:22 bannerman kernel: [1796574.786077] php5[22313]: segfault at b72cfeae ip b6a2f3cf sp b72350b8 error 4 in libgcc_s.so.1[b6a28000+c000]
Mar 17 15:21:53 bannerman kernel: [1796933.754525] php5[23016]: segfault at b7320eae ip b6a803cf sp b72860b8 error 4 in libgcc_s.so.1[b6a79000+c000]
Mar 17 15:22:29 bannerman kernel: [1796971.494746] php5[23121]: segfault at b73c7e90 ip b73c7e90 sp b732d3ac error 4 in libXdmcp.so.6.0.0[b756f000+4000]

The installation has a fair amount of history including 3rd party PHP5 packages before lenny. 

I'd anticpated that the upgrade to lenny would have cleared out most PHP5 issues, as all previously installed PHP5 packages were removed as part of the upgrade procedure we followed, and then reinstalled. Although most configuration data in /etc/php5 was preserved.

Similar bug report suggests stale libraries in /usr/local/lib/ can cause segfaults - the only PHP related code in that folder is the ioncube loader, which reports itself to be installed correctly, and works (i.e. ioncube encoded files are decoded and executed as expected using v5.2 of the loader).

I've been unable to correlate the segfault errors in /var/log/kern.log with any particular set of http requests, so I'm unsure
how to progress troubleshooting at this point since I don't have a reproducible case (or a discernable problem!).

I've installed php5-dbg when troubleshooting this previously.

Since I can't correlate the error message with any specific fault, I've marked the bug as minor. However I appreciate that segfaulting in php5 may reflect a more serious underlying bug (or misconfiguration).

Various troubleshooting guides suggest removing modules from php configuration, and seeing if the issue is corrected, but without a test case this would require running the server without major functionality for extended periods which isn't acceptable.

I have an (almost) identically configured server that produced the same errors (when it was live) which can be made accessible to trusted parties (i.e. Package maintainers or relevant DDs), although obviously it doesn't receive any traffic, and the error doesn't occur routinely when the server is idle.

# dpkg -l | grep php5
ii  libapache2-mod-php5                          5.2.6.dfsg.1-1+lenny2      server-side, HTML-embedded scripting languag
ii  php5                                         5.2.6.dfsg.1-1+lenny2      server-side, HTML-embedded scripting languag
ii  php5-cgi                                     5.2.6.dfsg.1-1+lenny2      server-side, HTML-embedded scripting languag
ii  php5-cli                                     5.2.6.dfsg.1-1+lenny2      command-line interpreter for the php5 script
ii  php5-common                                  5.2.6.dfsg.1-1+lenny2      Common files for packages built from the php
ii  php5-dbg                                     5.2.6.dfsg.1-1+lenny2      Debug symbols for PHP5
ii  php5-gd                                      5.2.6.dfsg.1-1+lenny2      GD module for php5
ii  php5-mysql                                   5.2.6.dfsg.1-1+lenny2      MySQL module for php5


-- System Information:
Debian Release: 5.0
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.26-1-686 (SMP w/4 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages php5 depends on:
ii  libapache2-mod-php 5.2.6.dfsg.1-1+lenny2 server-side, HTML-embedded scripti
ii  php5-cgi           5.2.6.dfsg.1-1+lenny2 server-side, HTML-embedded scripti
ii  php5-common        5.2.6.dfsg.1-1+lenny2 Common files for packages built fr

php5 recommends no packages.

php5 suggests no packages.

-- no debconf information





More information about the pkg-php-maint mailing list