From owner-freebsd-smp Tue Oct 3 11:25: 6 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 3577C37B66F; Tue, 3 Oct 2000 11:24:59 -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 <20001003182458.SWKB26082.mail.rdc1.va.home.com@laptop.baldwin.cx>; Tue, 3 Oct 2000 11:24:58 -0700 Content-Length: 1567 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: <200010030924.e939OOh05799@mass.osd.bsdi.com> Date: Tue, 03 Oct 2000 11:25:02 -0700 (PDT) From: John Baldwin To: Mike Smith Subject: Re: witness code status? Cc: freebsd-smp@FreeBSD.ORG, Jason Evans , Mark Murray Sender: owner-freebsd-smp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On 03-Oct-00 Mike Smith wrote: >> > 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. >> >> Jason, >> >> I'd like to ask your help on this; It seems that turning WITNESS on causes >> the /dev/random driver to screw up royally. >> >> I thought I was quite careful about that. Now, I'm a bit out of my depth. >> >> Could you give me a hand? > ... >> > > panic: mutex_enter: MTX_DEF on MTX_SPIN mutex random harvest\ > > You initialised the 'random harvest' mutex with MTX_SPIN, but you are > trying to acquire it with MTX_DEF. You probably don't want a spin mutex > for this anyway. Uh. What code are you looking at Mike? [11:23:47] (ttyp0) john@laptop:/sys/dev/randomdev > grep mtx_init * yarrow.c: mtx_init(&random_reseed_mtx, "random reseed", MTX_DEF); yarrow.c: mtx_init(&random_harvest_mtx, "random harvest", MTX_DEF); This is _not_ a bug in the random code. I have used device random with the random thread and WITNESS w/o any problems at work. I'll give it a go here in just a sec. But this is not Mark's fault. -- 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