From owner-freebsd-current@FreeBSD.ORG Sat Dec 27 05:29:35 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 40A3016A4CE for ; Sat, 27 Dec 2003 05:29:35 -0800 (PST) Received: from obh.snafu.de (obh.snafu.de [213.73.92.34]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4CAB043D2F for ; Sat, 27 Dec 2003 05:29:33 -0800 (PST) (envelope-from ob@gruft.de) Received: from ob by obh.snafu.de with local (Exim 3.36 #1) id 1AaEVY-000NX0-00; Sat, 27 Dec 2003 14:29:32 +0100 Date: Sat, 27 Dec 2003 14:29:32 +0100 From: Oliver Brandmueller To: David Malone Message-ID: <20031227132932.GA86308@e-Gitt.NET> Mail-Followup-To: David Malone , freebsd-current@freebsd.org References: <20031227123148.GB77531@e-Gitt.NET> <200312271253.aa04019@salmon.maths.tcd.ie> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200312271253.aa04019@salmon.maths.tcd.ie> User-Agent: Mutt/1.5.5.1i Sender: Oliver Brandmueller 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 13:29:35 -0000 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! |