TCP connections hanging forever in FIN_WAIT_2 state
John Quarterman
jsq at ut-sally.UUCP
Sun Dec 11 07:28:16 AEST 1983
>From jsq Sat Dec 10 15:25:09 1983
Date: Sat, 10 Dec 83 15:25:03 cst
>From: jsq (John Quarterman)
Posted-Date: Sat, 10 Dec 83 15:25:03 cst
Received-Date: Sat, 10 Dec 83 15:25:03 cst
Message-Id: <8312102125.AA00997 at ut-sally.ARPA>
Received: by ut-sally.ARPA (4.12/3.14)
id AA00997; Sat, 10 Dec 83 15:25:03 cst
Subject: TCP connections hanging forever in FIN_WAIT_2 state
Index: sys/netinet/tcp_input.c 4.2BSD
Apparently-To: 4bsd-bugs at Berkeley
Apparently-To: jsq
Status: R
Description:
TCP connections with TOPS-20 systems occassionally hang in
FIN_WAIT_2 state. When this happens, the connection *never*
closes and such hung connections accumulate.
Repeat-By:
If you have frequent TCP connections with a TOPS-20 host,
you will notice, using netstat, connections in FIN_WAIT_2 state
accumulating. If you have frequent TOPS-20 traffic, all your
incoming network pty ports will eventually be eaten up.
Fix:
Add the line marked with +, 533, to /sys/netinet/tcp_input.c.
This kludge does not agree complete with the TCP spec,
but it does solve the problem.
/*
* In FIN_WAIT_1 STATE in addition to the processing
* for the ESTABLISHED state if our FIN is now acknowledged
* then enter FIN_WAIT_2.
*/
case TCPS_FIN_WAIT_1:
if (ourfinisacked) {
/*
* If we can't receive any more
* data, then closing user can proceed.
*/
if (so->so_state & SS_CANTRCVMORE)
soisdisconnected(so);
tp->t_state = TCPS_FIN_WAIT_2;
+ tp->t_timer[TCPT_2MSL] = 2 * TCPTV_MSL;
}
break;
--
John Quarterman, CS Dept., University of Texas, Austin, Texas
{ihnp4,seismo,ctvax}!ut-sally!jsq, jsq at ut-sally.{ARPA,UUCP}
More information about the Comp.bugs.4bsd.ucb-fixes
mailing list