file descriptor leak in 5.2-RC
David Malone
dwmalone at maths.tcd.ie
Sat Dec 27 04:53:23 PST 2003
> 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;
More information about the freebsd-current
mailing list