zero window and persist timer not set
Peter Wemm
peter at wemm.org
Tue Aug 12 00:02:13 UTC 2014
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 at wemm.org; peter at FreeBSD.org; peter at yahoo-inc.com; KI6FJV
UTF-8: for when a ' or ... just won\342\200\231t do\342\200\246
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freebsd.org/pipermail/freebsd-net/attachments/20140811/314bd1f7/attachment.sig>
More information about the freebsd-net
mailing list