Mailing List Archive

2.2.0-final - TCP connections hang *again*
Until 2.1.1xx (early '100s), there was a bug that resulted in processes
hanging on TCP connections. Now and then, I have hundreds of "inews -h"
processes running at the same time. Some percent of them stay forever,
connection (over the local interface) is "ESTABLISHED" from one side and
"SYN_RECV" from the other side. At one moment, IP guys fixed this and
this effect disappered.
Now, in 2.2.0-final, it is back again :-(
1938 ? S 0:00 /bin/inews -h
1939 ? S 0:00 /bin/inews -h
1942 ? S 0:00 /bin/inews -h
1945 ? S 0:00 /bin/inews -h
1949 ? S 0:00 /bin/inews -h
tcp 0 0 localhost:nntp localhost:1067 SYN_RECV root
tcp 0 0 localhost:nntp localhost:1066 SYN_RECV root
tcp 0 0 localhost:nntp localhost:1065 SYN_RECV root
tcp 0 0 localhost:nntp localhost:1064 SYN_RECV root
tcp 0 0 localhost:nntp localhost:1063 SYN_RECV root
tcp 0 0 localhost:1063 localhost:nntp ESTABLISHED nobody
tcp 0 0 localhost:1064 localhost:nntp ESTABLISHED nobody
tcp 0 0 localhost:1065 localhost:nntp ESTABLISHED nobody
tcp 0 0 localhost:1066 localhost:nntp ESTABLISHED nobody
tcp 0 0 localhost:1067 localhost:nntp ESTABLISHED nobody
Eugene
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/
Re: 2.2.0-final - TCP connections hang *again* [ In reply to ]
In article <pgpmoose.199901230032.7398@pccross.average.org>,
crosser@average.org (Eugene Crosser) writes:
> Until 2.1.1xx (early '100s), there was a bug that resulted in processes
> hanging on TCP connections. Now and then, I have hundreds of "inews -h"
> processes running at the same time. Some percent of them stay forever,
> connection (over the local interface) is "ESTABLISHED" from one side and
> "SYN_RECV" from the other side. At one moment, IP guys fixed this and
> this effect disappered.
This is a bug in the proc/net/tcp openreq printing code. It happens when
the application does not call accept() in time, then the pending accepts
will be printed as SYN_RECV still although they are already established.
This patch should fix the printing, of course it doesn't fix the application
to call accept in time.
BTW, don't trust the SYN_RECV listing code too much, it might miss some sockets
when the socket listing is longer than PAGE_SIZE.
--- linux/net/ipv4/proc.c.~1~ Tue Dec 29 00:27:07 1998
+++ linux/net/ipv4/proc.c Sat Jan 23 11:28:28 1999
@@ -184,6 +184,8 @@

for (req = sp->tp_pinfo.af_tcp.syn_wait_queue; req;
i++, req = req->dl_next) {
+ if (req->sk)
+ continue;
pos += 128;
if (pos < offset)
continue;

-Andi
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/