From owner-freebsd-bugs Thu Jan 23 18:31:24 2003 Delivered-To: freebsd-bugs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4581137B401 for ; Thu, 23 Jan 2003 18:31:23 -0800 (PST) Received: from ns.itga.com.au (ns.itga.com.au [202.53.40.210]) by mx1.FreeBSD.org (Postfix) with ESMTP id C17B243F13 for ; Thu, 23 Jan 2003 18:31:21 -0800 (PST) (envelope-from gnb@itga.com.au) Received: from lightning.itga.com.au (lightning.itga.com.au [192.168.71.20]) by ns.itga.com.au (8.9.3/8.9.3) with ESMTP id NAA25335; Fri, 24 Jan 2003 13:31:13 +1100 (EST) (envelope-from gnb@itga.com.au) Received: from lightning.itga.com.au (localhost [127.0.0.1]) by lightning.itga.com.au (8.9.3/8.9.3) with ESMTP id NAA08932; Fri, 24 Jan 2003 13:31:13 +1100 (EST) Message-Id: <200301240231.NAA08932@lightning.itga.com.au> X-Mailer: exmh version 2.4 05/15/2001 with nmh-1.0.4 From: Gregory Bond To: Budiyanto Fritz Cc: freebsd-bugs@FreeBSD.ORG, fritzb88@hotmail.com Subject: Re: bugs /kernel: file: table is full In-reply-to: Your message of Thu, 23 Jan 2003 18:16:04 -0800. Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 24 Jan 2003 13:31:13 +1100 Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org > 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