> On Tue, Mar 12, 2002 at 03:06:13PM -0800, Ryan Bloom wrote:
> > 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.
> >
> 
> -X should only create two threads: the manager thread and a single
> worker thread.  However, IIRC, it'll create ThreadsPerChild for that
> one process.  It should limit itself to just one worker thread.
> 
> By limiting us to two httpd-created threads, it should be somewhat
> easier for the debugger/user to determine which thread they should
> attach to.  IMHO, the current solution of creating one process with
> a normal amount of workers isn't very nice.  -- justin

Okay, but creating two threads won't solve the problem, and it may
actually hinder people from using -X to debug thread related problems.
The hardest part of debugging threaded code, is that the threads
interact.  By artificially limiting the number of threads, you are
effectively removing the ability to debug thread interaction problems.

Also, on a platform like Linux, reducing to two threads really doesn't
help anything, because the debuggers suck at dealing with threads.

What you really want is a good debugger, which will allow you to set a
breakpoint, and the debugger will switch to the right thread when the
breakpoint is hit.

Ryan


Reply via email to