From owner-svn-src-head@FreeBSD.ORG Fri Jun 3 13:44:37 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A32C21065672; Fri, 3 Jun 2011 13:44:37 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 773D98FC16; Fri, 3 Jun 2011 13:44:37 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 16E2D46B1A; Fri, 3 Jun 2011 09:44:37 -0400 (EDT) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id A8E558A027; Fri, 3 Jun 2011 09:44:36 -0400 (EDT) From: John Baldwin To: Mikolaj Golub , Bjoern Zeeb , Lawrence Stewart , Mike Silbersack Date: Fri, 3 Jun 2011 09:44:36 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110325; KDE/4.5.5; amd64; ; ) References: <201105022105.p42L5q3j054498@svn.freebsd.org> <4DCE93BF.7000803@FreeBSD.org> <86boz5fby1.fsf@kopusha.home.net> In-Reply-To: <86boz5fby1.fsf@kopusha.home.net> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201106030944.36200.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Fri, 03 Jun 2011 09:44:36 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r221346 - head/sys/netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Jun 2011 13:44:37 -0000 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