Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 09 May 1996 22:21:29 +1000
From:      Stephen McKay <syssgm@devetir.qld.gov.au>
To:        freebsd-current@freebsd.org
Cc:        syssgm@devetir.qld.gov.au
Subject:   Easy kernel config mistake
Message-ID:  <199605091221.WAA23449@orion.devetir.qld.gov.au>

next in thread | raw e-mail | index | archive | help
My beleaguered -current system has been impossible to debug because I had

    config  kernel  root on wd0 swap on wd0 and vn0 dumps on wd0

in my config file.  The 'dumps on wd0' section is very nearly as good as
having 'dumpon /dev/wd0b' run at startup, except that the resulting dump
starts at offset 0 in your swap area.

This is fine (I think) if you don't swap before savecore finishes, but I don't
have that much ram.  Debugging using these crash dumps is quite unproductive.

A kernel variable 'dumplo' controls how far to offset into the swap area,
and this is only set by dumpon calling sysctl(kern.dumpdev).  Unfortunately
dumpon ignores redundant swap device setting attempts, so I can't even
fix it with that.  A kernel rebuild is necessary.

So, what do I want done about it?  Well, either support the old syntax
properly, or ban it completely.

Stephen.


PS This patch to savecore looks like a good idea for folks who care about
the -v switch.

--- savecore.c	Fri Dec 22 16:59:11 1995
+++ savecore.c.new	Thu May  9 22:14:17 1996
@@ -241,12 +241,12 @@
 	}
 	Lseek(kmem, (off_t)current_nl[X_DUMPLO].n_value, L_SET);
 	(void)Read(kmem, &dumplo, sizeof(dumplo));
+	dumplo *= DEV_BSIZE;
 	if (verbose)
 		(void)printf("dumplo = %d (%d * %d)\n",
 		    dumplo, dumplo/DEV_BSIZE, DEV_BSIZE);
 	Lseek(kmem, (off_t)current_nl[X_DUMPMAG].n_value, L_SET);
 	(void)Read(kmem, &dumpmag, sizeof(dumpmag));
-	dumplo *= DEV_BSIZE;
 	ddname = find_dev(dumpdev, S_IFBLK);
 	dumpfd = Open(ddname, O_RDWR);
 	fp = fdopen(kmem, "r");



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199605091221.WAA23449>