NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kern/49610: reboot -d doesn't create a crash dump



>Number:         49610
>Category:       kern
>Synopsis:       reboot -d doesn't create a crash dump
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jan 27 15:25:00 +0000 2015
>Originator:     Manuel Bouyer
>Release:        NetBSD 7.0_BETA
>Organization:
>Environment:
	
	
System: NetBSD yquem.soc.lip6.fr 7.0_BETA NetBSD 7.0_BETA (DRMKMS) amd64
Architecture: amd64
Machine: amd64
>Description:

	doing a 'reboot -d' doens't cause a kernel core dump any more:
[...]
forcefully unmounting / (/dev/wd0a)...
forcefully unmounted /dev/wd0a on / type ffs
wd0: detached
atabus0: detached

dumping to dev 0,1 (offset=3416, size=2081841):
dump area unavailable

	detaching the disk before doing the dump is probably
	not a good idea ...

>How-To-Repeat:
	reboot -d
>Fix:
	This patch makes reboot -d works again. A small patch
	to pmap.c is also needed. Maybe something better can be done ...

Index: sys/arch/amd64/amd64/machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/amd64/amd64/machdep.c,v
retrieving revision 1.211
diff -u -p -u -r1.211 machdep.c
--- sys/arch/amd64/amd64/machdep.c	12 May 2014 22:50:03 -0000	1.211
+++ sys/arch/amd64/amd64/machdep.c	27 Jan 2015 15:19:14 -0000
@@ -655,7 +655,7 @@ cpu_reboot(int howto, char *bootstr)
 		}
 
 		while (vfs_unmountall1(curlwp, false, false) ||
-		       config_detach_all(boothowto) ||
+		       ((howto & RB_DUMP) == 0 && config_detach_all(boothowto)) ||
 		       vfs_unmount_forceone(curlwp))
 			;	/* do nothing */
 	} else
Index: sys/arch/x86/x86/pmap.c
===================================================================
RCS file: /cvsroot/src/sys/arch/x86/x86/pmap.c,v
retrieving revision 1.183.2.1
diff -u -p -u -r1.183.2.1 pmap.c
--- sys/arch/x86/x86/pmap.c	14 Oct 2014 07:37:37 -0000	1.183.2.1
+++ sys/arch/x86/x86/pmap.c	27 Jan 2015 15:19:14 -0000
@@ -1160,7 +1160,6 @@ void
 pmap_kremove_local(vaddr_t sva, vsize_t len)
 {
 
-	KASSERT(panicstr != NULL);
 	pmap_kremove1(sva, len, true);
 }
 



Home | Main Index | Thread Index | Old Index