Re: nullfs: panic: vrele: negative ref cnt

From: John Baldwin <jhb_at_freebsd.org>
Date: Tue, 10 Mar 2009 09:32:26 -0400
On Monday 09 March 2009 6:42:06 pm Paul B. Mahol wrote:
> On 3/9/09, John Baldwin <jhb_at_freebsd.org> wrote:
> > On Monday 09 March 2009 9:15:22 am Paul B. Mahol wrote:
> >> Hi,
> >> here is part of textdump:
> >>
> >> panic(c061db9e,0,c061cee6,88e,4,...) at panic+0x136
> >> vrele(c4326d9c,0,c433fb5f,82,c060f3c7,...) at vrele+0x111
> >> null_nodeget(c3fd4780,c4326d9c,c3ba8bf4,0,c3ba8be4,...) at
> >> null_nodeget+0xa0
> >> null_bypass(c3ba8be0,c3f35a78,c3ba8c28) at null_bypass+0x141
> >> VOP_VPTOCNP_APV(c4340240,c3ba8be0,c061bf01,387,c3cecc00,...) at
> >> VOP_VPTOCNP_APV+0xb3
> >
> > Try this.  null_bypass() can't handle VOP_VPTOCNP because VPTOCNP doesn't
> > return a vnode that is locked and VREF'd, but just a vnode that is
> > vhold()'d.
> > This patch attempts to give nullfs a VOP_VPTONCP() method which remaps the
> > directory vnode properly on return by locking the directory vnode while
> > invoking null_nodeget().
> 
> It livelocks active vty into [ufs] state. Will try with WITNESS kernel soon.

Oh, this is because it locks the directory while holding a leaf, so it's going 
to deadlock with pathname lookups.  kib_at_'s patch is probably ok even if it is 
a bit slower.

-- 
John Baldwin
Received on Tue Mar 10 2009 - 12:40:04 UTC

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