Subject: port-arm/24077: KCORE_MAGIC not set on crash dumps
To: None <gnats-bugs@gnats.NetBSD.org>
From: Richard Earnshaw <rearnsha@arm.com>
List: netbsd-bugs
Date: 01/13/2004 14:50:44
>Number:         24077
>Category:       port-arm
>Synopsis:       KCORE_MAGIC not set on crash dumps
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    port-arm-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jan 13 14:51:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     Richard Earnshaw
>Release:        NetBSD 1.6ZG
>Organization:
ARM
-- 
>Environment:
	
	
System: NetBSD shark1.cambridge.arm.com 1.6ZG NetBSD 1.6ZG (SHARK1) #2: Sat Dec 20 14:19:49 GMT 2003 rearnsha@pc960.cambridge.arm.com:/work/rearnsha/netbsd/build/src/shark/sys/arch/shark/compile/SHARK1 shark
Architecture: arm
Machine: shark
>Description:
	After a kernel crash and dropping int DDB typing sync will sometimes
	produce a crash dump (sometimes it won't but that's a different issue.

	However, on reboot, savecore reports that there is no dump.

	It turns out (on debugging savecore) that the problem is that code
	in libkvm detects that the dump does not have the correct KCORE_MAGIC 
	value and so believes that there is no dump.  Even savecore -f
	will not work.
	
>How-To-Repeat:
	break into ddb, force a crash dump and reboot.  System will
	report that there is no dump file.
	
>Fix:
	The kernel should write out a header on the crash dump as all other
	architectures do.  The header should also describe the physical memory
	blocks of the crashing kernel.
	
>Release-Note:
>Audit-Trail:
>Unformatted: