Subject: Re: Savecore error at bootup
To: None <current-users@NetBSD.ORG>
From: Leo Weppelman <leo@wau.mis.ah.nl>
List: current-users
Date: 06/23/1996 17:15:24
In <199606222056.PAA00378@zuhause.mn.org> Bruce Albrecht <bruce@zuhause.mn.org> writes:

>I'm still getting the following message at boot:
> savecore: /netbsd: kvm_dump_mkheader:

>I know there was some discussion about this a couple of weeks ago, was
>there a solution?  I've tried rebuilding everything, libraries,
>kernel, etc., most recently with a sup from yesterday.  Should I get a
>new set of tarballs and rebuild in case my sup's have missed something?
I just committed a fix to the -current source tree. Savecore will now
display a full error message. I know that this is not yet a full fix,
but at least the message is clear...
The problem is that savecore calls kvm_dump_mkheader() before it looks
at the magic number to determine if there really is a dump. This means
that kvm_dump_mkheader() will be called without a valid dump and it
bails out on the magic-number checks (*with* an error message since this
afternoon). So instead of the 'savecore: no coredump' message, you will
now get the message 'savecore: /netbsd: kvm_.......'. 
I think that the only real fix would be a multi-valued return value
from kvm_dump_mkheader(), so the caller can determine if it's the
magic number check that fails or something worse.

Leo.