Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 23 Jul 2011 00:23:36 +0300
From:      Kostik Belousov <kostikbel@gmail.com>
To:        Rick Macklem <rmacklem@uoguelph.ca>
Cc:        Jeremiah Lott <jlott@averesystems.com>, John Baldwin <jhb@freebsd.org>, freebsd-net@freebsd.org
Subject:   Re: LOR with nfsclient "sillyrename"
Message-ID:  <20110722212336.GB17489@deviant.kiev.zoral.com.ua>
In-Reply-To: <1931983408.909766.1311369086133.JavaMail.root@erie.cs.uoguelph.ca>
References:  <44626428-CF14-4B20-AB57-6D4E8F4678AE@averesystems.com> <1931983408.909766.1311369086133.JavaMail.root@erie.cs.uoguelph.ca>

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

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

On Fri, Jul 22, 2011 at 05:11:26PM -0400, Rick Macklem wrote:
> Jeremiah Lott wrote:
> > We're seeing nfsclient deadlocks with what looks like lock order
> > reversal after removing a "silly rename". It is fairly rare, but we've
> > seen it happen a few times. I included relevant back traces from an
> > occurrence. From what I can see, nfs_inactive() is called with the
> > vnode locked. If there is a silly-rename, it will call vrele() on its
> > parent directory, which can potentially try to lock the parent
> > directory. Since this is the opposite order of the lock acquisition in
> > lookup, it can deadlock. This happened in a FreeBSD7 build, but I
> > looked through freebsd head and didn't see any change that addressed
> > this. Anyone seen this before?
> >=20
> > Jeremiah Lott
> > Avere Systems
> >=20
> Please try the attached patch (which is also at):
>   http://people.freebsd.org/~rmacklem/oldsilly.patch
>   http://people.freebsd.org/~rmacklem/newsilly.patch
> (for the old and new clients in -current, respectively)
>=20
> - I think oldsilly.patch should apply to the 7.n kernel
>   sources, although you might have to do the edit by hand?
>=20
> The patch is based on what jhb@ posted, with changes as recommended
> by kib@.
>=20
> Please let me know how testing goes with it, rick
> ps: Kostik, could you please review this, thanks.
>=20
It looks fine to me, lets see how the testing goes.



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

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (FreeBSD)

iEYEARECAAYFAk4p6lgACgkQC3+MBN1Mb4gThQCg3coFHpaNXcWomPxJPmTMl0/Z
zNwAoLW5ClpZUSA2eP5veNSelmGXjn56
=yIlz
-----END PGP SIGNATURE-----

--u7HsstwThBMwNUgg--



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