[336] in linux-net channel archive
TCP race condition/rdist weirdness
daemon@ATHENA.MIT.EDU (Thomas Koenig)
Thu May 18 13:38:04 1995
To: linux-net@vger.rutgers.edu
Date: Thu, 18 May 1995 18:05:58 +0200 (MET DST)
From: Thomas.Koenig@ciw.uni-karlsruhe.de (Thomas Koenig)
I'm having a strange problem here with rdist 6.1.0, which seems
to point to a race condition in the TCP code.
When starting 'rdist -D -F -f distfile' on host host1, this hangs
when trying to send over one file (/bin/tcsh in this example);
the last debug message is:
host2: response() start
host2: <<< Cmd = (\005) Msg = ""
host2: received ACK
host2: Send file 'tcsh' 226308 bytes
^[[?1;2chost2: Send file 'complete' tcsh.
host2: >>> Cmd = (\005) Msg = ""
^[[?1;2chost2: response() start
At this point, the two machines disagree about the state of their
TCP connections, i.e. on host2, we have:
# netstat
Active Internet connections
Proto Recv-Q Send-Q Local Address Foreign Address (State)
User
tcp -1 0 host2.ciw.uni-kar:1023 host1.ciw.uni-karl:1022 ESTABLISHED
root
tcp -1 0 host2.ciw.:netbios-ssn host11.ciw.uni-kar:1038 ESTABLISHED
root
tcp -1 0 host2.ciw.:netbios-ssn ttk2.ciw.uni-karl:1027 ESTABLISHED
root
tcp 1497 10542 host2.ciw.uni-k:telnet host1.ciw.uni-karl:1666 CLOSE
root
tcp -1 0 host2.ciw.uni-k:telnet host1.ciw.uni-karl:1679 ESTABLISHED
root
tcp -1 0 host2.ciw.uni-ka:shell host1.ciw.uni-karl:1023 ESTABLISHED
root
udp -1 0 host2.ciw.uni-karl:666 host1.ciw.uni-karl:2049 ESTABLISHED
udp -1 0 host2.ciw.uni-karl:665 host1.ciw.uni-karl:2049 ESTABLISHED
udp -1 0 host2.ciw.uni-karl:664 host1.ciw.uni-karl:2049 ESTABLISHED
udp -1 0 host2.ciw.uni-karl:663 host1.ciw.uni-karl:2049 ESTABLISHED
udp -1 0 localhost:661 localhost:1023 ESTABLISHED
udp 0 0 localhost:domain *:*
udp 0 0 host2.ciw.uni-k:domain *:*
and on host1, we have:
# netstat | grep host2
tcp -1 0 host1.ciw.uni-karl:1023 host2.ciw.uni-ka:shell ESTABLISHED
root
tcp -1 0 host1.ciw.uni-karl:1022 host2.ciw.uni-kar:1023 ESTABLISHED
root
tcp -1 0 host1.ciw.uni-karl:1679 host2.ciw.uni-k:telnet ESTABLISHED
ib09
udp -1 0 host1.ciw.uni-karls:859 host2.ciw.uni-kar:2049 ESTABLISHED
(in other words, host2 believes there's an established TCP connection
to host1, which host1 has never heard of).
Also, when I run the 'rdist' under strace, it works without a hitch.
Apart from running the whole show as 'strace -o /dev/null rdist ...'
does anybody have any suggestions?
# uname -a
Linux host2 1.2.8 #1 Fri May 5 10:51:57 MET DST 1995 i586
# uname -a
Linux host1 1.2.8 #1 Mon May 15 17:31:42 MET DST 1995 i586
--
Thomas Koenig, Thomas.Koenig@ciw.uni-karlsruhe.de, ig25@dkauni2.bitnet.
The joy of engineering is to find a straight line on a double
logarithmic diagram.