> From: "Bill Stoddard" <[EMAIL PROTECTED]> > Sent: Thursday, November 15, 2001 7:22 AM > > > > > Apache 1.3.22 introduced a rather troubling bug in the listeners. > > > > > > Without introducing a huge burden of interlocking the individual > > > sockets (a patch not worthy of the 1.3.23-dev tree), we can actually > > > solve this since the Win32 accepts are all opened as non-exclusive. > > > Therefore, if we drop the setup_listeners from the parent, entirely, > > > and let the children open those listeners, the entire headache goes > > > away. The old child continues to fulfill all remaining connections, > > > and the new child fulfills all newly originated requests. > > > > > > Attached is a patch to do just that. Please review (Mr. Stoddard ;) > > > > > > Bill > > > > > > > -1 at least until after we discuss this a bit more. > > > > With this patch, connections in the TCP listen queue will be dumped across a >restart (of > > after hitting max requests per child). Opening the listeners in the parent and allowing > > the child processes to inherit the listeners keeps the listen queue intact across > > restarts. Having two processes open the same port would introduce undefined >behaviour I > > suspect (perhaps each will have their own listen queue). > > It sounds like we would need to transform the start_mutex to _not_ kill the > original child until the new child had picked up all the listeners. This > would not work, of course, if the original child segfaults :( > > > What exactly is the problem with POST? I'd like to investigate other solutions >first. > > I need to look at the post options to ab or flood, to demonstrate. I suspect > packets will be randomly delivered between the two processes. > > You can demonstrate (interactively) by quering server-status against 1.3.22, > with keepalives on. As you restart, keep refreshing. The two servers will > (alternating randomly) answer the status request, as indicated by uptime.
Nope, not possible (at least for the reasons you suspect). I suspect your browser is opening multiple connections the server and is sending the server-status requests randomly on different connections. Once a process starts shutting down, it stops accepting new connections before allowing the new process to begin accepting connections (via the start_mutex). There is no way for stock Apache 1.3 to accept connections on the process shutting down and the new process simultaniously. The old process may be still servicing keep-alive connections however. I'm positive there is code in 1.3.* to quit handling keep alive connections if the process is shutting down. I'll take a look and see if that code is broken. Bill
