From owner-freebsd-current Thu May 9 05:21:10 1996 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id FAA28882 for current-outgoing; Thu, 9 May 1996 05:21:10 -0700 (PDT) Received: from bunyip.cc.uq.oz.au (pp@bunyip.cc.uq.oz.au [130.102.2.1]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id FAA28874 for ; Thu, 9 May 1996 05:21:07 -0700 (PDT) Received: from bunyip.cc.uq.oz.au by bunyip.cc.uq.oz.au id <22088-0@bunyip.cc.uq.oz.au>; Thu, 9 May 1996 22:21:03 +1000 Received: from orion.devetir.qld.gov.au by pandora.devetir.qld.gov.au (8.6.10/DEVETIR-E0.3a) with ESMTP id WAA16781 for ; Thu, 9 May 1996 22:21:36 +1000 Received: from localhost by orion.devetir.qld.gov.au (8.6.10/DEVETIR-0.3) id WAA23449; Thu, 9 May 1996 22:21:29 +1000 Message-Id: <199605091221.WAA23449@orion.devetir.qld.gov.au> To: freebsd-current@freebsd.org cc: syssgm@devetir.qld.gov.au Subject: Easy kernel config mistake Date: Thu, 09 May 1996 22:21:29 +1000 From: Stephen McKay Sender: owner-current@freebsd.org X-Loop: FreeBSD.org Precedence: bulk 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");