List Info

Thread: Disabling kernel assertions on panic




Disabling kernel assertions on panic
country flaguser name
United Kingdom
2007-07-24 15:20:43
Hi,

A lot of assertions have been added into the kernel, making
it difficult to
get a diagnostic system to reboot after it has paniced. Any
thoughts on the
following?

Andrew

Index: __assert.c
============================================================
=======
RCS file: /cvsroot/src/sys/lib/libkern/__assert.c,v
retrieving revision 1.8
diff -u -p -r1.8 __assert.c
--- __assert.c	11 Dec 2005 12:24:37 -0000	1.8
+++ __assert.c	24 Jul 2007 20:12:56 -0000
 -42,6
+42,9  void
 __assert(const char *t, const char *f, int l, const char
*e)
 {
 
+	if (panicstr != NULL)
+		return;
+
 	panic("kernel %sassertion "%s" failed:
file "%s", line %d",
-	      t, e, f, l);
+	    t, e, f, l);
 }
Index: libkern.h
============================================================
=======
RCS file: /cvsroot/src/sys/lib/libkern/libkern.h,v
retrieving revision 1.69
diff -u -p -r1.69 libkern.h
--- libkern.h	9 Apr 2007 17:39:37 -0000	1.69
+++ libkern.h	24 Jul 2007 20:12:56 -0000
 -285,8
+285,7  int	 ffs __P((int));
 #define	ffs(x)		__builtin_ffs(x)
 #endif
 
-void	 __assert __P((const char *, const char *, int, const
char *))
-	    __attribute__((__noreturn__));
+void	 __assert __P((const char *, const char *, int, const
char *));
 unsigned int
 	bcdtobin __P((unsigned int));
 unsigned int

Re: Disabling kernel assertions on panic
country flaguser name
United States
2007-07-24 17:28:04
On Tue, Jul 24, 2007 at 09:20:43PM +0100, Andrew Doran
wrote:
> Hi,
> 
> A lot of assertions have been added into the kernel,
making it difficult to
> get a diagnostic system to reboot after it has paniced.
Any thoughts on the
> following?

Sounds good.

Take care,

Bill
Re: Disabling kernel assertions on panic
country flaguser name
United Kingdom
2007-07-25 08:07:07
On Tue, Jul 24, 2007 at 09:20:43PM +0100, Andrew Doran
wrote:
> A lot of assertions have been added into the kernel,
making it difficult to
> get a diagnostic system to reboot after it has paniced.
Any thoughts on the
> following?

Good idea!

	Kind regards

-- 
Matthias Scheler                                  http://zhadum.org.uk/

[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )