Current-Users archive

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

Re: savecore can't dump

At Sun, 21 Jun 2009 16:02:28 -0400, Thor Lancelot Simon 
<> wrote:
Subject: Re: savecore can't dump
> On Sun, Jun 21, 2009 at 01:11:20PM -0400, Greg A. Woods wrote:
> > 
> > Not knowing the name of the booted kernel is, or would be, a bug.
> Tell that to all the platforms whose firmware doesn't bother to
> pass the information along to the program it loads at boot time.

Oh, I know -- they're buggy, no doubt about it.  I hate such platforms
and avoid them as much as possible.  There's nothing worse to support
than something with dumb broken too-simple firmware.

>  Or to people with a netbooted or embedded environment in which it's
> utterly useless to know the booted kernel name as it's not in any
> filesystem accessible at runtime.

well, that would only matter for savecore -- what ultimately really
matters is that you can tell at runtime which kernel was loaded to start
the system, even if it's one you have to retrieve with tftp.

(for embedded environments things are of course both more restricted and
also more predictable -- and they're not going to need the same kind of
runtime operations support that a server will either)

> > So, /dev/ksyms is all well and good and awesome even for _runtime_
> > diagnostics and monitoring, but it is often absolutely useless for crash
> > dumps.  Please everyone keep that in mind!
> Um, no.  All the symbols needed to debug are dumped out from /dev/ksyms
> at savecore time just as they'd be dumped out from the booted kernel --

OK, I'm not quite so familiar with the state of -current these days....
so can this dumped symbol table be used everywhere by every tool that
allows you to say "-M /var/crash/netbsd.0.core -N /var/crash/netbsd.0"?
How about with "gdb" too?

> neither of which will do you any good at all if you don't also happen
> to have the unstripped debug kernel handy to debug with, which really
> makes this "you need the running kernel to debug!" business a complete
> red herring.

I suppose that depends on the level of debugging you expect to be able
to do.

After 25 odd years of kernel debugging I'm quite used to only being able
to get at whatever a normal symbol table will let me see -- I don't
expect full "-g" source-line debugging, though obviously I'll use it if
I can get it.  However the basic ability to use the tools like "ps",
"fstat", "vmstat", etc., as well as do simple probing with "gdb" is
pretty much mandatory.

                                                Greg A. Woods
                                                Planix, Inc.

<>       +1 416 218-0099

Attachment: pgpGca14TGxTf.pgp
Description: PGP signature

Home | Main Index | Thread Index | Old Index