From owner-freebsd-current@FreeBSD.ORG Thu Dec 18 11:42:46 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9C51016A4CE for ; Thu, 18 Dec 2003 11:42:46 -0800 (PST) Received: from cs.columbia.edu (cs.columbia.edu [128.59.16.20]) by mx1.FreeBSD.org (Postfix) with ESMTP id 941F443D50 for ; Thu, 18 Dec 2003 11:42:43 -0800 (PST) (envelope-from lennox@cs.columbia.edu) Received: from cnr.cs.columbia.edu (cnr.cs.columbia.edu [128.59.19.133]) by cs.columbia.edu (8.12.10/8.12.10) with ESMTP id hBIJggiF013782 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 18 Dec 2003 14:42:42 -0500 (EST) Received: from cnr.cs.columbia.edu (localhost [127.0.0.1]) by cnr.cs.columbia.edu (8.12.9p1/8.12.9) with ESMTP id hBIJgY7j001035; Thu, 18 Dec 2003 14:42:34 -0500 (EST) (envelope-from lennox@cnr.cs.columbia.edu) Received: (from lennox@localhost) by cnr.cs.columbia.edu (8.12.9p1/8.12.9/Submit) id hBIJgI3J001013; Thu, 18 Dec 2003 14:42:18 -0500 (EST) From: Jonathan Lennox MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16354.794.607812.829319@cnr.cs.columbia.edu> Date: Thu, 18 Dec 2003 14:42:18 -0500 To: Michal Mertl In-Reply-To: <20031217110353.U94352@prg.traveller.cz> References: <20031217110353.U94352@prg.traveller.cz> X-Mailer: VM 7.17 under Emacs 20.7.1 cc: freebsd-current@freebsd.org Subject: Re: file descriptor leak in 5.2-RC X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Dec 2003 19:42:46 -0000 Michal Mertl writes: > For several weeks now I see my -current (now RELENG_5_2 to help test the > release) machine seems to be leaking file descriptors. After some time all > files (up to kern.maxfiles) are consumed. Do you have any statically-linked programs that use pthreads? There's a FD leak in gethostbyname(3) in multithreaded programs (actually, in the uthread wrapper for kevent(2), but gethostbyname(3) is the most common reason you'd see it) which was fixed in -CURRENT for programs linked with libc_r.so, but not for those linked with libc_r.a. See PR bin/58687 . This has a patch available. -- Jonathan Lennox lennox at cs dot columbia dot edu