From owner-freebsd-current Fri Jul 12 15:43:15 2002 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 BB63737B405 for ; Fri, 12 Jul 2002 15:43:07 -0700 (PDT) Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11]) by mx1.FreeBSD.org (Postfix) with SMTP id D46F0443D4 for ; Fri, 12 Jul 2002 14:20:36 -0700 (PDT) (envelope-from iedowse@maths.tcd.ie) Received: from walton.maths.tcd.ie by salmon.maths.tcd.ie with SMTP id ; 12 Jul 2002 22:18:36 +0100 (BST) To: "Andrey A. Chernov" Cc: current@freebsd.org Subject: Re: bdwrite: buffer is not busy In-Reply-To: Your message of "Fri, 12 Jul 2002 22:25:35 +0400." <20020712182534.GA336@nagual.pp.ru> Date: Fri, 12 Jul 2002 22:18:35 +0100 From: Ian Dowse Message-ID: <200207122218.aa20866@salmon.maths.tcd.ie> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message <20020712182534.GA336@nagual.pp.ru>, "Andrey A. Chernov" writes: >I see this panic constantly during last month or two, UP machine, no >softupdates. Anybody else saw it too? Any ideas? The "buffer is not busy" panic is usually a secondary panic that occurs while trying to sync the disks after a different panic. If possible, try to get the first panic message, or ideally a stack trace. I think (but I've never checked for sure) that the "buffer is not busy" panics occur because of the following code in lockmgr(), combined with later sanity checks: if (panicstr != NULL) { mtx_unlock(lkp->lk_interlock); return (0); } This basically causes all lockmgr locks to be unconditionally and immediately granted after a panic without actually marking the lock as locked. Not surprisingly, this causes any lock state sanity checks later to fail. The original intention was probably to avoid deadlocking while syncing the disks, but a virtually guaranteed secondary panic isn't helpful either. It might be worth checking if a "return (EBUSY);" or a "lkp->lk_flags |= LK_HAVE_EXCL; lkp->lk_lockholder = pid;" in here would do better. The alternative is to make "kern.sync_on_panic=0" the default. Ian To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message