Return-Path: Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 67339 invoked by uid 500); 28 Jun 2001 15:29:36 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 67205 invoked from network); 28 Jun 2001 15:29:13 -0000 Subject: Re: Possible race condition in pools WAS: RE: Thoughts on locks From: Ian Holsman To: Justin Erenkrantz Cc: Brian Pane , dev@apr.apache.org In-Reply-To: <20010627223224.K26239@ebuilt.com> References: <3B3A9A81.2040306@pacbell.net> <20010627223224.K26239@ebuilt.com> Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Evolution/0.10.99 (Preview Release) Date: 28 Jun 2001 08:28:41 -0700 Message-Id: <993742121.26438.0.camel@griffon.cnet.com> Mime-Version: 1.0 X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N On 27 Jun 2001 22:32:24 -0700, Justin Erenkrantz wrote: > On Wed, Jun 27, 2001 at 07:46:25PM -0700, Brian Pane wrote: > > Assuming that fixing it with code would mean adding a lock around > > that block in apr_palloc, I submit that fixing it with documentation > > is the better option. Given how much slower the threaded MPM is > > than the prefork one right now, I think that adding more mutex overhead > > would be bad. :-( > > Well, as Aaron has constantly told me, "It isn't the mutex that is slow, > it is the code between the acquiring and the releasing of the mutex." > IMHO, he's right on the money in this case. (It's the fact that we're > doing this locking inside of the mainline pool allocation code...) From > everything I can tell, this model makes more sense for prefork than it > does for threaded MPMs. I can't fathom how it makes sense to do this > with a threaded APR. > > I added my $.02 into the APR STATUS file. I can't stand it anymore. > Unless someone can convince me otherwise (I'm fully open to ideas), I > plan on tossing this pool code and replacing it with SMS. The caveat > being once I know SMS works to my satisfaction. =) At this point, > I have no clue how I'm proceeding to actually implement this, but I > do know that I plan on doing something. The STATUS file has more > clues about my current thoughts. > > I *should* be available to start working on this next week unless I > receive any objections. (We're wrapping up a project here - I hope > to roll off of it this week...) -- justin I'm in the middle of writing a pool-tester which can take a file and pool allocation commands (alloc/create/destroy/etc) and replay them. combine this with some threads, and a capture tool in the current pool code and we should be able to test different pooling algorithms easily. (should be done today) ..Ian