httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <traw...@attglobal.net>
Subject Re: cvs commit: httpd-2.0/server/mpm/worker worker.c
Date Tue, 05 Mar 2002 22:07:38 GMT
Aaron Bannert <aaron@clove.org> writes:

> On Tue, Mar 05, 2002 at 04:53:23PM -0500, Jeff Trawick wrote:
> > Here is the sequence of events:
> > 
> > 1) a thread in child process A is waiting on semaphore
> > 2) graceful restart triggered
> > 3) parent process cleans up the semaphore
> > 4) that thread in child process A gets a failure (EIDRM) from the
> >    semaphore obtain and gracefully brings down other threads in child
> >    process A
> 
> My point is that #3 and #4 are in the wrong order. There should be
> nobody waiting on a semaphore when the parent cleans it up.

For a graceful restart, the parent can't wait around for all children
to go away before it cleans up and gets the next generation started.
It needs to let worker threads in the old children die gradually as
they finish processing active connection.  That process can take a
long time.

(I thought about not cleaning up the semaphore at restart time, but
Greg pointed out that doing so doesn't allow the admin to change the
AcceptMutex foo setting without bringing down the server.)

-- 
Jeff Trawick | trawick@attglobal.net | PGP public key at web site:
       http://www.geocities.com/SiliconValley/Park/9289/
             Born in Roswell... married an alien...

Mime
View raw message