Debugging an apache segfault


Enter Your Query:
Use '%' for wildcards and quotes for "exact phrases"


Top Level » Apache Related Information

Debugging an apache segfaultLast Modified: Aug 8, 2017, 12:32 am
Debugging Apache segfaults can be tricky, in an attempt to find out which module may be causing it.
You might see something like this in the /var/log/httpd/error_log:

[Mon Aug 07 23:56:18.309463 2017] [core:notice] [pid 17630] AH00052: child pid 18187 exit signal Aborted (6)

  1. You can debug it using the gdb option, like this:

    service httpd stop
    gdb /usr/sbin/httpd

    and quickly (before the dataskq starts it up again), run:

    run -X -d /etc/httpd

    which should let you trigger one request in the foreground, so do it quickly, before any other connections arrive to your server.
  2. Hopefully this has triggered your segfault, in which case it might show:

    Thread 1 "httpd" received signal SIGABRT, Aborted.

    along with other info about exactly where it crashed.
  3. To see more details about the function tree used to get to that point, call a backtrace like this:

    bt full

    which should give you the list of functions called, where it started lower down, and ended at the top of the output.   Somewhere in there might show you which module triggered it.
  4. To quit gdb, just run:

    quit

2003 JBMC Software, Suite 173  3-11 Bellerose Drive, St Albert, AB  T8N 1P7  Canada.  Mon-Fri 9AM-5PM MST