Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 19 Apr 2009 08:44:11 +1200
From:      Jonathan Chen <jonc@chen.org.nz>
To:        Joe Marcus Clarke <marcus@marcuscom.com>
Cc:        freebsd-gnome@freebsd.org
Subject:   Re: console-kit-daemon leaking file descriptors?
Message-ID:  <20090418204411.GA73963@osiris.chen.org.nz>
In-Reply-To: <1240080177.18976.63.camel@shumai.marcuscom.com>
References:  <20090418105855.GA61453@osiris.chen.org.nz> <1240080177.18976.63.camel@shumai.marcuscom.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Apr 18, 2009 at 02:42:57PM -0400, Joe Marcus Clarke wrote:
> On Sat, 2009-04-18 at 22:58 +1200, Jonathan Chen wrote:
> > Hi,
> > 
> > I'm running consolekit-0.3.0_6, and I'm seeing a file descriptor leak
> > on /dev/null. A "fstat -p pid" on console-kit-daemon on my
> > machine reveals that inode 7 (ie: /dev/null) has been opened with "r"
> > 1000+ times after a week or so of uptime.
> > 
> > Is anyone else seeing this?
> 
> No.  After a day and half of uptime, I have stdin, stdout, and stderr
> open to /dev/null, plus one additional /dev/null on FD 4.  If there was
> a linear leak, I should have /dev/null open over 100 times by now.  Can
> you reliably reproduce this leak on your system?

I've killed console-kit-daemon, and when it automatically restarts after
a gdm login, I see the output below. 36 read-opens on /dev/null so
far - which looks pretty suspicious. I'm running 7.1-STABLE FreeBSD
as of "Apr 3 08:10:13 NZDT 2009".

-- 
Jonathan Chen <jonc@chen.org.nz>
----------------------------------------------------------------------
                                             When all else fails, RTFM

    % fstat | grep console-kit
    root     console-kit-daemon 61277 root /             2 drwxr-xr-x     512  r
    root     console-kit-daemon 61277   wd /             2 drwxr-xr-x     512  r
    root     console-kit-daemon 61277 text /usr     1602010 -r-xr-xr-x  129856  r
    root     console-kit-daemon 61277    0 /dev          7 crw-rw-rw-    null rw
    root     console-kit-daemon 61277    1 /dev          7 crw-rw-rw-    null rw
    root     console-kit-daemon 61277    2 /dev          7 crw-rw-rw-    null rw
    root     console-kit-daemon 61277    3* pipe ffffff00aee492e8 <-> ffffff00aee49440      0 rw
    root     console-kit-daemon 61277    4 /dev          7 crw-rw-rw-    null rw
    root     console-kit-daemon 61277    5* pipe ffffff00aee49440 <-> ffffff00aee492e8      0 rw
    root     console-kit-daemon 61277    6 /usr     141383 drwxr-xr-x     512  r
    root     console-kit-daemon 61277    7* pipe ffffff0004f1aba0 <-> ffffff0004f1acf8      0 rw
    root     console-kit-daemon 61277    8* pipe ffffff0004f1acf8 <-> ffffff0004f1aba0      0 rw
    root     console-kit-daemon 61277    9* local stream ffffff00764618b8 <-> ffffff00764878b8
    root     console-kit-daemon 61277   10 /var     612433 -rw-r--r--  164448  w
    root     console-kit-daemon 61277   11 /usr     1629369 drwxr-xr-x    1024  r
    root     console-kit-daemon 61277   12 /dev         83 crw-------  consolectl  r
    root     console-kit-daemon 61277   14 /usr     164931 -r--r--r--     403  r
    root     console-kit-daemon 61277   15 /var     400395 -rw-rw-r--       0  r
    root     console-kit-daemon 61277   16 /dev          7 crw-rw-rw-    null  r
    root     console-kit-daemon 61277   17 /dev          7 crw-rw-rw-    null  r
    root     console-kit-daemon 61277   18* local dgram ffffff0076ada0f8 <-> ffffff0004dad0f8
    root     console-kit-daemon 61277   19 /dev          7 crw-rw-rw-    null  r
    root     console-kit-daemon 61277   20 /dev          7 crw-rw-rw-    null  r
    root     console-kit-daemon 61277   21 /dev          7 crw-rw-rw-    null  r
    root     console-kit-daemon 61277   22 /dev          7 crw-rw-rw-    null  r
    root     console-kit-daemon 61277   23 /dev          7 crw-rw-rw-    null  r
    root     console-kit-daemon 61277   24 /dev          7 crw-rw-rw-    null  r
    root     console-kit-daemon 61277   25 /dev          7 crw-rw-rw-    null  r
    root     console-kit-daemon 61277   26 /dev          7 crw-rw-rw-    null  r
    root     console-kit-daemon 61277   27 /dev          7 crw-rw-rw-    null  r
    root     console-kit-daemon 61277   28 /dev          7 crw-rw-rw-    null  r
    root     console-kit-daemon 61277   29 /dev          7 crw-rw-rw-    null  r
    root     console-kit-daemon 61277   30 /dev          7 crw-rw-rw-    null  r
    root     console-kit-daemon 61277   31 /dev          7 crw-rw-rw-    null  r
    root     console-kit-daemon 61277   32 /dev          7 crw-rw-rw-    null  r
    root     console-kit-daemon 61277   33 /dev          7 crw-rw-rw-    null  r
    root     console-kit-daemon 61277   34 /dev          7 crw-rw-rw-    null  r
    root     console-kit-daemon 61277   35 /dev          7 crw-rw-rw-    null  r
    root     console-kit-daemon 61277   36 /dev          7 crw-rw-rw-    null  r
    root     console-kit-daemon 61277   37 /dev          7 crw-rw-rw-    null  r
    root     console-kit-daemon 61277   38 /dev          7 crw-rw-rw-    null  r
    root     console-kit-daemon 61277   39 /dev          7 crw-rw-rw-    null  r
    root     console-kit-daemon 61277   40 /dev          7 crw-rw-rw-    null  r
    root     console-kit-daemon 61277   41 /dev          7 crw-rw-rw-    null  r
    root     console-kit-daemon 61277   42 /dev          7 crw-rw-rw-    null  r
    root     console-kit-daemon 61277   43 /dev          7 crw-rw-rw-    null  r
    root     console-kit-daemon 61277   44 /dev          7 crw-rw-rw-    null  r
    root     console-kit-daemon 61277   45 /dev          7 crw-rw-rw-    null  r
    root     console-kit-daemon 61277   46 /dev          7 crw-rw-rw-    null  r
    root     console-kit-daemon 61277   47 /dev          7 crw-rw-rw-    null  r
    root     console-kit-daemon 61277   48 /dev          7 crw-rw-rw-    null  r
    root     console-kit-daemon 61277   49 /dev          7 crw-rw-rw-    null  r
    root     console-kit-daemon 61277   50 /dev          7 crw-rw-rw-    null  r
    root     console-kit-daemon 61277   51 /dev          7 crw-rw-rw-    null  r
    root     console-kit-daemon 61277   52 /dev          7 crw-rw-rw-    null  r
    root     console-kit-daemon 61277   53 /dev          7 crw-rw-rw-    null  r
    root     console-kit-daemon 61277   54 /dev          7 crw-rw-rw-    null  r



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