Date: Fri, 23 Dec 2005 10:24:59 +0200 From: Danny Braniss <danny@cs.huji.ac.il> To: Melvyn Sopacua <freebsd.stable@melvyn.homeunix.org> Cc: freebsd-stable@freebsd.org Subject: Re: lsof on 6.0 Message-ID: <E1EpiEV-0003r7-NN@cs1.cs.huji.ac.il> In-Reply-To: Message from Melvyn Sopacua <freebsd.stable@melvyn.homeunix.org> of "Thu, 22 Dec 2005 16:53:16 %2B0100." <200512221653.17351.freebsd.stable@melvyn.homeunix.org>
next in thread | previous in thread | raw e-mail | index | archive | help
> 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; > well, your patch has problems, but at least it pointed in the direction :-) / (root) is nfs mounted. the problem is in process_node(va) in dnode.c, that sets vtag to VT_UFS instead of VT_NFS because vtbuf is "ufs" after a call to kread((KA_T)v->v_tag... so, can someone with some more knowledge in vnodes follow this? I suspect the problem is in the kernel ... danny
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E1EpiEV-0003r7-NN>