Again: 2.0.33: TCP connection hanging on CLOSE_WAIT

Ulrich Windl (ulrich.windl@rz.uni-regensburg.de)
Mon, 25 May 1998 08:39:39 +0200


Hello,

I'm not subscribed here, but also I did hear nothing about my last
problem report. So I'll repeat it once more:

netstat:
---------
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 100 36632 kgate.dvm.klinik.u:1024 rkmmhnw1.dvm.klini:smtp CLOSE_WAIT
---------

/proc/net/tcp:
---------
sl local_address rem_address st tx_queue rx_queue tr tm->when retrnsmt ui
d timeout inode
2: 12B0C784:0400 13B0C784:0019 08 00008F18:00000064 01:00001C6D 00000000 0
0 4043
---------

For one host I repeatedly get a hanging TCP connection on CLOSE_WAIT. The
problem may be a "not so much recent TCP/IP stack" in the remote machine
(Novell Netware). The connection originalted from sendmail (if that
matters).

The strange fact about the problem seems to be that there are data for
BOTH directions when being in state CLOSE_WAIT. I'm unsure what causes
this, and what the correct action for TCP should be. Possibly both
parties try to get rid of their data, but maybe noone wants to read the
data.

What really is very ugly is the fact that the connection will never time
out. It's there for about 3 days when I restarted the machine.

tcpdump shows something like

kgate:/root # tcpdump -p host rkmmhnw1
tcpdump: listening on eth0
08:33:09.645670 rkmmhnw1.dvm.klinik.uni-regensburg.de.smtp > kgate.dvm.klinik.un
i-regensburg.de.1024: . 875556956:875556957(1) ack 292489878 win 0
08:33:09.645670 kgate.dvm.klinik.uni-regensburg.de.1024 > rkmmhnw1.dvm.klinik.un
i-regensburg.de.smtp: . ack 1 win 32120 (DF)
08:33:39.627377 rkmmhnw1.dvm.klinik.uni-regensburg.de.smtp > kgate.dvm.klinik.un
i-regensburg.de.1024: . 0:1(1) ack 1 win 0
08:33:39.627377 kgate.dvm.klinik.uni-regensburg.de.1024 > rkmmhnw1.dvm.klinik.un
i-regensburg.de.smtp: . ack 1 win 32120 (DF)
08:34:09.619083 rkmmhnw1.dvm.klinik.uni-regensburg.de.smtp > kgate.dvm.klinik.un
i-regensburg.de.1024: . 0:1(1) ack 1 win 0
08:34:09.619083 kgate.dvm.klinik.uni-regensburg.de.1024 > rkmmhnw1.dvm.klinik.un
i-regensburg.de.smtp: . ack 1 win 32120 (DF)
08:34:39.610790 rkmmhnw1.dvm.klinik.uni-regensburg.de.smtp > kgate.dvm.klinik.un
i-regensburg.de.1024: . 0:1(1) ack 1 win 0
08:34:39.610790 kgate.dvm.klinik.uni-regensburg.de.1024 > rkmmhnw1.dvm.klinik.un
i-regensburg.de.smtp: . ack 1 win 32120 (DF)

or

kgate:/root # tcpdump -v -p host rkmmhnw1
tcpdump: listening on eth0
08:36:39.567617 rkmmhnw1.dvm.klinik.uni-regensburg.de.smtp > kgate.dvm.klinik.un
i-regensburg.de.1024: . 875556956:875556957(1) ack 292489878 win 0 (ttl 128, id
6630)
08:36:39.567617 kgate.dvm.klinik.uni-regensburg.de.1024 > rkmmhnw1.dvm.klinik.un
i-regensburg.de.smtp: . ack 1 win 32120 (DF) (ttl 64, id 5688)
08:37:09.549323 rkmmhnw1.dvm.klinik.uni-regensburg.de.smtp > kgate.dvm.klinik.un
i-regensburg.de.1024: . 0:1(1) ack 1 win 0 (ttl 128, id 6631)
08:37:09.549323 kgate.dvm.klinik.uni-regensburg.de.1024 > rkmmhnw1.dvm.klinik.un
i-regensburg.de.smtp: . ack 1 win 32120 (DF) (ttl 64, id 5770)
08:37:39.541029 rkmmhnw1.dvm.klinik.uni-regensburg.de.smtp > kgate.dvm.klinik.un
i-regensburg.de.1024: . 0:1(1) ack 1 win 0 (ttl 128, id 6632)
08:37:39.541029 kgate.dvm.klinik.uni-regensburg.de.1024 > rkmmhnw1.dvm.klinik.un
i-regensburg.de.smtp: . ack 1 win 32120 (DF) (ttl 64, id 5899)

6 packets received by filter
0 packets dropped by kernel

Maybe some TCP guru can tell me what's wrong here. Is it a flaw in the protocol,
or is it a bad implementation?

Regards,
Ulrich

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu