From owner-freebsd-fs@FreeBSD.ORG Mon Aug 1 01:27: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 441A616A41F for ; Mon, 1 Aug 2005 01:27:15 +0000 (GMT) (envelope-from rick@snowhite.cis.uoguelph.ca) Received: from moe.cs.uoguelph.ca (moe.cs.uoguelph.ca [131.104.96.55]) by mx1.FreeBSD.org (Postfix) with ESMTP id C368243D53 for ; Mon, 1 Aug 2005 01:27: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 moe.cs.uoguelph.ca (8.13.1/8.13.1) with ESMTP id j711RDXm021456; Sun, 31 Jul 2005 21:27:13 -0400 Received: (from rick@localhost) by snowhite.cis.uoguelph.ca (8.9.3/8.9.3) id VAA29962; Sun, 31 Jul 2005 21:27:43 -0400 (EDT) Date: Sun, 31 Jul 2005 21:27:43 -0400 (EDT) From: rick@snowhite.cis.uoguelph.ca Message-Id: <200508010127.VAA29962@snowhite.cis.uoguelph.ca> To: kris@obsecurity.org X-Scanned-By: MIMEDefang 2.44 Cc: fs@freebsd.org, openbsd-nfsv4@sfobug.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: Mon, 01 Aug 2005 01:27:15 -0000 I've just put a little patch up ftp://ftp.cis.uoguelph.ca/pub/nfsv4/patch2-freebsd6.0-bet1.diffc (which is also appended to this message) that seems to fix the panics that I reproduced when testing with: option DEBUG_VFS_LOCKS option DEBUG_LOCKS I will be doing further testing on FreeBSD6.0-BETA1 and will cut new tarballs, but you can try the patch in the meantime, since I think it fixes the panic you saw. rick ps: I've got a hunch similar fixes are needed for the older versions of FreeBSD, but I'll check into that and create separate patches, as required. --- patch diffc --- *** newnfs/nfs/nfsport.h.orig Sun Jul 31 21:17:25 2005 --- newnfs/nfs/nfsport.h Sun Jul 31 21:19:54 2005 *************** *** 433,439 **** /* * Defined as the VOP_ISLOCKED macro. */ ! #define NFSVOPISLOCKED(v, p) VOP_ISLOCKED((v), (p)) /* * Increment the fp count. --- 433,439 ---- /* * Defined as the VOP_ISLOCKED macro. */ ! #define NFSVOPISLOCKED(v, p) (VOP_ISLOCKED((v), (p)) == LK_EXCLUSIVE) /* * Increment the fp count. *** newnfs/nfsd/nfsd_srv4root.c.orig Sun Jul 31 21:14:36 2005 --- newnfs/nfsd/nfsd_srv4root.c Sun Jul 31 21:15:03 2005 *************** *** 294,303 **** if (cnp->cn_nameiop != LOOKUP && (flags & ISLASTCN)) cnp->cn_flags |= SAVENAME; *(ap->a_vpp) = newvp; - if (!lockparent || !(flags & ISLASTCN)) { - VOP_UNLOCK(nfsv4root_vp, 0, p); - cnp->cn_flags |= PDIRUNLOCK; - } return (0); } cp += dp->d_reclen; --- 294,299 ----