Re: And probably the final crash for today's current :) (panic: filesystem goof: vop_panic[vop_print])

From: Jan Harkes <jaharkes_at_cs.cmu.edu>
Date: Tue, 21 Aug 2007 11:52:50 -0400
On Mon, Aug 20, 2007 at 11:52:01PM +0300, Kostik Belousov wrote:
> On Mon, Aug 20, 2007 at 11:40:29PM +0300, Nikolay Pavlov wrote:
> > I am testing latest coda client code. 
> > After simple ls -l /coda i am getting this panic:
> > 
> > vfs_badlock(c4448c80,e69729c0,c0b7efc0,c821ac3c,0) at vfs_badlock+0x23
> > assert_vop_locked(c821ac3c,c0acdaac,810,0,c65aca00,...) at 
> > assert_vop_locked+0x50
> > VOP_OPEN_APV(c4448c80,e6972a18,1,c483a500,c4867ab0,...) at 
> > VOP_OPEN_APV+0x8a
> > coda_open(e6972a8c,c0acdaac,c4864c00,0,e6972b80,...) at coda_open+0x11e
...
> Quite often, the "impossible" panics with vnode locking are happens
> because some other thread already paniced the kernel. Then, lockmgr
> passes all lock requests without actually locking. I would suggest
> looking around to make sure this is not the case there.

I think this is a valid vnode locking panic. In the coda_open function
(fs/coda/coda_vnops.c) we try to open the file which was handed down
by the userspace cache manager. However the code only grabs a reference,
there probably needs to be something extra around the VOP_OPEN to grab
the lock

I'm not totally up to speed on the FBSD locking, but I think the call to
VOP_OPEN needs to be surrounded by

    vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, td);  and
    ...
    VOP_UNLOCK(vp, 0, td);

I'm resyncing my freebsd install with current to see if I can reproduce
the panic and if this actually fixes it.

Jan
Received on Tue Aug 21 2007 - 13:52:53 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:16 UTC