double ACKs ? some connections hang ...

Herbert Rosmanith (herp@wildsau.idv.uni-linz.ac.at)
Sat, 6 Apr 1996 14:25:12 +0200 (MET DST)


hi,

I've been working with 1.3.68 on my machine at home, but moved to 1.3.83
since I experienced some network problems. however, 1.3.83 has the same
problems, namely:

when I use the cern-httpd as a proxy server, then, for some other internet
hosts, the connection will hang. I suspect this could be because of
double ack-packets. I verified that with 1.2.13 there aren't these kind
of problems. tcpdump , when used with a 1.2.13 kernel, will not show
duplicate acks.

so, when I type:

> root@ferkel # telnet localhost 80
> GET http://www.derStandard.co.at/

the connection will hang, and tcpdump will show the following traffic:
(NB: slip0 = my host at home, linux-1.3.83, ist-gw = the gateway on the
other side running linux-1.2.13)

> root@ferkel # tcpdump -i sl0
> tcpdump: listening on sl0
> 13:48:03.896650 slip0.domain > ist-gw.domain: 5+ (39)
> 13:48:04.236650 ist-gw.domain > slip0.domain: 5 2/4/4 (260)
> 13:48:04.236650 slip0.1065 > clannad.Austria.EU.net.www: S 35067823:35067823(0)
> win 512 <mss 256>
> 13:48:04.246650 slip0.domain > ist-gw.domain: 6+ (45)
> 13:48:04.476650 clannad.Austria.EU.net.www > slip0.1065: S 1178924873:1178924873(0) ack 35067824 win 8704 <mss 256> (DF)
> 13:48:04.476650 slip0.1065 > clannad.Austria.EU.net.www: . ack 1 win 13312
> 13:48:04.476650 slip0.1065 > clannad.Austria.EU.net.www: P 1:82(81) ack 1 win 13312

so , here my linux box is sending two packets with ack 1 win13312

> 13:48:04.556650 ist-gw.domain > slip0.domain: 6* 1/2/1 (161)
> 13:48:04.666650 slip0.1065 > clannad.Austria.EU.net.www: P 1:82(81) ack 1 win 13312
> 13:48:04.886650 clannad.Austria.EU.net.www > slip0.1065: . ack 82 win 8704 (DF)
> 13:48:04.906650 clannad.Austria.EU.net.www > slip0.1065: . ack 82 win 8704 (DF)

and in return, the other www-server sends two identical packets back,
and this is where all the traffic stops.

surprisingly, when I directly telnet to the www-server, there are no
hangs. you could now suspect that cern-httpd is at fault, but I think
it is not. strace show's that httpd hangs in read():

