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 relevant 
> 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 old 
> ones goes away.
> 
> It seems that the newest thread is the one I need to attach to. But when 
> I attach to it once, in a while I get switched to the previous thread, 
> 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.

> Any ideas how to tell gdb not to resolve so's automatically and still 
> have threads working?

Don't have an idea about this, but I'd make sure you are running
the latest gdb version (5.1.1?).  I've found that the threading
support was much improved from 4.x->5.x.  -- justin

Reply via email to