Subject: kern/37042: ddb uses malloc
To: None <,,>
From: None <>
List: netbsd-bugs
Date: 09/30/2007 13:20:00
>Number:         37042
>Category:       kern
>Synopsis:       ddb uses malloc
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Sep 30 13:20:00 +0000 2007
>Originator:     YAMAMOTO Takashi <>
>Release:        NetBSD 4.99.31


	i got the following when entering ddb from serial console.

	i don't think it's desirable for ddb to rely on high-level
	kernel services like malloc.

	Stopped in pid 0.2 (system) at  netbsd:cpu_Debugger+0x5:        leave
	panic: assert_sleepable: idle
	Stopped in pid 0.2 (system) at  netbsd:cpu_Debugger+0x5:        leave
	db{0}> t
	cpu_Debugger() at netbsd:cpu_Debugger+0x5
	panic() at netbsd:panic+0x1fc
	assert_sleepable() at netbsd:assert_sleepable+0x43
	malloc() at netbsd:malloc+0x285
	db_register_tbl() at netbsd:db_register_tbl+0x2b
	db_command_loop() at netbsd:db_command_loop+0x186
	db_trap() at netbsd:db_trap+0x124
	kdb_trap() at netbsd:kdb_trap+0x118
	trap() at netbsd:trap+0x204
	uvm_fault(0xffffffff80b63080, 0x2632000, 1) -> e
	kernel: page fault trap, code=0
	Faulted in DDB; continuing...

	don't use malloc.