[pid 967] stat("/home/netadmin/web-cache/http/www.derstandard.co.at/.cache_welcome.cache_lock", {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
[pid 967] uname({sys="Linux", node="ferkel", ...}) = 0
[pid 967] open("/etc/hosts", O_RDONLY) = 7
...
[pid 967] socket(PF_INET, SOCK_STREAM, IPPROTO_TCP) = 7
[pid 967] connect(7, {sin_family=AF_INET, sin_port=htons(80), sin_addr=inet_addr("193.83.150.227")}, 16) = 0
[pid 967] write(7, "GET / HTTP/1.0\r\nUser-Agent: Pr"..., 81) = 81
[pid 967] brk(0x6d000) = 0x6d000
[pid 967] read(7,
^^^^^

and that's it !

here's a trace of a connection not using cern-httpd as a proxy:

> root@ferkel # tcpdump -i sl0 &
> [1] 1019
> root@ferkel # tcpdump: listening on sl0
> telnet www.derstandard.co.at 80
> Trying 193.83.150.227...
> 14:04:32.784175 slip0.1078 > clannad.Austria.EU.net.www: S 1023615586:1023615586(0) win 512 <mss 256>
> 14:04:32.794175 slip0.domain > ist-gw.domain: 9+ (28)
> 14:04:33.004175 ist-gw.domain > slip0.domain: 9 2/3/3 (180)
> 14:04:33.014175 clannad.Austria.EU.net.www > slip0.1078: S 1445527587:1445527587(0) ack 1023615587 win 8704 <mss 256> (DF)
> 14:04:33.014175 slip0.1078 > clannad.Austria.EU.net.www: . ack 1 win 13312
> Connected to www.Austria.EU.net.
> Escape character is '^]'.
> GET /
> 14:04:36.384175 slip0.1078 > clannad.Austria.EU.net.www: P 1:8(7) ack 1 win 13312
> 14:04:36.574175 slip0.1078 > clannad.Austria.EU.net.www: P 1:8(7) ack 1 win 13312
> 14:04:36.774175 clannad.Austria.EU.net.www > slip0.1078: P 1:257(256) ack 8 win 8704 (DF)
> 14:04:36.774175 clannad.Austria.EU.net.www > slip0.1078: . ack 8 win 8704 (DF)

still two packets (ack 8 win 8704), but the first one has P 1:257(256)
now everything continues:

> HTTP/1.0 200 OK
> Server: Netscape-Commerce/1.1
> Date: Saturday, 06-Apr-96 11:49:20 GMT
> Last-modified: Thursday, 04-Apr-96 14:50:02 GMT
> Content-length: 5322
> Content-type: text/html

> <HTML>
> <!-- Do not edit this file. It was generated with HTML++. -->
> <14:04:36.774175 slip0.1078 > clannad.Austria.EU.net.www: . ack 257 win 13312
> 14:04:37.024175 clannad.Austria.EU.net.www > slip0.1078: . 257:513(256) ack 8 win 8704 (DF)
> !-- Command used: /home/barta/HTML++/HTML++ -debug 1 -perl /usr/bin/perl External.html++ (Thu Apr 4 14:58:25 1996) -->

> <HEAD>
> <LINK REV="MADE" HREF="mailto:webmaster@Austria.EU.net">
> <TITLE>EUnet Austria (Austria's finest Internet Provider)</TITLE>
> </HE14:04:37.024175 slip0.1078 > clannad.Austria.EU.net.www: . ack 513 win 13312
> 14:04:37.094175 clannad.Austria.EU.net.www > slip0.1078: . 513:769(256) ack 8 win 8704 (DF)
AD>

and so on .....

below is a trace of traffic that I get when I use cern-httpd on a
linux-machine running 1.2.13:

> bighost:~# tcpdump -i eth0 host www.derStandard.co.at &
> [1] 12821
> bighost:~# tcpdump: listening on eth0
>
> bighost:~# telnet localhost 80
> Trying 127.0.0.1...
> Connected to localhost.
> Escape character is '^]'.
> GET http://www.derStandard.co.at/
> 13:14:20.649530 bighost.padl.ac.at.1497 > clannad.Austria.EU.net.www: S 1611474186:1611474186(0) win 512 <mss 512>
> 13:14:20.709281 clannad.Austria.EU.net.www > bighost.padl.ac.at.1497: S 1582932776:1582932776(0) ack 1611474187 win 8704 <mss 512> (DF)
> 13:14:20.713462 bighost.padl.ac.at.1497 > clannad.Austria.EU.net.www: . ack 1 win 14261
> 13:14:20.718041 bighost.padl.ac.at.1497 > clannad.Austria.EU.net.www: P 1:73(72) ack 1 win 14335

looks different now, ack 1 win 14261 and the next one is ack 1 win14335.
and later, the www-server only sends one packet back to our machine:

> 13:14:20.954301 clannad.Austria.EU.net.www > bighost.padl.ac.at.1497: P 1:513(512) ack 73 win 8704 (DF)
> 13:14:20.956986 bighost.padl.ac.at.1497 > clannad.Austria.EU.net.www: . ack 513 win 14008

> <HTML>
> <!-- Do not edit this file. It was generated with HTML++. -->
> <!-- Command used: /home/barta/HTML++/HTML++ -debug 1 -perl /usr/bin/perl External.html++ (Thu Apr 4 14:58:25 1996) -->
>
> <HEAD>
> <LINK REV="MADE" HREF="mailto:webmaster@Austria.EU.net">

hope you can use this printouts.

best regards, herbert rosmanith
herp@wildsau.idv.uni-linz.ac.at
rosmanith@edvz.uni-linz.ac.at