Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 Aug 2014 17:02:01 -0700
From:      Peter Wemm <peter@wemm.org>
To:        freebsd-net@freebsd.org
Cc:        Jeremiah Lott <jlott@averesystems.com>, John Baldwin <jhb@freebsd.org>
Subject:   Re: zero window and persist timer not set
Message-ID:  <24778594.oyrJY37Iyv@overcee.wemm.org>
In-Reply-To: <201408111720.18544.jhb@freebsd.org>
References:  <CANG7ib_DS7NczR4Jonz35RUaT3SCVcickrOcZ4MF--_%2B1BYnxQ@mail.gmail.com> <201408111720.18544.jhb@freebsd.org>

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

--nextPart26642615.nu2nT7dpWp
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset="us-ascii"

On Monday 11 August 2014 17:20:18 John Baldwin wrote:
> On Wednesday, August 06, 2014 5:25:38 pm Jeremiah Lott wrote:
> > Hello,
> >=20
> > We've been seeing a problem where a tcp connection is stuck in a ze=
ro
> > window condition and even though the client has opened more window =
space,
> > our FreeBSD box never sends any more.  After some analysis it appea=
rs that
> > the FreeBSD box is not sending zero window probes, because the pers=
ist
> > timer did not get set (we can see in kgdb that the tcpcb shows 0 wi=
ndow,
> > there is data in the socket buffer, but the persist timer is not ac=
tive).
[..]
> > My proposed fix follows.  If you send a 0-length packet, but there =
is data
> > is the socket buffer, and neither the rexmt or persist timer is alr=
eady
> > set, then activate the persist timer.
> >=20
> > --- sys/netinet/tcp_output.c    (revision 269644)
> > +++ sys/netinet/tcp_output.c    (working copy)
> > @@ -1290,7 +1290,12 @@
> >=20
> >                                 tp->t_rxtshift =3D 0;
> >                        =20
> >                         }
> >                         tcp_timer_activate(tp, TT_REXMT, tp->t_rxtc=
ur);
> >=20
> > -               }
> > +               } else if (len =3D=3D 0 && so->so_snd.sb_cc &&
> > +                          !tcp_timer_active(tp, TT_REXMT) &&
> > +                          !tcp_timer_active(tp, TT_PERSIST)) {
> > +                       tp->t_rxtshift =3D 0;
> > +                       tcp_setpersist(tp);
> > +               }
> >=20
> >         } else {
> >        =20
> >                 /*
> >                =20
> >                  * Persist case, update snd_max but since we are in=

> >=20
> > Let me know any comments.  Thanks,
>=20
> I think your patch is correct, but please file this as a bug report s=
o we
> can hopefully wrangle another person to review this.

This sounds suspiciously like one of the failures we have been seeing b=
etween=20
machines in the cluster that are doing package mirroring..  We had been=
=20
attributing it to a mystery rsync bug but this seems to fit.  It might =
also=20
have been implicated in the svn mirroring too (eg: to the portsnap buil=
der). =20
We've also had problems with ftp mirrors that also might fit this.

=2D-=20
Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com; KI=
6FJV
UTF-8: for when a ' or ... just won\342\200\231t do\342\200\246
--nextPart26642615.nu2nT7dpWp
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: This is a digitally signed message part.
Content-Transfer-Encoding: 7Bit

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAABAgAGBQJT6Vl+AAoJEDXWlwnsgJ4ELNMIAKWyuETT6yxO019zf/OAhwlZ
c8HnD3tKuR/Uh+dcn45J1cDJEpxv+RxFNulbtq6nZomMUgdUAxV+cb+ajldDnb13
lXgtSb5F0hWJG/ihckad5Y5k1qEihNBEawP2uliObBhuZ3ntm9UBKWSEGZsusPIK
uEG2LZIJdp369P7xdL0dcCpCWajRTfiMaJbJqAR8bUUPwzx+eVP9jBpURbRFAVUK
yUBPHKkavu4kAG54dQoRcfHO09mmbBzuMl7WWOsCgGGYQK/aubS5Ry+fy82/3qJz
vOop37kk7WcAwKBDVWTEmwR1E9OOlpAzmG5ciuDltDOmwKTFvZqbb3/ZnjNS0SI=
=s7al
-----END PGP SIGNATURE-----

--nextPart26642615.nu2nT7dpWp--




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