Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 6 Oct 2000 08:55:14 +0700 (ALMST)
From:      Boris Popov <bp@butya.kz>
To:        John Baldwin <jhb@FreeBSD.org>
Cc:        freebsd-current@FreeBSD.org, freebsd-smp@FreeBSD.org
Subject:   RE: Problems with kthread_exit() and SMPng
Message-ID:  <Pine.BSF.4.10.10010060849270.48269-100000@lion.butya.kz>
In-Reply-To: <XFMail.001005144649.jhb@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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-smp" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.10.10010060849270.48269-100000>