From owner-freebsd-net@FreeBSD.ORG Fri Jul 22 21:23:44 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A572F1065672; Fri, 22 Jul 2011 21:23:44 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 094808FC08; Fri, 22 Jul 2011 21:23:43 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id p6MLNbQY023952 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 23 Jul 2011 00:23:37 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id p6MLNbNf043367; Sat, 23 Jul 2011 00:23:37 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id p6MLNacC043366; Sat, 23 Jul 2011 00:23:36 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 23 Jul 2011 00:23:36 +0300 From: Kostik Belousov To: Rick Macklem Message-ID: <20110722212336.GB17489@deviant.kiev.zoral.com.ua> References: <44626428-CF14-4B20-AB57-6D4E8F4678AE@averesystems.com> <1931983408.909766.1311369086133.JavaMail.root@erie.cs.uoguelph.ca> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="u7HsstwThBMwNUgg" Content-Disposition: inline In-Reply-To: <1931983408.909766.1311369086133.JavaMail.root@erie.cs.uoguelph.ca> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-3.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: Jeremiah Lott , John Baldwin , freebsd-net@freebsd.org Subject: Re: LOR with nfsclient "sillyrename" X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jul 2011 21:23:44 -0000 --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--