2

In my apache error log im getting lines such as

[Wed Sep 21 16:51:14 2011] [notice] child pid 5414 exit signal Segmentation fault (11), possible coredump in /tmp/apache-cores/
[Wed Sep 21 17:04:15 2011] [notice] child pid 5558 exit signal Segmentation fault (11), possible coredump in /tmp/apache-cores/
[Wed Sep 21 17:04:16 2011] [notice] child pid 5508 exit signal Segmentation fault (11), possible coredump in /tmp/apache-cores/
[Wed Sep 21 17:50:47 2011] [notice] child pid 5892 exit signal Segmentation fault (11), possible coredump in /tmp/apache-cores/
[Wed Sep 21 17:50:48 2011] [notice] child pid 5880 exit signal Segmentation fault (11), possible coredump in /tmp/apache-cores/
[Wed Sep 21 17:51:31 2011] [notice] child pid 5965 exit signal Segmentation fault (11), possible coredump in /tmp/apache-cores/
[Wed Sep 21 17:51:32 2011] [notice] child pid 5955 exit signal Segmentation fault (11), possible coredump in /tmp/apache-cores/

I've set CoreDumpDirectory and got this as a result using gdb, but I'm not sure what it means or where I can go from here .

Core was generated by `/usr/sbin/apache2 -k start'.
    Program terminated with signal 11, Segmentation fault.
    [New process 5955]
    #0  0x000000000043f7e6 in ap_add_common_vars (r=0xa805a8)
        at /build/buildd-apache2_2.2.9-10+lenny11-amd64-vHbrzW/apache2-2.2.9/server/                                                                                        util_script.c:242
    242     /build/buildd-apache2_2.2.9-10+lenny11-amd64-vHbrzW/apache2-2.2.9/server                                                                                        /util_script.c: No such file or directory.
            in /build/buildd-apache2_2.2.9-10+lenny11-amd64-vHbrzW/apache2-2.2.9/ser                                                                                        ver/util_script.c
    (gdb) bt
    #0  0x000000000043f7e6 in ap_add_common_vars (r=0xa805a8)
        at /build/buildd-apache2_2.2.9-10+lenny11-amd64-vHbrzW/apache2-2.2.9/server/util_script.c:242
    #1  0x00007faac8643459 in php_handler (r=0xa99ae0)
        at /tmp/buildd/php5-5.2.6.dfsg.1/sapi/apache2handler/sapi_apache2.c:586
    #2  0x0000000000438f73 in ap_run_handler (r=0xa805a8)
        at /build/buildd-apache2_2.2.9-10+lenny11-amd64-vHbrzW/apache2-2.2.9/server/config.c:159
    #3  0x000000000043c53f in ap_invoke_handler (r=0xa805a8)
        at /build/buildd-apache2_2.2.9-10+lenny11-amd64-vHbrzW/apache2-2.2.9/server/config.c:373
    #4  0x0000000000449590 in ap_internal_redirect (new_uri=,
        r=)
        at /build/buildd-apache2_2.2.9-10+lenny11-amd64-vHbrzW/apache2-2.2.9/modules/http/http_request.c:477
    #5  0x00007faac7b6eb95 in handler_redirect (r=0xa9b2d8)
        at /build/buildd-apache2_2.2.9-10+lenny11-amd64-vHbrzW/apache2-2.2.9/modules/mappers/mod_rewrite.c:4829
    #6  0x0000000000438f73 in ap_run_handler (r=0xa9b2d8)
        at /build/buildd-apache2_2.2.9-10+lenny11-amd64-vHbrzW/apache2-2.2.9/server/config.c:159
    #7  0x000000000043c53f in ap_invoke_handler (r=0xa9b2d8)
        at /build/buildd-apache2_2.2.9-10+lenny11-amd64-vHbrzW/apache2-2.2.9/server/---Type  to continue, or q  to quit---
    config.c:373
    #8  0x000000000044972e in ap_process_request (r=0xa9b2d8)
        at /build/buildd-apache2_2.2.9-10+lenny11-amd64-vHbrzW/apache2-2.2.9/modules/http/http_request.c:258
    #9  0x0000000000446858 in ap_process_http_connection (c=0xa795c8)
        at /build/buildd-apache2_2.2.9-10+lenny11-amd64-vHbrzW/apache2-2.2.9/modules/http/http_core.c:190
    #10 0x0000000000440493 in ap_run_process_connection (c=0xa795c8)
        at /build/buildd-apache2_2.2.9-10+lenny11-amd64-vHbrzW/apache2-2.2.9/server/connection.c:43
    #11 0x000000000044e3d0 in child_main (child_num_arg=)
        at /build/buildd-apache2_2.2.9-10+lenny11-amd64-vHbrzW/apache2-2.2.9/server/mpm/prefork/prefork.c:680
    #12 0x000000000044e724 in make_child (s=0x676968, slot=11)
        at /build/buildd-apache2_2.2.9-10+lenny11-amd64-vHbrzW/apache2-2.2.9/server/mpm/prefork/prefork.c:777
    #13 0x000000000044f366 in ap_mpm_run (_pconf=,
        plog=, s=)
        at /build/buildd-apache2_2.2.9-10+lenny11-amd64-vHbrzW/apache2-2.2.9/server/mpm/prefork/prefork.c:912
    #14 0x0000000000425be5 in main (argc=3, argv=0x7fff79e8fd68)
        at /build/buildd-apache2_2.2.9-10+lenny11-amd64-vHbrzW/apache2-2.2.9/server/main.c:732

Jack
  • 131
  • 1
  • 6

2 Answers2

2
#1  0x00007faac8643459 in php_handler (r=0xa99ae0)
        at /tmp/buildd/php5-5.2.6.dfsg.1/sapi/apache2handler/sapi_apache2.c:586

Looks like a bug. You should update PHP to version 5.3.3-7 and try again.

quanta
  • 50,327
  • 19
  • 152
  • 213
1

I've provided a hackish-workaround for a segfaulting apache here: Advice for Debugging Apache with PHP Segmentation Faults

But yes, the other responder is right. You should upgrade PHP, and/or apache. You should be aware about the changes between php 5.2.x and php 5.3.x, some of them will probably require you to change your code.

Kirrus
  • 482
  • 2
  • 11