• Home »
  • Errors »
  • Apache: [notice] child pid 27609 exit signal Segmentation fault (11)

Apache: [notice] child pid 27609 exit signal Segmentation fault (11)

After modify some Perl modules with CPAN I started getting the below errors in the Apache error_log.

Errors:
[Sun Jul 12 14:15:03 2009] [notice] child pid 4329 exit signal Segmentation fault (11)
[Sun Jul 12 14:15:27 2009] [notice] child pid 4331 exit signal Segmentation fault (11)
[Sun Jul 12 14:15:30 2009] [notice] child pid 5065 exit signal Segmentation fault (11)
[Sun Jul 12 14:15:31 2009] [notice] child pid 4339 exit signal Segmentation fault (11)
[Sun Jul 12 14:15:48 2009] [notice] child pid 10111 exit signal Segmentation fault (11)
[Sun Jul 12 14:15:48 2009] [notice] child pid 4325 exit signal Segmentation fault (11)

Upon investigation I realized I needed to have Apache write core files for each Segmentation fault. To have Apache write core files add the CoreDumpDirectory option to the httpd.conf file. When adding this option you need to specifiy a directory so create a directory in /tmp and make sure the web server can write to it using the below syntax.

Create Core File Directory:

mkdir /tmp/apache-cores
chown apache.apache /tmp/apache-cores
chmod 777 /tmp/apache-cores

Now restart Apache, sit back, and wait for the segmentation faults to occur again. Once they do use gdb to read the output of the core files as shown below.

Read Apache Core Dumps With gdb:

gdb /usr/sbin/httpd /tmp/apache-cores/core.12030

Once the core file is loaded into gdb you will come to a prompt like the below.

gdb Prompt:

(gdb)

Type in “where” at the prompt followed by enter. This will spit out the contents of the core file similar to the below.

Apache Core File Output With gdb:

(gdb) where
#0  0x05519e35 in ?? () from /etc/httpd/modules/libphp5.so
#1  0x05531f9a in ?? () from /etc/httpd/modules/libphp5.so
#2  0x05526678 in ?? () from /etc/httpd/modules/libphp5.so
#3  0x0553c777 in zend_do_free () from /etc/httpd/modules/libphp5.so
#4  0x05531f90 in ?? () from /etc/httpd/modules/libphp5.so
#5  0x05526678 in ?? () from /etc/httpd/modules/libphp5.so
#6  0x0553c419 in zend_do_add_variable () from /etc/httpd/modules/libphp5.so
#7  0x0553c697 in zend_do_fetch_class () from /etc/httpd/modules/libphp5.so
#8  0x05526e15 in ?? () from /etc/httpd/modules/libphp5.so
#9  0x05532893 in ?? () from /etc/httpd/modules/libphp5.so
#10 0x054ef443 in zif_proc_get_status () from /etc/httpd/modules/libphp5.so
#11 0x055b53bc in ?? () from /etc/httpd/modules/libphp5.so
#12 0x00801a0d in ap_run_handler () from /usr/sbin/httpd
#13 0x008053b8 in ap_invoke_handler () from /usr/sbin/httpd
#14 0x008114ae in ap_process_request () from /usr/sbin/httpd
#15 0x0080e24f in ?? () from /usr/sbin/httpd
#16 0x008098ed in ap_run_process_connection () from /usr/sbin/httpd
#17 0x008099ec in ap_process_connection () from /usr/sbin/httpd
#18 0x00815e54 in ?? () from /usr/sbin/httpd
#19 0x00816161 in ?? () from /usr/sbin/httpd
#20 0x00816b63 in ap_mpm_run () from /usr/sbin/httpd
#21 0x007ed157 in main () from /usr/sbin/httpd

I don’t know much about gdb but the output seemed to indicate the issue was related to the libphp5.so module. Instead of getting deep into troubleshooting PHP modules and the specific error I decided that upgrading PHP would hopefully resolve the issue which I explain how to do here. It appears to have done the trick.

Apache Security (Paperback)

By (author): Ivan Ristic


List Price: $34.95 USD
New From: $85.29 USD In Stock
Used from: $10.76 USD In Stock


List Price: $14.99 USD
New From: $7.65 USD In Stock
Used from: $5.34 USD In Stock

Share