httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Laurie <...@gonzo.ben.algroup.co.uk>
Subject Re: systems without accept_mutex, bug?
Date Sat, 19 Apr 1997 16:10:10 GMT
Dean Gaudet wrote:
> 
> I've been peering at child_main.  Suppose you're on a system which doesn't
> use accept_mutex().  Suppose that your configuration has multiple Listens
> so that you've got multiple sockets to select() on.  Now, all the idle
> children end up in select() at the same time.  It is possible that
> connections will be waiting on multiple sockets.  So multiple children
> leave select() with multiple sockets listed in main_fds.
> 
> All those children wander down to the accept().  Notice that they're all
> going to run accept() on the *same socket* (well assuming that main_fds is
> the same).  Our listening sockets are blocking, so all but one of them is
> about to block in accept().
> 
> That doesn't seem like a good situation to be in.  It results in
> starvation of the other sockets.
> 
> Why *doesn't* this happen?  I'm assuming it doesn't, because otherwise
> architectures without USE_FCNTL_SERIALIZED_ACCEPT or
> USE_FLOCK_SERIALIZED_ACCEPT would have real problems handling Listen
> directives.
> 
> Maybe it is happening, but not as bad as it could be.  For example, it
> could just be that a few children get blocked like this, or that the
> sockets are busy enough to not really notice it... 

Surely the blocked children will be scoreboarded as busy, so new children will
be brought up. But it does mean that there will be more children than there
should be.

Ooops!

Cheers,

Ben.

-- 
** Buy "Apache: The Definitive Guide" from http://www.links.org/apache **
Ben Laurie                Phone: +44 (181) 994 6435  Email: ben@algroup.co.uk
Freelance Consultant and  Fax:   +44 (181) 994 6472
Technical Director        URL: http://www.algroup.co.uk/Apache-SSL
A.L. Digital Ltd,         Apache Group member (http://www.apache.org)
London, England.          Apache-SSL author

Mime
View raw message