httpd-docs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Orton <>
Subject [PATCH] site: more debugging tips
Date Mon, 05 Sep 2005 12:53:12 GMT
After getting bored with writing these into bugzilla for the umpteenth 
time, does this look OK?

Index: xdocs/dev/debugging.xml
--- xdocs/dev/debugging.xml	(revision 278729)
+++ xdocs/dev/debugging.xml	(working copy)
@@ -18,6 +18,7 @@
 <li><a href="#gdb">Using <code>gdb</code></a></li>
 <li><a href="#backtrace">Getting a live backtrace</a></li>
+<li><a href="#crashes">Debugging intermittent crashes</a></li>
 <li><a href="#truss">Using '<code>truss/trace/strace</code>' to
     trace system calls and signals</a></li>
 <li><a href="#gcore">Getting the server to dump core</a></li>
@@ -221,6 +222,70 @@
+<section id="crashes">
+<title>Debugging intermittent crashes</title>
+<p>For situations where a child process is crashing intermittently,
+the server must be configured and started such that it produces core
+dumps which can analyzed later.</p>
+<p>To ensure that a core dump can be written to a directory which is
+writable by the user which child processes run as (such as
+<code>apache</code>), the <a
+directive must be added to <code>httpd.conf</code>; for example:</p>
+   CoreDumpDirectory /tmp
+<p>Before starting up the server, any process limits on core dump file
+size must be lifted; for example:</p>
+  # ulimit -c unlimited
+  # apachectl start
+<p>On some platforms, further steps might be needed to enable core
+dumps; see <a href="#sol27">Solaris 2.7 and coredumps</a> below.</p>
+<p>When a child process crashes, a message will be logged to the
+error_log like the following:</p>
+[Mon Sep 05 13:35:39 2005] [notice] child pid 2027 exit signal Segmentation fault (11), possible
coredump in /tmp
+<p>if the text "possible coredump in /tmp" does not appear in the
+error line, check that the ulimit was set correctly and that the
+permissions on the configured <code>CoreDumpDirectory</code> are
+<p>To analyse the core dump, pass the core dump filename on the gdb
+command-line, and enter the command <code>bt full</code> at the gdb
+  % <b>gdb /usr/local/apache2/bin/httpd /tmp/core.2027</b>
+  ...
+  Core was generated by `/usr/local/apache2/bin/httpd -k start'
+  ...
+  (gdb) <b>bt full</b>
+<p>if attempting to debug a threaded server, such as using the
+<code>worker</code> MPM, use the following gdb command:</p>
+  (gdb) <b>thread apply all bt full</b>
+<p>this will produce a backtrace for each of the threads within the
 <section id="truss">
 <title>Using 'truss/trace/strace' to trace system calls and 

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message