Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 03 Oct 2000 11:25:02 -0700 (PDT)
From:      John Baldwin <jhb@FreeBSD.org>
To:        Mike Smith <msmith@FreeBSD.ORG>
Cc:        freebsd-smp@FreeBSD.ORG, Jason Evans <jasone@canonware.com>, Mark Murray <mark@grondar.za>
Subject:   Re: witness code status?
Message-ID:  <XFMail.001003112502.jhb@FreeBSD.org>
In-Reply-To: <200010030924.e939OOh05799@mass.osd.bsdi.com>

next in thread | previous in thread | raw e-mail | index | archive | help

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 <jhb@FreeBSD.org> -- 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.001003112502.jhb>