Indeed 10 minutes later

Alan Cox (alan@cymru.net)
Wed, 27 Nov 1996 21:39:51 GMT


[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
memcpy(newsk,sk,...)
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->h.th->dest;
newsk->dummy_th.dest = skb->h.th->source;
+ newsk->users=0;

#ifdef CONFIG_IP_TRANSPARENT_PROXY
/*

Alan

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