From owner-freebsd-smp Mon Oct 2 21: 4:26 2000 Delivered-To: freebsd-smp@freebsd.org Received: from mail.rdc1.va.home.com (ha1.rdc1.va.home.com [24.2.32.66]) by hub.freebsd.org (Postfix) with ESMTP id 3DB1B37B503 for ; Mon, 2 Oct 2000 21:04:24 -0700 (PDT) Received: from laptop.baldwin.cx ([24.6.244.187]) by mail.rdc1.va.home.com (InterMail vM.4.01.03.00 201-229-121) with ESMTP id <20001003040423.LPDG26082.mail.rdc1.va.home.com@laptop.baldwin.cx>; Mon, 2 Oct 2000 21:04:23 -0700 Content-Length: 1852 Message-ID: X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <20001002164139.I58256@canonware.com> Date: Mon, 02 Oct 2000 21:04:27 -0700 (PDT) From: John Baldwin To: Jason Evans Subject: Re: witness code status? Cc: freebsd-smp@FreeBSD.ORG, Steve Kargl Sender: owner-freebsd-smp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On 02-Oct-00 Jason Evans wrote: > On Mon, Oct 02, 2000 at 04:32:36PM -0700, Steve Kargl wrote: >> What's the current status of the integration of BSDi's >> witness code? If I include "options WITNESS" in my kernel >> config file, I get an immediate panic at boot. My sources >> are from today (01 Oct 00), and the system is currently >> running a MP kernel (built without the witness code). >> >> PS: Yes, I know there will be periods of instability, but >> you (the SMP developers) can't possibly have all combinations >> of MP hardware. > > I (and others) have been running kernels with the witness code enabled for > over a month. The witness code's purpose is to detect lock cycles that > could cause deadlock, among other incorrect mutex uses. The stack trace > and panic message in your email seem indicate a programming error. In > other words, the witness code is doing its job. Except that it's not in this case. The error indicates that mtx_enter() is being called with MTX_SPIN, but if you look in sys/dev/randomdev/*, all of the mtx_*() functions use MTX_DEF. It's a bug alright, but not in the random code. > Jason > >> panic: mutex_enter: MTX_DEF on MTX_SPIN mutex random harvest\ >> @/usr/src/sys/modules/randomdev/../../dev/randomdev/yarrow.c:515 >> cpuid = 1; lapic.id = 00000000 >> Debugger("panic') >> >> CPU1 stopping CPUs: 0x00000001 stopped >> Stopped at Debugger+0x38: movb $0,in_Debugger.684 >> >> db>trace >> Debugger(c0277da1) >> panic >> witness_enter >> _mtx_enter >> random_harvest_internal >> write_random >> random_write >> ufs_vnoperatespec >> vn_write >> dofilewrite >> write >> syscall2 >> Xint0x80_syscall -- John Baldwin -- http://www.FreeBSD.org/~jhb/ PGP Key: http://www.baldwin.cx/~john/pgpkey.asc "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message