Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 14 May 2011 08:45:51 -0400
From:      Jason Hellenthal <jhell@DataIX.net>
To:        Ivan Voras <ivoras@freebsd.org>
Cc:        freebsd-net@freebsd.org
Subject:   Re: Spurious ACKs, ICMP unreachable?
Message-ID:  <20110514124551.GB13970@DataIX.net>
In-Reply-To: <iqk323$f8e$1@dough.gmane.org>
References:  <iqk323$f8e$1@dough.gmane.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--ZmUaFz6apKcXQszQ
Content-Type: multipart/mixed; boundary="hHWLQfXTYDoKhP50"
Content-Disposition: inline


--hHWLQfXTYDoKhP50
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable


Ivan,

On Fri, May 13, 2011 at 04:07:31PM -0400, Ivan Voras wrote:
> I'm seeing an an unusual problem at a remote machine; this machine is
> the FreeBSD server, and the client is a probably Windows machine (but I
> don't know the details yet). Something happens which causes FreeBSD to
> send ACKs to the client, and the client to send ICMP unreachable
> messages to the server. It is most likely a configuration error at the
> remote site but I have no idea how to verify this.
>=20
> A tcpdump sample is attached. Any ideas what to look into next?
>=20
>=20
> 18:56:02.711942 IP server.http > client.4732: Flags [.], ack 2110905191,
> win 0, length 0
> E..(J...@.W..(.d.(.D.P.|....}..gP...lR..
> 18:56:02.712009 IP server.http > client.elan: Flags [.], ack 2661379534,
> win 0, length 0
> E..(J...@.V..(.d.(.D.P.b.(....m.P.......
> 18:56:02.712025 IP server.http > client.2402: Flags [.], ack 2197439003,
> win 0, length 0
> E..(J...@.V..(.d.(.D.P  b.m>5..B.P...@p..
> 18:56:02.712064 IP server.http > client.3427: Flags [.], ack 1373214750,
> win 0, length 0
> E..(K%..@.V..(.d.(.D.P^Mc_N..Q...P.......
> 18:56:02.712176 IP server.http > client.1893: Flags [.], ack 3549121877,
> win 0, length 0
> E..(K...@.V..(.d.(.D.P.ee..G..MUP...~_..
> 18:56:02.712304 IP server.http > client.atex_elmd: Flags [.], ack
> 2600295677, win 0, length 0
> E..(Lq..@.UU.(.d.(.D.P.i.*.F..\.P...,...
> 18:56:02.713155 IP server.http > client.4732: Flags [.], ack 1, win
> 65535, length 0
> E..(L.@.@..2.(.d.(.D.P.|....}..gP.......
> 18:56:02.713193 IP server.http > client.elan: Flags [.], ack 1, win
> 65535, length 0
> E..(L.@.@....(.d.(.D.P.b.(....m.P.......
> 18:56:02.713206 IP server.http > client.2402: Flags [.], ack 1, win
> 65535, length 0
> E..(L.@.@....(.d.(.D.P  b.m>6..B.P.......
> 18:56:02.713452 IP server.http > client.3427: Flags [.], ack 1, win
> 65535, length 0
> E..(L.@.@....(.d.(.D.P^Mc_N..Q...P.......
> 18:56:02.713937 IP server.http > client.1893: Flags [.], ack 1, win
> ovd65535, length 0
> E..(M'@.@....(.d.(.D.P.ee..H..MUP.......
> 18:56:02.714436 IP server.http > client.atex_elmd: Flags [.], ack 1, win
> 65535, length 0
> E..(M.@.@..P.(.d.(.D.P.i.*.G..\.P.......
> 18:56:05.723511 IP client > server: ICMP host client unreachable, length =
48
> E..D.8..?....(.D.(.d........E..(J...>.Y..(.d.(.D.P.|....}..gP...lR..
> 18:56:05.723527 IP client > server: ICMP host client unreachable, length =
48
> E..D.9..?....(.D.(.d........E..(L.@.>..2.(.d.(.D.P.|....}..gP...lQ..
> 18:56:07.712140 IP server.http > client.1859: Flags [.], ack 70891158,
> win 0, length 0
> E..(N0..@.S..(.d.(.D.P.C.>S..9..P.......
> 18:56:07.712161 IP server.http > client.dict: Flags [.], ack 878675698,
> win 0, length 0
> E..(NF..@.S..(.d.(.D.P
> D...:4_..P...g...
> 18:56:07.713390 IP server.http > client.1859: Flags [.], ack 1, win
> 65535, length 0
> E..(O.@.@....(.d.(.D.P.C.>S..9..P.......
> 18:56:07.713459 IP server.http > client.dict: Flags [.], ack 1, win
> 65535, length 0
> E..(O.@.@....(.d.(.D.P
> D...;4_..P.......
> 18:56:17.712207 IP server.http > client.3454: Flags [.], ack 119451926,
> win 0, length 0
> E..(R...@.O..(.d.(.D.P^M~@.i.....P...f7..
> 18:56:17.712354 IP server.http > client.2412: Flags [.], ack 4105579117,
> win 0, length 0
> E..(R...@.N..(.d.(.D.P  l......*mP.......
> 18:56:17.712448 IP server.http > client.3438: Flags [.], ack 1002884906,
> win 0, length 0
> E..(SL..@.Nz.(.d.(.D.P^MnF.;.;..*P...;...
> 18:56:17.713764 IP server.http > client.3454: Flags [.], ack 1, win
> 65535, length 0
> E..(S.@.@.^M..(.d.(.D.P^M~@.i.....P.......
> 18:56:17.714361 IP server.http > client.2412: Flags [.], ack 1, win
> 65535, length 0
> E..(TY@.@.^M}.(.d.(.D.P l......*mP.......
>=20

This really looks like jhb@'s problem that he solved in revisions
r220679 which was a MFC of r220156.

Is the machine on the end your connecting to a 64-bit machine ? And is
it still unpatched as of that revision ?

I am unclear is this had made it to 7-STABLE as of yet.

------------------------------------------------------------------------
r220679 | jhb | 2011-04-15 16:42:27 -0400 (Fri, 15 Apr 2011) | 8 lines

MFC 220156:
Clamp the initial advertised receive window when responding to a SYN/ACK
to the maximum allowed window.  Growing the window too large would cause
an underflow in the calculations in tcp_output() to decide if a window
update should be sent which would prevent the persist timer from being
started if data was pending and the other end of the connection
advertised an initial window size of 0.


--=20

 Regards, (jhell)
 Jason Hellenthal


--hHWLQfXTYDoKhP50
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment; filename="r220679.patch"

Index: /usr/src/sys/netinet/tcp_input.c
===================================================================
--- /usr/src/sys/netinet/tcp_input.c	(revision 220678)
+++ /usr/src/sys/netinet/tcp_input.c	(revision 220679)
@@ -1558,7 +1558,8 @@
 				(TF_RCVD_SCALE|TF_REQ_SCALE)) {
 				tp->rcv_scale = tp->request_r_scale;
 			}
-			tp->rcv_adv += tp->rcv_wnd;
+			tp->rcv_adv += imin(tp->rcv_wnd,
+			    TCP_MAXWIN << tp->rcv_scale);
 			tp->snd_una++;		/* SYN is acked */
 			/*
 			 * If there's data, delay ACK; if there's also a FIN

--hHWLQfXTYDoKhP50--

--ZmUaFz6apKcXQszQ
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (FreeBSD)
Comment: http://bit.ly/0x89D8547E

iQEcBAEBAgAGBQJNznl+AAoJEJBXh4mJ2FR+/uEIAJmFbixqlvQsfO9V7h6DvuRs
Fk6dducWnaJ/jGVObTAcjnZFSbSbgOEwoAK9C/KDMQal9aroitUEKtEQZKZ3RL2C
xPqSJFnQD/AoT+jpJKYl0QShjM07TvPJuDDkHUigQAiiez+sf2YrNrJn1IeOEXYv
xMq/7C0moLvbJLcCZ8tBbLpj0uvUyP/MJrTtIIUiSkh7FSNBx+wXQD1xljcVJenT
dJkeX2QzcIJbr19Ed9gF4qR1oVOqC1UYtRJvYuNljKqQR4an9sukuAV664gzm8ZD
wGFiNPBmlzDHXM5J9wI3IHCK/mkYQC+4lmMQ8Ihaenjgcrw51avBAhrFcPKxuyw=
=72mq
-----END PGP SIGNATURE-----

--ZmUaFz6apKcXQszQ--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110514124551.GB13970>