From owner-freebsd-stable@FreeBSD.ORG Fri May 30 08:11:48 2008 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5842C106567A for ; Fri, 30 May 2008 08:11:48 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from mail09.syd.optusnet.com.au (mail09.syd.optusnet.com.au [211.29.132.190]) by mx1.freebsd.org (Postfix) with ESMTP id C91D28FC14 for ; Fri, 30 May 2008 08:11:47 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from server.vk2pj.dyndns.org (c122-106-215-175.belrs3.nsw.optusnet.com.au [122.106.215.175]) by mail09.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id m4U8BiQR012140 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 30 May 2008 18:11:45 +1000 Received: from server.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by server.vk2pj.dyndns.org (8.14.2/8.14.2) with ESMTP id m4U8BhNG009408; Fri, 30 May 2008 18:11:43 +1000 (EST) (envelope-from peter@server.vk2pj.dyndns.org) Received: (from peter@localhost) by server.vk2pj.dyndns.org (8.14.2/8.14.2/Submit) id m4U8BhNW009407; Fri, 30 May 2008 18:11:43 +1000 (EST) (envelope-from peter) Date: Fri, 30 May 2008 18:11:43 +1000 From: Peter Jeremy To: Robert Blayzor Message-ID: <20080530081143.GI1028@server.vk2pj.dyndns.org> References: <483E4657.9060906@FreeBSD.org> <483EA513.4070409@earthlink.net> <96AFE8D3-7EAC-4A4A-8EFF-35A5DCEC6426@inoc.net> <483EAED1.2050404@FreeBSD.org> <200805291912.m4TJCG56025525@apollo.backplane.com> <14DA211A-A9C5-483A-8CB9-886E5B19A840@inoc.net> <200805291930.m4TJUeGX025815@apollo.backplane.com> <0C827F66-09CE-476D-86E9-146AB255926B@inoc.net> <200805292132.m4TLWhCv026720@apollo.backplane.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="yudcn1FV7Hsu/q59" Content-Disposition: inline In-Reply-To: X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.17 (2007-11-01) Cc: freebsd-stable@freebsd.org Subject: Re: Sockets stuck in FIN_WAIT_1 X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 May 2008 08:11:48 -0000 --yudcn1FV7Hsu/q59 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2008-May-29 18:11:56 -0400, Robert Blayzor wrot= e: >working. Only way to correct it seems to reboot the server... even under= =20 >RELENG_7_0.... so the upgrade from 4_11 did not fix the problem. Unfortunately, your issue is a bug in the client: The server is trying to send data and the client is continuously reporting that it is still around but can't accept the data right now. The server is behaving perfectly correctly. As a work-around, you could write a cronjob that scans "netstat" and temporarily creates an ipfw 'reset' rule that matches each FIN_WAIT_1 socket (possibly only if data is queued and/or matching packets that advertise a 0 windowsize). This rule would have to preceed any check-state rule. This is a hack but it will save you having to reboot the server. (Create them all with the same rule number and delete that rule number as the first step in the cronjob would handle rule cleanup). A real solution would require more thought. I suspect you need a mechanism similar to the keepalive timer that starts when there is data queued and is reset when (some) data is sent - this would catch your situation but I'm not sure if it's a general solution. I'm not sure if one of the existing TCP timers could be (ab)used to achieve this. --=20 Peter Jeremy Please excuse any delays as the result of my ISP's inability to implement an MTA that is either RFC2821-compliant or matches their claimed behaviour. --yudcn1FV7Hsu/q59 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEYEARECAAYFAkg/tr8ACgkQ/opHv/APuIcQjQCfSXBGEFmmjlapdvMFO/ffnank UXEAoIoitdipH3k/+0H7aRoFIHJg89l/ =lMGg -----END PGP SIGNATURE----- --yudcn1FV7Hsu/q59--