From owner-freebsd-bugs Fri Jan 24 11:48:31 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 13BAB37B405 for ; Fri, 24 Jan 2003 11:48:30 -0800 (PST) Received: from web10101.mail.yahoo.com (web10101.mail.yahoo.com [216.136.130.51]) by mx1.FreeBSD.org (Postfix) with SMTP id 6FACA43F6D for ; Fri, 24 Jan 2003 11:48:29 -0800 (PST) (envelope-from fritzb88@yahoo.com) Message-ID: <20030124194829.47425.qmail@web10101.mail.yahoo.com> Received: from [207.17.136.129] by web10101.mail.yahoo.com via HTTP; Fri, 24 Jan 2003 11:48:29 PST Date: Fri, 24 Jan 2003 11:48:29 -0800 (PST) From: Budiyanto Fritz Subject: Re: bugs /kernel: file: table is full To: Gregory Bond Cc: freebsd-bugs@FreeBSD.ORG, fritzb88@hotmail.com In-Reply-To: <200301240231.NAA08932@lightning.itga.com.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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 Hi Gregory, I did not event call connect(), I just did socket(..) call. I also did a test with socket(AF_IENT, SOCK_DGRAM, 0); and same behavior, it has nothing todo with TCP. Anyway I left the system for 1 day, and file descriptor is not released yet. It says file table is full. I think this is a bug, where file descriptor is leaking somewhere fritz --- Gregory Bond wrote: > > 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. > > > > __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message