Indeed 10 minutes later -Reply

Bob Allison (
Wed, 04 Dec 1996 10:03:14 -0500

Gave your patch a try; here's the results:

For the record, I am noticing the following:

-- Server processes seem to remain in the status display with
a status of "W"; a netstat reveals that these connections are
stuck in CLOSE state (based on matching destinations)

-- Multiple server lines in the status page have the same PID

-- After a few days, Apache no longer accepts connections and
must be shut down and restarted; the wierd part of that has
been that I shut the server down each night to cycle/archive
the logs (would seem to indicate an intermitant problem)

After applying the patch and booting the new kernel, I still see the
first two symptoms; the servers stuck in CLOSE, however, seem to free
themselves after being stuck for about 15 minutes.

I do believe you have found a problem, Alan. I'll keep things running
with your patch for a few days and see if the server continues to run
correctly without becoming aloof.

>>> Alan Cox <> 11/27/96 04:39pm >>>

[Cc: Linus, Linux-kernel and Linux-net etc for folks to test this]

I think I see, and why only apache gets it. Its this

[if my theory is right]

Apache #1 - accept,
(during accept) INTERRUPT
SYN arrives
Create a new socket off the listening socket
queue it

Now in that time window newsk->users gets memcpy'd as one. So if you hit it hard
enough and fast enough [ie WWW] it gets stuck. Worse still apache has several
people doing accepts() making the window much easier to hit

Try this if you are getting the apache funnies

--- tcp_input.c~ Tue Nov 26 22:06:36 1996
+++ tcp_input.c Wed Nov 27 21:39:28 1996
@@ -501,6 +501,7 @@
newsk->retransmit_timer.function = tcp_retransmit_timer;
newsk->dummy_th.source = skb->>dest;
newsk->dummy_th.dest = skb->>source;
+ newsk->users=0;



Alan Cox, Technical Director, CymruNET Ltd: Email:
-------- ---------- Phone: +44 1792 290194
Internet/Intranet Solutions, ISDN, Leased Lines, Consultancy and Support