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

Re: Linux kdb (was Re: first thread)



In <19990129221656.B24329@noris.de> "Matthias Urlichs" <smurf@noris.de> writes:

> A crash dump exposes too much of the static situation at the time the crash
> happened, but not the dynamic events which led to it. Therefore it leads to
> static fixes ("dereferenced NULL? Slap 'if(!ptr)return;' onto it!") without
> examining the underlying reason ("The thing is NULL? It's not supposed to!"

This makes no sense at all to me.  You can create bad bug fixes using
any debugging technique, much like you can write bad programs in any
programming language.

Crash dumps are certainly no worse than core dumps, and usually much
more valuable because applications can often spew useful stuff to the
terminal while crashes often reboot too quickly to see what's one the
screen.  Applications can also afford to have lots of error handling
bloat sitting around that will never be paged in unless something
craps out, the kernel has to be lean.

So, should core dumps be removed for the same reason?  What about
kernel Oopses?  They produce "static situation" stuff too.


Ok, I must confess, I haven't ever done any Linux kernel hacking.  The 
only Unix kernel hacking I've done was for svr4, which did do crash
dumps.  I found them very useful.  No, they aren't perfect, but no
tool does everything perfectly (except emacs :-).  Use the tool
correctly and it can save you gobs of time and lead you to the
*correct* solution.

Crash dumps are great for machines that need high up time.  When you
get a panic, you usually want it to reboot immediately, if it can.  By 
looking at the crash dumps, you can often track down that it is the
RAM that is flaky, or a bad SCSI card, or rarely for Linux, a kernel
problem that only occurs in really strange situations.


> > A secondary reason is that people are worried that the attempt to write
> > out the crash data will destroy user data, since the system is unstable.
> > 
> Doing that safely is _not_ easy.

Other versions of Unix have been doing this for decades, with good
real world results.


Linux has done very well without crash dumps, and I'm sure it will
continue to do so, but I think it would do better with.  I have heard
similar arguments about why you shouldn't use debuggers, and even why
you should use punch cards instead of CRTs ("you have to *think* about 
your program instead of just quick compiles and runs").  I just don't
buy it.


=wayne


-- 
Wayne Schlitt can not assert the truth of all statements in this
article and still be consistent.
-
Linux-future: thinking about the future of the Linux kernel
http://humbolt.nl.linux.org/lists/