From owner-freebsd-stable@FreeBSD.ORG Thu Dec 22 15:53:19 2005 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 931DF16A41F for ; Thu, 22 Dec 2005 15:53:19 +0000 (GMT) (envelope-from freebsd.stable@melvyn.homeunix.org) Received: from sarevok.lan.melvyn.homeunix.org (i153153.upc-i.chello.nl [62.195.153.153]) by mx1.FreeBSD.org (Postfix) with ESMTP id E12A143D45 for ; Thu, 22 Dec 2005 15:53:18 +0000 (GMT) (envelope-from freebsd.stable@melvyn.homeunix.org) Received: by sarevok.lan.melvyn.homeunix.org (Postfix, from userid 100) id 9498911454; Thu, 22 Dec 2005 16:53:17 +0100 (CET) From: Melvyn Sopacua To: freebsd-stable@freebsd.org Date: Thu, 22 Dec 2005 16:53:16 +0100 User-Agent: KMail/1.8.3 References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200512221653.17351.freebsd.stable@melvyn.homeunix.org> Subject: Re: lsof on 6.0 X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Dec 2005 15:53:19 -0000 On Thursday 22 December 2005 16:27, Danny Braniss wrote: > > > > Do you have a mount which is a symlink? > > > > > > no, but many nfs. > > > minbari> mount > > > 132.65.16.100:/d/6 on / (nfs) > Breakpoint 1 at 0x402779: file dmnt.c, line 159. > (gdb) run > Starting program: > /home/pobj/r+d/ports/sysutils/lsof/work/lsof_4.77A.freebsd/ls of > lsof: WARNING: access /root/.lsof_shuttle-3: No such file or directory > lsof: WARNING: can't open /root/.lsof_shuttle-3: Read-only file system > > Breakpoint 1, dev2udev (c=0xe) at dmnt.c:159 > 159 if (ln != dn) > (gdb) print sr > $1 = -1 > (gdb) print ln > $2 = 0x525140 "132.65.16.100:/d/8" > (gdb) print dn > $3 = 0x525140 "132.65.16.100:/d/8" As I figured, statsafely (which wraps around stat(2)) returns -1 on your nfs mount, therefore ss never gets set. I've got no idea what the "user device random seed" is needed for, so I suggest you file a pr with the above info. Additionally, you can try the following patch to see why exactly the stat(2) call fails: --- dmnt.c.orig Mon Oct 3 15:22:52 2005 +++ dmnt.c Thu Dec 22 16:51:23 2005 @@ -163,6 +163,9 @@ dn = (char *)NULL; if (sr) continue; + else + (void)fprintf(stderr, "%s: cannot stat %s: %s\n", Pn, ln, strerror(errno)); + ss = 1; s = (u_int)sb.st_ino ^ (u_int)sb.st_rdev; break; -- Melvyn Sopacua freebsd.stable@melvyn.homeunix.org FreeBSD 6.0-STABLE Qt: 3.3.5 KDE: 3.4.3