httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ryan Bloom" <>
Subject RE: how to debug worker mpm httpd with gdb?
Date Tue, 12 Mar 2002 23:06:13 GMT
> On Tue, Mar 12, 2002 at 06:21:27PM +0800, Stas Bekman wrote:
> > Any guidelines for debugging threaded (worker) mpm? I've read the
> > relevant gdb section, but it isn't enough. I couldn't find any
> > info in httpd-docs-2.0/manual/developer.
> >
> > I'm interested in tips making the debug process easier. Does anybody
> > have a cheatlist with useful tips/notes and willing to share it?
> <snip, snip>
> > During the first request yet another thread starts. And one of the
> > ones goes away.
> >
> > It seems that the newest thread is the one I need to attach to. But
> > I attach to it once, in a while I get switched to the previous
> > etc. This is very confusing and non-productive :(
> Yeah, well, I've maintained that worker doesn't have the right
> support for debugging.  Nobody else seems to agree with me.  =(
> AIUI (without placing words in anyone's mouth), it is that if you
> are using -X on worker, you want to debug the MPM *not* Apache.
> So, if you want to reliably test your code (i.e. a module), you
> should use the prefork MPM.  If you are using worker, you need to
> attach to the "right" worker thread and hope you get the right
> thread.  I've complained to the appropriate parties and they
> maintain their position is correct.  Whatever.  Feel free to
> join the complaint line.  Worker is useless in -X mode.

How would you fix this?  By having the worker MPM go into a single
threaded, single process mode with -X?  That won't actually solve the
problem, because the OS will still create the manager thread.  This is
just part of the pain of doing threaded debugging on Unix.


View raw message