Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 Mar 2006 16:30:29 -0500
From:      John Baldwin <jhb@freebsd.org>
To:        Kris Kennaway <kris@obsecurity.org>
Cc:        freebsd-current@freebsd.org, current@freebsd.org
Subject:   Re: "spin lock sched lock held by 0xc63b7870 for > 5 seconds" at reboot
Message-ID:  <200603081630.32617.jhb@freebsd.org>
In-Reply-To: <20060308211501.GA52538@xor.obsecurity.org>
References:  <20060308195906.GA51429@xor.obsecurity.org> <200603081504.35845.jhb@freebsd.org> <20060308211501.GA52538@xor.obsecurity.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wednesday 08 March 2006 16:15, Kris Kennaway wrote:
> On Wed, Mar 08, 2006 at 03:04:33PM -0500, John Baldwin wrote:
> > On Wednesday 08 March 2006 14:59, Kris Kennaway wrote:
> > > i386 SMP server, up-to-date current:
> > 
> > Yes, I know about this one and had sent a workaround to someone
> > I thought.  I think the real fix is that we need to disable
> > interrupts in cpu_reset() (perhaps earlier, our whole SMP
> > shutdown sequence needs thought I think, i.e. I think we
> > need to IPI all the CPUs during a non-panic shutdown to ask
> > them to go idle and block until that happens and then
> > disable interrupts and finish the shutdown).
> 
> OK, cool.  I'm happy to test the workaround if you can find it.

Here's a workaround from scratch:

Index: vm_machdep.c
===================================================================
RCS file: /usr/cvs/src/sys/i386/i386/vm_machdep.c,v
retrieving revision 1.267
diff -u -r1.267 vm_machdep.c
--- vm_machdep.c	14 Nov 2005 00:43:44 -0000	1.267
+++ vm_machdep.c	8 Mar 2006 21:29:48 -0000
@@ -528,6 +528,7 @@
 cpu_reset_proxy()
 {
 
+	disable_intr();
 	cpu_reset_proxy_active = 1;
 	while (cpu_reset_proxy_active == 1)
 		;	/* Wait for other cpu to see that we've started */
@@ -552,6 +553,7 @@
 #ifdef SMP
 	u_int cnt, map;
 
+	disable_intr();
 	if (smp_active) {
 		map = PCPU_GET(other_cpus) & ~stopped_cpus;
 		if (map != 0) {


-- 
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?200603081630.32617.jhb>