Re: ksyms for kgdb

root (root@sasami.anime.net)
Tue, 10 Oct 1995 16:27:18 -0700 (PDT)


> The feature that was definitely the most helpful was crash dumps. Often
> times, simply knowing the stack trace isn't enough. Being able to run a
> debugger and take a look at several structures, pointers, etc. is just
> very, very, very convenient.

I've been screaming for this for a while; but every time I've brought it up,
it's been shot down... reasons given:

1) It's not really useful, you can't ever track down crashes with
crash dumps (totally ludicrous)

2) By the time the kernel crashes, there's been too much damage done
to trace anything (*maybe*.. but it's helpful to look for "footprints"
to see what stomped on what.)

3) It's never likely to work. If the kernel crashes and you try to dump
to disk, you will most certainly format your hard drive etc. etc.
(ok fine. if that's the way you want to play, we'll dump to
FLOPPY DISK. Take that!)

> I'm thinking that it might be useful to define an interface to certain
> block devices which allow you to do I/O that bypasses the buffer cache,
> for the express purposes of allowing crash dumps to be written to some
> contiguous area of disk (probably a swap partition). The bounds of the
> crash dump area could be calculated in advance, and stored somewhere
> safe; this would reduce the amount of code that the crash dump routines
> would have to depend upon. (And, you really don't want to touch the
> buffer cache at all while you're doing the crash dump, lest that disturb
> valuable evidence about What Went Wrong.)

Now try to convince the other developers that crash dumps are actually a
*GOOD THING*. I've tried, and others have too.

IMHO, there's three good candidates for crash dumps:

1) Floppy disk. Should be *ABSOLUTELY NO EXCUSES*. There is no danger of
blowing up your hard disk with this method. The only possible argument
against it is the size of the device. So... use multiple floppies :)

2) Swap partition. Do a crash dump with a special signature at the
header. When Linux boots next time, 'swapon' or something could look for
the signature and if present, save the crash dump to a real disk file
before enabling swap.

3) Crash partition. Do a crash dump to a special partition. For the
ultra paranoid, this can be on a separate drive.

> I probably won't have time to take on this project in the near future,
> but if someone else, let me know..... I'd be glad to serve as a someone
> to bounce design ideas off of, and to be a beta tester.

Well, you have some design ideas above. :)

I don't actually see the crash dump as being a terribly difficult thing
to write; might be a good first kernel hack project for someone. :)

-Dan