From owner-freebsd-fs@FreeBSD.ORG Tue Aug 2 16:50:15 2005 Return-Path: X-Original-To: fs@freebsd.org Delivered-To: freebsd-fs@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7DCB316A41F for ; Tue, 2 Aug 2005 16:50:15 +0000 (GMT) (envelope-from rick@snowhite.cis.uoguelph.ca) Received: from mailhub.cs.uoguelph.ca (mailhub.cs.uoguelph.ca [131.104.96.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2F35D43D46 for ; Tue, 2 Aug 2005 16:50:14 +0000 (GMT) (envelope-from rick@snowhite.cis.uoguelph.ca) Received: from snowhite.cis.uoguelph.ca (snowhite.cis.uoguelph.ca [131.104.48.1]) by mailhub.cs.uoguelph.ca (8.13.1/8.13.1) with ESMTP id j72GoDg8006585; Tue, 2 Aug 2005 12:50:13 -0400 Received: (from rick@localhost) by snowhite.cis.uoguelph.ca (8.9.3/8.9.3) id MAA45945; Tue, 2 Aug 2005 12:50:42 -0400 (EDT) Date: Tue, 2 Aug 2005 12:50:42 -0400 (EDT) From: rick@snowhite.cis.uoguelph.ca Message-Id: <200508021650.MAA45945@snowhite.cis.uoguelph.ca> To: kris@obsecurity.org X-Scanned-By: MIMEDefang 2.44 Cc: fs@freebsd.org, openbsd-nfsv4@sfobugs.org Subject: Re: FreeBSD6.0-BETA1 panics X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Aug 2005 16:50:15 -0000 > Didn't help. Running two cvs updates over NFS and one locally over > ufs (all against the same repo) again caused a deadlock in a few > seconds: [good diagnostic stuff snipped] Ok, the race is obvious (although the fix not quite so:-). It is specific to the FreeBSD port. Most of my development has been done under OpenBSD and it doesn't require the vnode to be locked for a VOP_GETATTR(). To "fix" this for FreeBSD, I put a little glue routine called nfsrvn_getattr() in that locks the vnode before the VOP_GETATTR() call. Unfortunately this caused the race to hit (and probably several others at other nfsrvn_getattr() calls). I think the fix is probably to move the call down until after the vnode that was looked up has been unlocked, but it will take a little time. For the OpenBSDers: This race won't be a problem in OpenBSD3.7. Thanks yet again for the testing and I'll let you know when I have something for you to try, rick