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

[-- Attachment #1 --]
On Monday 11 August 2014 17:20:18 John Baldwin wrote:
> On Wednesday, August 06, 2014 5:25:38 pm Jeremiah Lott wrote:
> > Hello,
> > 
> > We've been seeing a problem where a tcp connection is stuck in a zero
> > window condition and even though the client has opened more window space,
> > our FreeBSD box never sends any more.  After some analysis it appears that
> > the FreeBSD box is not sending zero window probes, because the persist
> > timer did not get set (we can see in kgdb that the tcpcb shows 0 window,
> > there is data in the socket buffer, but the persist timer is not active).
[..]
> > 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 already
> > set, then activate the persist timer.
> > 
> > --- sys/netinet/tcp_output.c    (revision 269644)
> > +++ sys/netinet/tcp_output.c    (working copy)
> > @@ -1290,7 +1290,12 @@
> > 
> >                                 tp->t_rxtshift = 0;
> >                         
> >                         }
> >                         tcp_timer_activate(tp, TT_REXMT, tp->t_rxtcur);
> > 
> > -               }
> > +               } else if (len == 0 && so->so_snd.sb_cc &&
> > +                          !tcp_timer_active(tp, TT_REXMT) &&
> > +                          !tcp_timer_active(tp, TT_PERSIST)) {
> > +                       tp->t_rxtshift = 0;
> > +                       tcp_setpersist(tp);
> > +               }
> > 
> >         } else {
> >         
> >                 /*
> >                 
> >                  * Persist case, update snd_max but since we are in
> > 
> > Let me know any comments.  Thanks,
> 
> I think your patch is correct, but please file this as a bug report so we
> can hopefully wrangle another person to review this.

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

-- 
Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com; KI6FJV
UTF-8: for when a ' or ... just won\342\200\231t do\342\200\246
[-- Attachment #2 --]
-----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-----

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