NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: kern/46221: Kernel panic in NFS server code
The following reply was made to PR kern/46221; it has been noted by GNATS.
From: Manuel Bouyer <bouyer%antioche.eu.org@localhost>
To: Matthias Scheler <tron%zhadum.org.uk@localhost>
Cc: gnats-bugs%NetBSD.org@localhost
Subject: Re: kern/46221: Kernel panic in NFS server code
Date: Fri, 23 Mar 2012 10:33:49 +0100
--FL5UXtIhxfXey3p5
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
On Fri, Mar 23, 2012 at 12:01:16AM +0000, Matthias Scheler wrote:
> On Wed, Mar 21, 2012 at 06:10:07PM +0000, Manuel Bouyer wrote:
> > The code has changed in this area; I'm not sure the same code will
> > work (there is a KASSERT in cleanvnode() that, I think, would
> > have fired if we had the same senario). There is also a KASSERT()
> > in vget() that we're not returning a clean vnode.
> >
> > I wonder if while we're slepping on vp->v_interlock, the vnode could
> > have been moved to another filesystem ...
> > printing the vnode when the problem happens will really help.
>
> The new code in ufs_fhtovp() finally triggered.
> Here is the output of vprint():
>
> ufs_fhtovp: ip == NULL on vp %p
> : vnode @ 0xfffffe8169463be0, flags (0x80010<MPSAFE,CLEAN>)
> tag VT_NON(0), type VREG(1), usecount 1, writecount 0, holdcount 0
> freelisthd 0x0, mount 0xfffffe8214f82000, data 0x0 lock
> 0xfffffe8169463cf0
So it got a clean vnode. This is bad.
I suspect ufs_ihashget() is returnning the clean vnode; otherwise it has to be
in ffs_vget() itself.
Can you run a kernel with the attached patch and see if one of the KASSERT
fires ? You can probably turn the check to a printf if you want to
avoid the panic.
--
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
NetBSD: 26 ans d'experience feront toujours la difference
--
--FL5UXtIhxfXey3p5
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=diff
Index: ffs/ffs_vfsops.c
===================================================================
RCS file: /cvsroot/src/sys/ufs/ffs/ffs_vfsops.c,v
retrieving revision 1.269
diff -u -p -u -r1.269 ffs_vfsops.c
--- ffs/ffs_vfsops.c 7 Oct 2011 09:35:07 -0000 1.269
+++ ffs/ffs_vfsops.c 23 Mar 2012 09:31:56 -0000
@@ -1867,6 +1867,7 @@ ffs_vget(struct mount *mp, ino_t ino, st
} /* XXX */
uvm_vnp_setsize(vp, ip->i_size);
*vpp = vp;
+ KASSERT((vp->v_iflag & VI_CLEAN) == 0);
return (0);
}
Index: ufs/ufs_ihash.c
===================================================================
RCS file: /cvsroot/src/sys/ufs/ufs/ufs_ihash.c,v
retrieving revision 1.31
diff -u -p -u -r1.31 ufs_ihash.c
--- ufs/ufs_ihash.c 12 Jun 2011 03:36:02 -0000 1.31
+++ ufs/ufs_ihash.c 23 Mar 2012 09:31:56 -0000
@@ -153,6 +153,7 @@ ufs_ihashget(dev_t dev, ino_t inum, int
if (vget(vp, flags))
goto loop;
}
+ KASSERT((vp->v_iflag & VI_CLEAN) == 0);
return (vp);
}
}
--FL5UXtIhxfXey3p5--
Home |
Main Index |
Thread Index |
Old Index