Return-Path: Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 92173 invoked by uid 500); 12 Mar 2002 23:49:25 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 92160 invoked from network); 12 Mar 2002 23:49:24 -0000 Date: Tue, 12 Mar 2002 15:49:31 -0800 From: "'Justin Erenkrantz'" To: Ryan Bloom Cc: dev@httpd.apache.org Subject: Re: how to debug worker mpm httpd with gdb? Message-ID: <20020312234931.GL23535@ebuilt.com> Mail-Followup-To: 'Justin Erenkrantz' , Ryan Bloom , dev@httpd.apache.org References: <20020312233720.GK23535@ebuilt.com> <002b01c1ca1b$b7be3bf0$c900000a@KOJ> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <002b01c1ca1b$b7be3bf0$c900000a@KOJ> User-Agent: Mutt/1.5.0i X-AntiVirus: scanned for viruses by AMaViS 0.2.1-pre3 (http://amavis.org/) X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N On Tue, Mar 12, 2002 at 03:14:52PM -0800, Ryan Bloom wrote: > 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. Correct which is the argument made why the MPM is doing the right thing now. My take is that there are two potential "debuggers" types - our module writers and our MPM/thread experts. I'd prefer we default to a mode that is beneficial to the module writers (one worker thread only), and add another mode (say -DTHREAD_DEBUG - name sucks) which allows the worker MPM to create its normal amount of threads even though it is only using ONE_PROCESS. I think there will be far more people attempting to debug their modules than our MPM. > Also, on a platform like Linux, reducing to two threads really doesn't > help anything, because the debuggers suck at dealing with threads. Recent gdbs are much better at threads in Linux. > 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. Well, yeah, I'd like a nice debugger too. I'm a poor college student, so I don't see that happening anytime soon unless gdb gets an infusion of support. =) -- justin