From owner-freebsd-current@FreeBSD.ORG Sat Mar 3 16:29:03 2007 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B051016A513; Sat, 3 Mar 2007 16:29:03 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.freebsd.org (Postfix) with ESMTP id 19C3A13C481; Sat, 3 Mar 2007 16:29:02 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from phobos.samsco.home (phobos.samsco.home [192.168.254.11]) (authenticated bits=0) by pooker.samsco.org (8.13.8/8.13.8) with ESMTP id l23GSr5S005250; Sat, 3 Mar 2007 09:28:59 -0700 (MST) (envelope-from scottl@samsco.org) Message-ID: <45E9A236.1080005@samsco.org> Date: Sat, 03 Mar 2007 09:28:38 -0700 From: Scott Long User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.2pre) Gecko/20070111 SeaMonkey/1.1 MIME-Version: 1.0 To: Andre Oppermann References: <17850.13146.266196.499166@grasshopper.cs.duke.edu> <20070303000125.GA9918@turion.vk2pj.dyndns.org> <45E99060.3030404@freebsd.org> In-Reply-To: <45E99060.3030404@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (pooker.samsco.org [168.103.85.57]); Sat, 03 Mar 2007 09:28:59 -0700 (MST) X-Spam-Status: No, score=-1.4 required=3.8 tests=ALL_TRUSTED autolearn=failed version=3.1.1 X-Spam-Checker-Version: SpamAssassin 3.1.1 (2006-03-10) on pooker.samsco.org Cc: Peter Jeremy , freebsd-current@freebsd.org, Andrew Gallatin Subject: Re: excessive TCP duplicate acks? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Mar 2007 16:29:03 -0000 Andre Oppermann wrote: > Peter Jeremy wrote: >> On 2007-Jan-26 11:59:06 -0500, Andrew Gallatin >> wrote: >> >>> When running some benchmarks, I noticed tons of duplicate acks showing >>> up in systat -tcp (thousands, or tens of thousands per second). >> >> >> Whilst investigating other problems, I've just seen the same on 6.2. >> The following trace was taken on 192.168.234.1, which is running >> 6.2-RELEASE/i386 (with ipfilter enabled) with fxp (Intel 82559) NICs. >> 192.168.234.64 is running 6.2-STABLE/amd64 from late January (no >> firewall active) with a bge (Broadcom BCM5705 A3, ASIC rev. 0x3003) >> NIC and checksum offloading enabled. >> >> The multiple SYN packets are due to a bug in the IPfilter state >> management, though it eventually allows a SYN through. (And it is not >> totally unrealistic for multiple SYNs to be required before a SYN-ACK >> is received so this does not excuse the ACK flood). Note that the >> duplicate ACKs are being sent from the host without a firewall so this >> does not appear to be related to ipfilter (or kern/102653). > > This thing is really strange and difficult to debug. A look at the CVS > history > of tcp_input/output doesn't show any smoking gun. ACKs like these are > totally > pointless. There are three places able to cause ACKs: 1) tcp_input > decides to > call tcp_output [not the case here as there are no corresponding input > packets > to cause this]; 2) tcp_output has a unterminated loop somewhere causing > it to > spew the ACKs in rapid succession [unlikely as it holds the tcpcb lock > and that > would block inbound packets]; 3) tcp timers are misfiring or not > properly dis- > armed [here the logic in tcp_output may/should just ignore it and return > w/o > sending any packet]. > > I haven't experienced this bug myself which makes it even harder to debug. > Just for fun, I wonder what would happen if HZ was set back to 100. It's not a fix, but it might point to some misconfigured timers. Scott