cvs commit: src/sys/i386/isa apic_vector.s clock.c src/sys/kern kern_intr.c kern_sig.c kern_slaballoc.c kern_switch.c kern_systimer.c kern_upcall.c lwkt_msgport.c lwkt_thread.c lwkt_token.c src/sys/sys slaballoc.h

Matthew Dillon dillon at
Wed Feb 18 15:35:30 PST 2004

:I'm sorry to have spammed the commits@ list, moving to bugs at .
:I've found the path to the panic:
:-> scmeminit
:   -> sc_alloc_scr_buffer
:      -> sc_vtb_copy
:         -> sc_vtb_init, malloc failed because of M_NOWAIT flag
:         -> bcopy to null pointer and panic
:I'm still not sure why it failed only when the kernel is compiled with gcc2.

    All right.  Try the patch below.  

    I will have to spend a day fixing all the misuses of M_NOWAIT in the
    kernel that were inherited from FreeBSD-4.  FreeBSD-5 has the same 
    problem, actually. The difference between FreeBSD and DragonFly is 
    that in DragonFly M_NOWAIT really means "don't wait, and be prepared
    to handle a NULL return value", whereas in FreeBSD it means "I don't
    want you to wait but I also sorta hope you won't ever return NULL".

					Matthew Dillon 
					<dillon at xxxxxxxxxxxxx>

Index: syscons.c
RCS file: /cvs/src/sys/dev/misc/syscons/syscons.c,v
retrieving revision 1.7
diff -u -r1.7 syscons.c
--- syscons.c	7 Aug 2003 21:16:59 -0000	1.7
+++ syscons.c	18 Feb 2004 23:31:55 -0000
@@ -413,15 +413,15 @@
     /* copy the temporary buffer to the final buffer */
-    sc_alloc_scr_buffer(sc_console, FALSE, FALSE);
+    sc_alloc_scr_buffer(sc_console, TRUE, FALSE);
-    sc_alloc_cut_buffer(sc_console, FALSE);
+    sc_alloc_cut_buffer(sc_console, TRUE);
 #ifndef SC_NO_HISTORY
     /* initialize history buffer & pointers */
-    sc_alloc_history_buffer(sc_console, 0, 0, FALSE);
+    sc_alloc_history_buffer(sc_console, 0, 0, TRUE);

More information about the Bugs mailing list