panic: sx_xlock() of destroyed sx @
/zoo/kris/src8/sys/modules/zfs/../../cddl/contrib/opensolaris/uts/co
mmon/fs/zfs/zfs_rlock.c:535
Pawel Jakub Dawidek
pjd at FreeBSD.org
Sat Sep 12 15:32:41 UTC 2009
On Sat, Sep 12, 2009 at 12:03:53PM +0300, Jaakko Heinonen wrote:
> On 2009-09-11, Pawel Jakub Dawidek wrote:
> > > >panic: sx_xlock() of destroyed sx @
> > > >/zoo/kris/src8/sys/modules/zfs/../../cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_rlock.c:535
> >
> > I was trying to reproduce it by doing much more frequent syncs and
> > lowering vnodes limit, so they are inactivated more often, but I wasn't
> > able to reproduce it.
> >
> > The problem here is that we lock a range for the given znode, but before
> > we unlock the range, znode is destroyed.
>
> I wonder if this could be related to PR kern/132068 (i.e. zfs_zget() can
> return reclaimed vnodes).
>
> If you can reproduce the panic you could try this patch:
>
> http://www.saunalahti.fi/~jh3/patches/zfs_zget-vnode-reclaim-race.diff
Good catch. I modifed the kernel to reclaim all vnodes on every
getnewvnode() and also slowed down zfs_reclaim_complete() and I was able
to reproduce this race. I also found another problem - when we defer
znode destruction there is a race where file system unmount or rollback
can be called between zfs_freebsd_reclaim() and zfs_reclaim_complete(),
which can case various problems. I almost have a patch ready, but it
needs some more work. I'll post it ASAP.
--
Pawel Jakub Dawidek http://www.wheel.pl
pjd at FreeBSD.org http://www.FreeBSD.org
FreeBSD committer Am I Evil? Yes, I Am!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20090912/623b311c/attachment.pgp
More information about the freebsd-current
mailing list