FreeBSD -STABLE servers repeatedly crashing

Gleb Smirnoff glebius at FreeBSD.org
Wed Jun 29 14:29:09 GMT 2005


On Tue, Jun 28, 2005 at 01:50:48PM -0400, Matt Juszczak wrote:
M> >Please try out this patch to aid the above problem with hang instead of
M> >dump:
M> >
M> >http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/i386/i386/trap.c.diff?r1=1.275&r2=1.276
M> This patch wouldn't go through....
M> I tried patching against:
M> __FBSDID("$FreeBSD: src/sys/i386/i386/trap.c,v 1.267.2.3 2005/05/01 
M> 05:34:46 dwhite Exp $");
M> which is -STABLE

Here is attached patch. It should work for STABLE. It should fix problem
with frozen kdb, and give you ability to obtain a crashdump.

-- 
Totus tuus, Glebius.
GLEBIUS-RIPN GLEB-RIPE
-------------- next part --------------
Index: trap.c
===================================================================
RCS file: /home/ncvs/src/sys/i386/i386/trap.c,v
retrieving revision 1.267.2.3
diff -u -r1.267.2.3 trap.c
--- trap.c	1 May 2005 05:34:46 -0000	1.267.2.3
+++ trap.c	29 Jun 2005 14:27:04 -0000
@@ -809,8 +809,15 @@
 	}
 
 #ifdef KDB
-	if (kdb_trap(type, 0, frame))
-		return;
+	{
+		register_t eflags;
+		eflags = intr_disable();
+		if (kdb_trap(type, 0, frame)) {
+			intr_restore(eflags);
+			return;
+		}
+		intr_restore(eflags);
+	}
 #endif
 	printf("trap number		= %d\n", type);
 	if (type <= MAX_TRAP_MSG)


More information about the freebsd-stable mailing list