httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tyler MacDonald <>
Subject Re: Surviving restarts
Date Wed, 06 Jun 2007 17:53:38 GMT
C├ęsar Leonardo Blum Silveira <> wrote:
> The thing is, I don't know if it's a segfault, but I'm almost sure it
> is. When I do a restart, Apache just dies.

  If it's a segmentation fault, your apache error_log will say so.

> I don't know how to use gdb with Apache. How can I know which process
> is going to serve my next request??

  You can't. If you want to debug a problem with a request, you're better
off running "httpd -X" to test the request single-threaded.

  However, if you want to test problems with a restart, you have two
choices, depending on where the problem lies: You can attach to a child
process that you're reasonably sure is going to have the problem. Or, if the
master process is crashing as well, attach to that one. 

  Really really over-simplified "gdb with apache" instructions:

  To "attach", just do something like

  gdb /usr/sbin/httpd 1234

  replaceing "1234" with the process-id you want to attach to.. then issue a
"continue" statement, crash your module, and when it crashes, run "bt" to
get a backtrace.


View raw message