On Thu, 12 Jul 2001, Bill Stoddard wrote:
> >
> > > 2. This is the nasty part... Due to a bug in the Windows part of Apache, child
>processes are
> > > inheriting open socket descriptors. When the Apache child process segfaults, its
>child processes
> > > have copies of the open socket descriptors which can prevent the new Apache
>process from
> accepting
> > > connections.. This could explain some long standing bug reports in the bugdb.
> >
> > Why, specifically, do we have the parent keep the sockets open? Can we simply
>open the parent
> socket
> > (to test that it is available, and try it exclusively, since we don't do that
>correctly now
> anyways),
> > then close it, and let the child threads open their own (non-inhertable) sockets,
>themselves?
> > Does this really cost us that much?
> >
>
> The problem is that the processes started by the child are inheriting the sockets
>from the child. I
> wasn't clear about that.
>
> The parent needs to manage the listen sockets to enable graceful restarts to work.
>Having the
> parent own the listeners allows us to not destroy the listen queue (and anything on
>it) across a
> graceful restart. The code to prevent inheriting the socket is quite simple, it was
>just behaving
> strangely (see below).
I have a patch on my computer that closes the sockets when children create
child processes. I haven't committed it because I haven't fully tested it
yet. I'll try to finish it up and commit it tonight. This patch should
fix a big part of this part of the problem.
Ryan
_____________________________________________________________________________
Ryan Bloom [EMAIL PROTECTED]
Covalent Technologies [EMAIL PROTECTED]
-----------------------------------------------------------------------------