Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 Sep 2005 16:21:13 -0400
From:      John Baldwin <jhb@FreeBSD.org>
To:        Doug Barton <dougb@FreeBSD.org>
Cc:        freebsd-current@FreeBSD.org, Harald Schmalzbauer <harry@schmalzbauer.de>
Subject:   Re: nvidia kld panic with debug kernel
Message-ID:  <200509231621.14965.jhb@FreeBSD.org>
In-Reply-To: <4333A6F7.1060400@FreeBSD.org>
References:  <1127245262.32486.1.camel@akima.flintsbach.schmalzbauer.de> <200509211738.42593.jhb@FreeBSD.org> <4333A6F7.1060400@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Friday 23 September 2005 02:55 am, Doug Barton wrote:
> John Baldwin wrote:
> > On Wednesday 21 September 2005 05:28 pm, Harald Schmalzbauer wrote:
> >>Am Mittwoch, 21. September 2005 22:51 CEST schrieb John Baldwin:
> >>>On Tuesday 20 September 2005 03:41 pm, Harald Schmalzbauer wrote:
> >>>>Hello,
> >>>>
> >>>>I get the following panic when using the nvidia driver with a debug
> >>>>kernel, when I disable INVARIANTS and WITNESS everything is working
> >>>>fine!
> >>>>
> >>>>Here's the trace:
> >>>>
> >>>>ACPI APIC Table: <D815EA EA81510A>
> >>>>ioapic0: Changing APIC ID to 1
> >>>>ioapic0 <Version 2.0> irqs 0-23 on motherboard
> >>>>panic: spin lock rm.mutex_mtx not in order list
> >>>
> >>>You need to add an entry for "rm.mutex_mtx" to the static spin lock
> >>>order list in sys/kern/subr_witness.c.  Something like this:
> >>>
> >>>Index: subr_witness.c
> >>>===================================================================
> >>>RCS file: /usr/cvs/src/sys/kern/subr_witness.c,v
> >>>retrieving revision 1.201
> >>>diff -u -r1.201 subr_witness.c
> >>>--- subr_witness.c      15 Sep 2005 19:07:14 -0000      1.201
> >>>+++ subr_witness.c      21 Sep 2005 20:50:45 -0000
> >>>@@ -363,6 +363,7 @@
> >>> #ifdef SMP
> >>>        { "ap boot", &lock_class_mtx_spin },
> >>> #endif
> >>>+       { "rm.mutex_mtx", &lock_class_mtx_spin },
> >>>        { "sio", &lock_class_mtx_spin },
> >>> #ifdef __i386__
> >>>        { "cy", &lock_class_mtx_spin },
> >>
> >>Thanks for your attention! I don't exactly know what this does and why I
> >>should add this spinlock exclude, I posted this error because somewhere
> >>between early BETA4 and late BETA4 I could run the nvidia driver with
> >>debug kernels without this panic. Short before BETA5 this changed back to
> >>the panic I've already seen before BETA4, so I posted it here.
> >>If it is something harmless it's safe to ignore my post, if it's
> >> something which reflects a bug I hope I could help.
> >
> > It has to do with the WITNESS kernel option.  WITNESS has to be
> > explicitly told about each spin mutex in the kernel.
>
> Would having this in the base adversely affect those who don't use the
> driver? In other words, is there any reason not to just add this?

No, and I'll happily commit it as soon as I get a report that the patch fixes 
the problem.

-- 
John Baldwin <jhb@FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve"  =  http://www.FreeBSD.org



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