httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Slemko <>
Subject Re: Accept locking test code strangeness
Date Wed, 10 Oct 2001 15:14:10 GMT
On Wed, 10 Oct 2001, Ryan Bloom wrote:

> On Wednesday 10 October 2001 08:01 am, Marc Slemko wrote:
> > On Tue, 9 Oct 2001, Justin Erenkrantz wrote:
> > > Basically, if you say AcceptMutex pthread on 1.3, you will be running
> > > without an accept mutex - which I believe on later Linux versions is
> > > actually okay.  IIRC, Dean and Linus went back and forth on this I
> > > think on lkml - thundering herd isn't much of a problem on recent
> > > versions - Dean will have more concrete knowledge of this though.
> >
> > Once again, accept mutexes are _NOT_ just a performance optimization (or
> > lack thereof) in the multiple listener case.  They are required to avoid
> > race conditions that can deadlock your server with the 1.3 process/accept
> > model.
> I agree 100%, but I want to add that if the deadlock can occur in the 1.3 process
> model, it can just as easily occur in the threaded model.  It shouldn't matter
> if it is one thread per process sitting in accept, or 64 threads per process sitting
> in accept.  If a deadlock can occur, it will occur in either case.  Therefore, the
> accept mutex is still required in the 2.0 thread/process model.

Right, but you can imagine (well, do a lot more than imagine...) a MPM
where it isn't required, since the race is between the select() on
multiple listening sockets and the accept() on one.  If your process model
doesn't do that, then it doesn't have the race.

View raw message