From owner-freebsd-current Thu Oct 5 18:55:43 2000 Delivered-To: freebsd-current@freebsd.org Received: from relay.butya.kz (butya-gw.butya.kz [212.154.129.94]) by hub.freebsd.org (Postfix) with ESMTP id D8E4D37B503; Thu, 5 Oct 2000 18:55:35 -0700 (PDT) Received: by relay.butya.kz (Postfix, from userid 1000) id B93CB28AB3; Fri, 6 Oct 2000 08:55:14 +0700 (ALMST) Received: from localhost (localhost [127.0.0.1]) by relay.butya.kz (Postfix) with ESMTP id A6B8828AAF; Fri, 6 Oct 2000 08:55:14 +0700 (ALMST) Date: Fri, 6 Oct 2000 08:55:14 +0700 (ALMST) From: Boris Popov To: John Baldwin Cc: freebsd-current@FreeBSD.org, freebsd-smp@FreeBSD.org Subject: RE: Problems with kthread_exit() and SMPng In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Thu, 5 Oct 2000, John Baldwin wrote: > You need Giant before calling kthread_exit(). Ok. > >> After some examination I've found that two fields in the Giant mutex > >> structure set to unexpected values: > > It should have died much earlier if you had INVARIANTS turned on. :( It > looks like you are releasing a mutex you probably do not own because > cpu_exit() (called by exit1() -> exit() -> kthread_exit()) releases Giant > as one of its final tasks. This is probably the bug somewhere in the diagnostic code. I have INVARIANTS/INVARIANT_SUPPORT/DIAGNOSTIC turned on and UP machine just panics in the mtx_exit_hard() while SMP machine silently reboots :( > This patch is bogus I'm afraid. A contested mutex should always have a > process waiting to grab it when it is released. Yes, it should be bogus. But diagnostic is rather useful :) -- Boris Popov http://www.butya.kz/~bp/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message