Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 27 Dec 2003 12:53:20 +0000
From:      David Malone <dwmalone@maths.tcd.ie>
To:        Oliver Brandmueller <ob@e-Gitt.NET>
Cc:        freebsd-current@freebsd.org
Subject:   Re: file descriptor leak in 5.2-RC 
Message-ID:  <200312271253.aa04019@salmon.maths.tcd.ie>
In-Reply-To: Your message of "Sat, 27 Dec 2003 13:31:48 %2B0100." <20031227123148.GB77531@e-Gitt.NET> 

next in thread | previous in thread | raw e-mail | index | archive | help
> 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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200312271253.aa04019>