Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 29 Sep 2000 02:16:58 +0200
From:      Tor.Egge@fast.no
To:        sgk@troutmask.apl.washington.edu
Cc:        freebsd-smp@FreeBSD.ORG
Subject:   Re: 2 panics with MP kernels
Message-ID:  <200009290016.CAA45617@midten.fast.no>
In-Reply-To: Your message of "Thu, 28 Sep 2000 13:17:25 -0700 (PDT)"
References:  <200009282017.e8SKHPg00809@troutmask.apl.washington.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
----Next_Part(Fri_Sep_29_02:16:07_2000)--
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit


> Again, I haven't been able to convince the system to
> produce a crash dump.

Currently, recursive panics on SMP machines causes infinite recursion
due to s_lock calling panic if the lock is already held by the same CPU.
The "panic" command on the ddb prompt only results in a "Fatal double fault".

The enclosed patch might help.

- Tor Egge


----Next_Part(Fri_Sep_29_02:16:07_2000)--
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Index: kern_shutdown.c
===================================================================
RCS file: /home/ncvs/src/sys/kern/kern_shutdown.c,v
retrieving revision 1.83
diff -u -r1.83 kern_shutdown.c
--- kern_shutdown.c	2000/09/17 12:20:49	1.83
+++ kern_shutdown.c	2000/09/25 12:19:16
@@ -67,6 +67,7 @@
 #include <machine/md_var.h>
 #include <machine/mutex.h>
 #include <machine/smp.h>		/* smp_active, cpuid */
+#include <machine/globaldata.h>
 
 #include <sys/signalvar.h>
 
@@ -541,6 +542,10 @@
 
 #ifdef SMP
 	/* Only 1 CPU can panic at a time */
+#ifdef __i386__
+	/* Avoid fatal double fault */
+	if (panic_lock.lock_data != GLOBALDATA->gd_cpu_lockid) 
+#endif
 	s_lock(&panic_lock);
 #endif
 

----Next_Part(Fri_Sep_29_02:16:07_2000)----


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?200009290016.CAA45617>