From owner-freebsd-current@FreeBSD.ORG Fri Dec 19 20:38:54 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 421F616A4CE for ; Fri, 19 Dec 2003 20:38:54 -0800 (PST) Received: from obsecurity.dyndns.org (adsl-63-207-60-234.dsl.lsan03.pacbell.net [63.207.60.234]) by mx1.FreeBSD.org (Postfix) with ESMTP id F15DF43D39 for ; Fri, 19 Dec 2003 20:38:52 -0800 (PST) (envelope-from kris@obsecurity.org) Received: by obsecurity.dyndns.org (Postfix, from userid 1000) id 8153266C4F; Fri, 19 Dec 2003 20:38:52 -0800 (PST) Date: Fri, 19 Dec 2003 20:38:52 -0800 From: Kris Kennaway To: Michal Mertl Message-ID: <20031220043852.GA67473@xor.obsecurity.org> References: <20031217110353.U94352@prg.traveller.cz> <16354.794.607812.829319@cnr.cs.columbia.edu> <20031219112603.O37433@prg.traveller.cz> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="CE+1k2dSO48ffgeK" Content-Disposition: inline In-Reply-To: <20031219112603.O37433@prg.traveller.cz> User-Agent: Mutt/1.4.1i X-Mailman-Approved-At: Fri, 19 Dec 2003 20:40:58 -0800 cc: Jonathan Lennox 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: Sat, 20 Dec 2003 04:38:54 -0000 --CE+1k2dSO48ffgeK Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Dec 19, 2003 at 11:30:40AM +0100, Michal Mertl wrote: > On Thu, 18 Dec 2003, Jonathan Lennox wrote: > > 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 tim= e 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 ut= hread > > wrapper for kevent(2), but gethostbyname(3) is the most common reason y= ou'd > > see it) which was fixed in -CURRENT for programs linked with libc_r.so,= but > > not for those linked with libc_r.a. >=20 > I'm afraid this is different. When your program terminates the descriptors > are freed. You found a bug but it's not that serious as what I'm seeing - > even when I go to single-user I see large openfiles. Someone else already asked you to check fstat to see what the open files are, and suggested it's probably the dynamic linker (i.e. expected behaviour). What is the case? Kris --CE+1k2dSO48ffgeK Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (FreeBSD) iD8DBQE/49JcWry0BWjoQKURAoX+AKDueQSoStMhEVHxciNQ/NZNwj4znQCff86b 9CU//QTxqNXfxOeW7ptKG40= =2Kb6 -----END PGP SIGNATURE----- --CE+1k2dSO48ffgeK--