Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 12 Sep 2009 17:32:30 +0200
From:      Pawel Jakub Dawidek <pjd@FreeBSD.org>
To:        Jaakko Heinonen <jh@saunalahti.fi>
Cc:        Kris Kennaway <kris@FreeBSD.org>, FreeBSD Current <freebsd-current@freebsd.org>, Kip Macy <kmacy@FreeBSD.org>
Subject:   Re: panic: sx_xlock() of destroyed sx @ /zoo/kris/src8/sys/modules/zfs/../../cddl/contrib/opensolaris/uts/co mmon/fs/zfs/zfs_rlock.c:535
Message-ID:  <20090912153230.GA5522@garage.freebsd.pl>
In-Reply-To: <20090912090353.GA806@a91-153-125-115.elisa-laajakaista.fi>
References:  <4AA40E30.50109@FreeBSD.org> <4AAA9187.2020907@FreeBSD.org> <20090911210053.GA2090@garage.freebsd.pl> <20090912090353.GA806@a91-153-125-115.elisa-laajakaista.fi>

next in thread | previous in thread | raw e-mail | index | archive | help

--EVF5PPMfhYS0aIcm
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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 @=20
> > > >/zoo/kris/src8/sys/modules/zfs/../../cddl/contrib/opensolaris/uts/co=
mmon/fs/zfs/zfs_rlock.c:535=20
> >=20
> > 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.
> >=20
> > The problem here is that we lock a range for the given znode, but before
> > we unlock the range, znode is destroyed.
>=20
> I wonder if this could be related to PR kern/132068 (i.e. zfs_zget() can
> return reclaimed vnodes).
>=20
> If you can reproduce the panic you could try this patch:
>=20
> 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.

--=20
Pawel Jakub Dawidek                       http://www.wheel.pl
pjd@FreeBSD.org                           http://www.FreeBSD.org
FreeBSD committer                         Am I Evil? Yes, I Am!

--EVF5PPMfhYS0aIcm
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.4 (FreeBSD)

iD8DBQFKq78OForvXbEpPzQRAvwQAKCk4+jKFEmHIyjstvCeRvGrnkybAQCfTs+o
RG/GjAuDr9gMnGlwZQJ6G10=
=DogF
-----END PGP SIGNATURE-----

--EVF5PPMfhYS0aIcm--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090912153230.GA5522>