From owner-freebsd-current@FreeBSD.ORG Wed Aug 10 16:42:56 2005 Return-Path: X-Original-To: freebsd-current@FreeBSD.org Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1F44B16A41F; Wed, 10 Aug 2005 16:42:56 +0000 (GMT) (envelope-from truckman@FreeBSD.org) Received: from gw.catspoiler.org (217-ip-163.nccn.net [209.79.217.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id CEFF343D58; Wed, 10 Aug 2005 16:42:55 +0000 (GMT) (envelope-from truckman@FreeBSD.org) Received: from FreeBSD.org (mousie.catspoiler.org [192.168.101.2]) by gw.catspoiler.org (8.13.3/8.13.3) with ESMTP id j7AGgjG3000645; Wed, 10 Aug 2005 09:42:49 -0700 (PDT) (envelope-from truckman@FreeBSD.org) Message-Id: <200508101642.j7AGgjG3000645@gw.catspoiler.org> Date: Wed, 10 Aug 2005 09:42:45 -0700 (PDT) From: Don Lewis To: ssouhlal@FreeBSD.org In-Reply-To: <7F34BFAD-BE04-4162-9F79-2E04DC46B209@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii Cc: kan@FreeBSD.org, freebsd-current@FreeBSD.org, thierry@herbelot.com Subject: Re: panic: lock (sleep mutex) vnode interlock not locked X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Aug 2005 16:42:56 -0000 On 10 Aug, Suleiman Souhlal wrote: > Hello, > > On Aug 10, 2005, at 12:18 PM, Suleiman Souhlal wrote: > >> Hi, >> >> On Aug 10, 2005, at 12:02 PM, Don Lewis wrote: >> >> >>> What is preventing VI_DOOMED from being set while we're waiting for >>> VOP_LOCK()? Contrary to what the VOP_LOCK(9) man page says about >>> LK_INTERLOCK, it looks like lockmgr() drops the vnode interlock >>> before >>> it attempts to grab the vnode lock. >>> >> >> VI_DOOMED is only set by vgonel(), and it requires both the vnode >> and the interlock locked. > > I read your message a bit too fast. I think you are right. We should > probably move the check for VI_DOOMED etc, after we've acquired the > vnode lock. If you just move the test, you'll probably want to add LK_NOWAIT to the VOP_LOCK() call to avoid stalling on a vnode that is in use.