Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 7 Nov 1999 18:19:13 -0700 (MST)
From:      "Kenneth D. Merry" <ken@kdm.org>
To:        rowan@sensation.net.au (Rowan Crowe)
Cc:        freebsd-isp@FreeBSD.ORG
Subject:   Re: sockets stuck in "CLOSING" state: 3.2-RELEASE
Message-ID:  <199911080119.SAA01954@panzer.kdm.org>
In-Reply-To: <Pine.BSF.4.01.9911081156470.1309-100000@velvet.sensation.net.au> from Rowan Crowe at "Nov 8, 1999 12:02:55 pm"

next in thread | previous in thread | raw e-mail | index | archive | help

--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
<jlemon@FreeBSD.ORG> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199911080119.SAA01954>