Re: file descriptor leak in 5.2-RC

From: Oliver Brandmueller <ob_at_e-Gitt.NET>
Date: Sat, 27 Dec 2003 14:29:32 +0100
Hi.

On Sat, Dec 27, 2003 at 12:53:20PM +0000, David Malone wrote:
> 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?

It's /dev/null !

lupin# pstat -f
2779/262144 open files
   LOC   TYPE   FLG  CNT MSG   DATA        OFFSET
c7effd8c pipe     RW   2   0 c7968560                0
c7a9d880 pipe     RW   3   0 c789a35c                0
c7fbadd0 inode    RW   1   0 c72fae38                0
c7aea374 inode    RW   1   0 c72fae38                0
c7fbad8c inode    RW   1   0 c72fae38                0
c7f9f550 inode    RW   1   0 c72fae38                0
c7fba61c inode    RW   1   0 c72fae38                0
[...]

lupin# fstat | fgrep c72fae38 | head -20
vscan    perl        8817    0 0xc72fae38  /dev          8 crw-rw-rw-    null  r
vscan    perl        8817    1 0xc72fae38  /dev          8 crw-rw-rw-    null  w
vscan    perl        8817    2 0xc72fae38  /dev          8 crw-rw-rw-    null  w
vscan    perl        8718    0 0xc72fae38  /dev          8 crw-rw-rw-    null  r
vscan    perl        8718    1 0xc72fae38  /dev          8 crw-rw-rw-    null  w
vscan    perl        8718    2 0xc72fae38  /dev          8 crw-rw-rw-    null  w

(here you find not only perl, but also exim and so on, but it seems it's 
perl that needs the most - but perl is also the most run process on the 
machine).

Hmm, not easy to get around /dev/null though ;-)

What the heck can go wrong with perl and /dev/null ?!

- Oliver

-- 
| Oliver Brandmueller | Offenbacher Str. 1  | Germany       D-14197 Berlin |
| Fon +49-172-3130856 | Fax +49-172-3145027 | WWW:   http://the.addict.de/ |
|               Ich bin das Internet. Sowahr ich Gott helfe.               |
| Eine gewerbliche Nutzung aller enthaltenen Adressen ist nicht gestattet! |
Received on Sat Dec 27 2003 - 04:29:35 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:35 UTC