From owner-svn-src-all@FreeBSD.ORG Sun Jun 12 06:56:07 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A96BC106567A for ; Sun, 12 Jun 2011 06:56:07 +0000 (UTC) (envelope-from silby@silby.com) Received: from relay01.pair.com (relay01.pair.com [209.68.5.15]) by mx1.freebsd.org (Postfix) with SMTP id 275778FC19 for ; Sun, 12 Jun 2011 06:56:06 +0000 (UTC) Received: (qmail 26061 invoked from network); 12 Jun 2011 06:56:05 -0000 Received: from 209.68.2.70 (HELO localhost) (209.68.2.70) by relay01.pair.com with SMTP; 12 Jun 2011 06:56:05 -0000 X-pair-Authenticated: 209.68.2.70 Date: Sun, 12 Jun 2011 01:56:05 -0500 (CDT) From: Mike Silbersack X-X-Sender: silby@telemachus.local To: John Baldwin In-Reply-To: <201106030944.36200.jhb@freebsd.org> Message-ID: References: <201105022105.p42L5q3j054498@svn.freebsd.org> <4DCE93BF.7000803@FreeBSD.org> <86boz5fby1.fsf@kopusha.home.net> <201106030944.36200.jhb@freebsd.org> User-Agent: Alpine 2.00 (OSX 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, Mikolaj Golub , svn-src-head@freebsd.org, Bjoern Zeeb , Mike Silbersack , Lawrence Stewart Subject: Re: svn commit: r221346 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Jun 2011 06:56:07 -0000 On Fri, 3 Jun 2011, John Baldwin wrote: > On Saturday, May 14, 2011 1:07:18 pm Mikolaj Golub wrote: >> >> On Sat, 14 May 2011 10:37:51 -0400 John Baldwin wrote: >> >> JB> Can you capture a tcpdump (probably easiest to do from the other host)? >> >> I replaced the asserts with log statements to make the host not panic and the >> captured dump survive. > > Please try this change. What is happening is that you have a remaining > window that is smaller than the window scale. You are receiving zero > window updates that are received ok (becuase the socket buffer isn't > completely empty), and that advance rcv_nxt. However, tcp_output() is > not advancing rcv_adv because 'recwin' is calculated as zero. My > invariants had assumed that the ACK that gets forced out for a reply > to a zero window probe would move rcv_adv, but that isn't happening. > This patch will allow rcv_adv to advance when a zero window probe is > ACK'd. I'm not sure if this is the best way to fix this, but I think > it will fix it: > > Index: tcp_output.c > =================================================================== > --- tcp_output.c (revision 222565) > +++ tcp_output.c (working copy) > @@ -1331,7 +1331,7 @@ out: > * then remember the size of the advertised window. > * Any pending ACK has now been sent. > */ > - if (recwin > 0 && SEQ_GT(tp->rcv_nxt + recwin, tp->rcv_adv)) > + if (recwin >= 0 && SEQ_GT(tp->rcv_nxt + recwin, tp->rcv_adv)) > tp->rcv_adv = tp->rcv_nxt + recwin; > tp->last_ack_sent = tp->rcv_nxt; > tp->t_flags &= ~(TF_ACKNOW | TF_DELACK); > > > -- > John Baldwin This change looks ok to me. I can't think of a better way to solve the problem, and I don't see it causing any major change in behavior. Mike "Silby" Silbersack