[php-maint] Bug#549492: php5-cgi causes segmention fault (fix)

Vincent Caron vcaron at bearstech.com
Mon Nov 2 20:57:02 UTC 2009


On Fri, 2009-10-30 at 12:11 +0100, Micha Lenk wrote:
> Hi Vincent,
> 
> Vincent Caron wrote:
> >   I have been able to suppress all my php5-cgi segfaults, I simply
> > installed the 'php5-suhosin' package, reloaded Apache, and done (Lenny
> > AMD64, up-to-date).
> 
> After having read your comment I've installed php5-suhosin on my server
> too (Lenny, AMD64, up-to-date), but still got today some php5-cgi
> segmentation faults:
> 
> Oct 30 11:21:28 kunden-www kernel: [410275.967073] php-cgi[8559]:
> segfault at 7f0d4adc7ed0 ip 7f0d4adc7ed0 sp 40a38128 error 14 in
> libltdl.so.3.1.6[7f0d4b37d000+7000]
> Oct 30 11:21:28 kunden-www kernel: [410276.004976] php-cgi[8560]:
> segfault at 7fd44433ded0 ip 7fd44433ded0 sp 423d3128 error 14 in
> libpam.so.0.81.12[7fd444d03000+b000]
> 
> Are the segmentation faults I experience something different? How can I
> find out?

  I don't really know. I can give more details on how I got a stack
trace from gdb on a production server, using Apache2 + mod_fcgid and
php5-cgi (with no disturbance):

  # aptitude install php5-dbg

  I use the 'FCGIWrapper /usr/local/bin/php5-fcgi .php' directivein my
Apache conf and this wrapper looks like:

  #!/bin/sh
  export PHP_FCGI_CHILDREN=0
  export PHP_FCGI_MAX_REQUESTS=10000
  gdb -x /tmp/run /usr/bin/php5-cgi 2>&1 | logger -t php5-cgi
-puser.info

  Where /tmp/run is a dumb script to make gdb automatically run,
backtrace, then quit:

  # cat /tmp/run 
  run
  bt
  quit

  Output appears in /var/log/user.log.







More information about the pkg-php-maint mailing list