From owner-freebsd-isp Sun Nov 7 17:19:37 1999 Delivered-To: freebsd-isp@freebsd.org Received: from panzer.kdm.org (panzer.kdm.org [216.160.178.169]) by hub.freebsd.org (Postfix) with ESMTP id C1DCC14C15 for ; Sun, 7 Nov 1999 17:19:32 -0800 (PST) (envelope-from ken@panzer.kdm.org) Received: (from ken@localhost) by panzer.kdm.org (8.9.3/8.9.1) id SAA01954; Sun, 7 Nov 1999 18:19:13 -0700 (MST) (envelope-from ken) Message-Id: <199911080119.SAA01954@panzer.kdm.org> Subject: Re: sockets stuck in "CLOSING" state: 3.2-RELEASE In-Reply-To: from Rowan Crowe at "Nov 8, 1999 12:02:55 pm" To: rowan@sensation.net.au (Rowan Crowe) Date: Sun, 7 Nov 1999 18:19:13 -0700 (MST) Cc: freebsd-isp@FreeBSD.ORG From: "Kenneth D. Merry" X-Mailer: ELM [version 2.4ME+ PL54 (25)] MIME-Version: 1.0 Content-Type: multipart/mixed; boundary=ELM942023953-1841-0_ Content-Transfer-Encoding: 7bit Sender: owner-freebsd-isp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org --ELM942023953-1841-0_ Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Rowan Crowe wrote... > Hi all, > > I posted a message about this a while ago but I never received a response. > > I am still having problems with TCP sockets getting stuck in the "CLOSING" > state. The machine is now up to 57 such sockets, and this number keeps > rising since they never seem to die off. This machine's main function is > proxying (Squid). > > My 2.x machine also running Squid has *zero* sockets stuck in the CLOSING > state! Both are running the same version of Squid. > > I'm wondering if anyone else is seeing this behaviour, particularly only > on a 3.x machine... before I upgraded the problem server from > 2.2.5-RELEASE to 3.2-RELEASE I'd never seen this problem. > > Any suggestions (apart from "reboot it" ;-) ) or experiences appreciated. I had a similar problem just recently with -current. It seems to have been exacerbated by some TCP timer changes in late August, at least in -current. In any case, the attached patch may do the trick. It was checked into -current as rev 1.14 of src/sys/netinet/tcp_fsm.h. I've only been running it a few hours, but I haven't accumulated any sockets stuck in the CLOSING state, and it doesn't seem to have broken anything. (Thanks to Jonathan Lemon for figuring this out.) So, try the patch and see if it helps. Please report back on the success or failure of the patch to the FreeBSD-stable list, and Jonathan Lemon so the patch can get merged to -stable if it does the trick. Ken -- Kenneth Merry ken@kdm.org --ELM942023953-1841-0_ Content-Type: text/plain; charset=US-ASCII Content-Disposition: attachment; filename=tcp_fsm.h.diffs.110799 Content-Description: tcp_fsm.h.diffs.110799 Content-Transfer-Encoding: 7bit Index: tcp_fsm.h =================================================================== RCS file: /usr/local/cvs/src/sys/netinet/tcp_fsm.h,v retrieving revision 1.13 retrieving revision 1.14 diff -c -r1.13 -r1.14 *** tcp_fsm.h 1999/11/05 14:41:34 1.13 --- tcp_fsm.h 1999/11/07 04:18:30 1.14 *************** *** 31,37 **** * SUCH DAMAGE. * * @(#)tcp_fsm.h 8.1 (Berkeley) 6/10/93 ! * $FreeBSD: src/sys/netinet/tcp_fsm.h,v 1.13 1999/11/05 14:41:34 shin Exp $ */ #ifndef _NETINET_TCP_FSM_H_ --- 31,37 ---- * SUCH DAMAGE. * * @(#)tcp_fsm.h 8.1 (Berkeley) 6/10/93 ! * $FreeBSD: src/sys/netinet/tcp_fsm.h,v 1.14 1999/11/07 04:18:30 jlemon Exp $ */ #ifndef _NETINET_TCP_FSM_H_ *************** *** 92,98 **** TH_ACK, /* 4, ESTABLISHED */ TH_ACK, /* 5, CLOSE_WAIT */ TH_FIN|TH_ACK, /* 6, FIN_WAIT_1 */ ! TH_ACK, /* 7, CLOSING */ TH_FIN|TH_ACK, /* 8, LAST_ACK */ TH_ACK, /* 9, FIN_WAIT_2 */ TH_ACK, /* 10, TIME_WAIT */ --- 92,98 ---- TH_ACK, /* 4, ESTABLISHED */ TH_ACK, /* 5, CLOSE_WAIT */ TH_FIN|TH_ACK, /* 6, FIN_WAIT_1 */ ! TH_FIN|TH_ACK, /* 7, CLOSING */ TH_FIN|TH_ACK, /* 8, LAST_ACK */ TH_ACK, /* 9, FIN_WAIT_2 */ TH_ACK, /* 10, TIME_WAIT */ --ELM942023953-1841-0_-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isp" in the body of the message