Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Jan 2003 13:31:13 +1100
From:      Gregory Bond <gnb@itga.com.au>
To:        Budiyanto Fritz <fritzb88@yahoo.com>
Cc:        freebsd-bugs@FreeBSD.ORG, fritzb88@hotmail.com
Subject:   Re: bugs /kernel: file: table is full 
Message-ID:  <200301240231.NAA08932@lightning.itga.com.au>
In-Reply-To: Your message of Thu, 23 Jan 2003 18:16:04 -0800.

next in thread | raw e-mail | index | archive | help
> I just simply terminate the program in the middle
> before it has a chance to close the socket. This will
> cause kernel file table full when you re-run the
> program again. Possibly file descriptor is not clean
> up properly when you deal with large number of file
> descriptor.

No, this is not a bug.  Closing a TCP connection does not immediately free the
socket / file descriptor info, as the socket needs to stay around to make sure
the three-way handshake for closing the TCP stream works if the remote host
drops a packet or whatever.  The socket is shown to be in FIN_WAIT or
FIN_WAIT_2 state while this happens. You have to wait until (erm, I think) 60
seconds after the FIN is first ACKed by the remote end before the FIN_WAIT_2
expires and the resources are freed.

Try waiting a few minutes after killing the program before retrying it.

 



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?200301240231.NAA08932>