From owner-freebsd-current@FreeBSD.ORG Sat Dec 27 04:53:23 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 A704F16A4CE for ; Sat, 27 Dec 2003 04:53:23 -0800 (PST) Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11]) by mx1.FreeBSD.org (Postfix) with SMTP id 1A3E643D2F for ; Sat, 27 Dec 2003 04:53:22 -0800 (PST) (envelope-from dwmalone@maths.tcd.ie) Received: from walton.maths.tcd.ie by salmon.maths.tcd.ie with SMTP id ; 27 Dec 2003 12:53:21 +0000 (GMT) To: Oliver Brandmueller In-reply-to: Your message of "Sat, 27 Dec 2003 13:31:48 +0100." <20031227123148.GB77531@e-Gitt.NET> X-Request-Do: Date: Sat, 27 Dec 2003 12:53:20 +0000 From: David Malone Message-ID: <200312271253.aa04019@salmon.maths.tcd.ie> 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, 27 Dec 2003 12:53:23 -0000 > I had a quick look over the rest of the table, and it seems as if nearly > every other line looks the same as the fast few lines, except the LOC > value changing. kern.openfiles show 4332, so the pstat -f output > corresponds with these values just fine. > Does that mean, that with the same value for "DATA" it is the same file > all over that's opened? Can I somehow find the correspondig file? Hmmm - could be... The following patch to fstat prints the data field for inodes in fstat's output. I'd suggest: 1) Run until you have alot of the same inode stuck open. 2) Run pstat -f and get the data value. 3) Run fstat and grep for the data value in question. You might need to do 3 a few times, depending on how long the phantom inode is actually open for while the program is running. I wonder if it is some sort of device cloning/refcounting problem? David. Index: fstat.c =================================================================== RCS file: /cvs/FreeBSD-CVS/src/usr.bin/fstat/fstat.c,v retrieving revision 1.51 diff -u -r1.51 fstat.c --- fstat.c 24 Jun 2003 08:18:18 -0000 1.51 +++ fstat.c 27 Dec 2003 12:47:33 -0000 @@ -533,6 +526,9 @@ return; } PREFIX(i); + /* DMXXX */ + printf(" %p ", vp); + /* DMXXX */ if (badtype) { (void)printf(" - - %10s -\n", badtype); return;