Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 Mar 2001 08:10:05 -0800 (PST)
From:      Garrett Wollman <wollman@khavrinen.lcs.mit.edu>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: kern/25986: Socket would hang at LAST_ACK forever.
Message-ID:  <200103221610.f2MGA5673743@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/25986; it has been noted by GNATS.

From: Garrett Wollman <wollman@khavrinen.lcs.mit.edu>
To: David Xu <bsddiy@21cn.com>
Cc: freebsd-gnats-submit@FreeBSD.ORG
Subject: Re: kern/25986: Socket would hang at LAST_ACK forever.
Date: Thu, 22 Mar 2001 11:07:54 -0500 (EST)

 <<On Thu, 22 Mar 2001 01:10:02 -0800 (PST), David Xu <bsddiy@21cn.com> said:
 
 >  Thank you!
 >  it's a long standing bug, but seems no one want to fix it, don't know why!
  
 Probably because this ``fix'' would violate the TCP specification.
 (Not that we don't do that already for FINWAIT-2.)  See the state
 diagram in RFC 793, page 23.
 
 There are three states in TCP in which the specification requires that
 we wait indefinitely for the other end to say something on the way to
 shutdown.  In FINWAIT-2, we are waiting for a FIN from the other side,
 but they have already acknowledged our FIN).  Since TCP models a
 dual-simplex octet stream, it is entirely legitimate for the other end
 to continue to transmit data after it has acknowledged our FIN and
 before it gives up itself.  (They will be in CLOSE-WAIT when we are in
 FINWAIT-2.)  In CLOSING and LAST-ACK we are waiting for the other end
 to acknowledge our FIN, them having already sent a FIN of their own.
 
 CLOSING is an exceedingly difficult state to get into, since most TCPs
 will ACK a FIN immediately, before delivering the end-of-session
 indication to the listening process.
 
 It is more dangerous to time out LAST-ACK than FINWAIT-2, because
 FINWAIT-2 sockets normally transition into TIME-WAIT whereas LAST-ACK
 sockets are destroyed immediately.
 
 -GAWollman
 

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




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