apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cliff Woolley <jwool...@virginia.edu>
Subject Re: Creating an allocator with no mutex...
Date Fri, 18 Jul 2003 19:17:21 GMT
On Fri, 18 Jul 2003, Brad Nicholes wrote:

>    Under what circumstances would you want to create an allocator
> without a mutex assigned to it?  We have been running into a problem
> with the NetWare MPM on multi-processor boxes where Apache faults
> periodically while trying to destroy the memory pool.  The fault appears

Jean-Jacques had written me off-list about the same problem a little while
ago, and I just wrote back to him about that.  You create an allocator
with no mutex on it for a pool that will only ever be used to allocate
entities (including subpools) in the current thread.  In the other MPM's,
it's true that each thread pool has no allocator mutex -- because that
thread pool will only ever allocate things for that one thread.  But the
thread pool's parent, which is the process pool in most other MPM's, does
have a mutex on it, meaning that sibling lists which are used when
creating and destroying new threads /are/ protected by mutex.  I'm
guessing that what you're seeing is that, since netware has no processes,
the one thread that handles creation of other threads has a thread pool
(of which the other threads' pools are children) that is missing the mutex
it ought to have.

I could be wrong though, as my cursory glance through worker and
the netware mpm just now did not reveal where the mutex ought to be set.
Unfortunately I'm on my way out of town for the weekend right now or I'd
look into it more.

Hopefully Sander can fill in to the extent that I'm full of shit.  :)

--Cliff

Mime
View raw message