linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: linas@austin.ibm.com
To: Andi Kleen <ak@muc.de>
Cc: linux-kernel@vger.kernel.org, linas@linas.org
Subject: Re: KDB in the mainstream 2.4.x kernels?
Date: Fri, 18 Jul 2003 19:31:08 -0500	[thread overview]
Message-ID: <20030718193107.B45512@forte.austin.ibm.com> (raw)
In-Reply-To: <m3smp3y38y.fsf@averell.firstfloor.org>; from ak@muc.de on Fri, Jul 18, 2003 at 10:43:57PM +0200

Hi Andi,

I'm happy to get a response...

On Fri, Jul 18, 2003 at 10:43:57PM +0200, Andi Kleen wrote:
> 
> One argument i have against it: KDB is incredibly ugly code. 
> Before it could be even considered for merging it would need quite a lot 
> of cleanup.

What in particular?  I just looked at kdb/kdbmain.c and kdb/kdb_bt.c
and it looks fine to me; fairly minimal even.  I don't know about 
arch-specific code.  Is there a particular file you're complaining about?

(very very off-topic: I love reading about the neat things that 
reiser v4 will do, but wow, every time I read reiserfs code, 'ugly'
is indeed the word that flies to mind).

> I actually started on porting the KDB backtracer recently to get
> reliable frame pointer based backtraces, but it turns out the code
> for that is so complicated and ugly that the chances of ever merging
> it would be very slim.
?

I have not (yet?) studied the code in detail, so point me at something
ugly; I'm not sure what you are talking about.  Now, stack traces are
in general ugly because registers and args are splattered all over 
the place, and the struct pt_regs are even worse.  So there's some
inherent ugliness there ...

Since I live in KDB, I might have some spare time to cleanup/fix,etc.
so nows a good time to talk .. 

> As for your home crash debugging I suspect you would be better of with LKCD
> or Mcore (crash dump, saving an crash image on some partition, with examining
> the crash dump after reboot) 

I'll look ... given that I own lots flaky IDE hardware, though, I'm catious.
I get 'DriveReady SeekComplete Error' messages daily ... I learned the hard
way that these aren't necessarily the fault of the hard drive, and I have
suffered through corrupted fs's as a result ...

Generically, for servers, if you can just save the dump, reboot, and
let the server go on, and analyze the dump at leisure, that is the 
prefered way to do things.  Especially if you are doing customer support. 
(Linux is at the dawn of the era of having customers who have actually
spent in excess of $100K or $1M on a server and who will be going
apoplectic when it crashes.  This will put a spotlight on dump tools).

> KDB is usually not useful for debugging hangs on desktop boxes (and even
> many servers) because you have usually X running. When the machine crashes and
> goes in KDB you cannot see the text output and debug anything. I learned

I'm willing to put console on serial port. I've got enough machines 
& serial cables, this doesn't bother me.  

> Disadvantage is that the current crash dump mechanisms (lkcd, mcore
> crash, netdump) are all still not very reliable and have horrible
> error handling. 

This statement makes me nervous. One of the worst feelings one can get
when debugging is not being able to trust the data you are looking at.
Its too easy to loose a lot of time (and credibility) making incorrect 
hypothesis based on bad data.

Dedicating a partition that is unformated, and whose sole purpose
in life is to record a dump -- that is a viable option, at least on
servers, where high uptime is more important, and storage is cheap.

On my home machines, its sort of the other way around: I don't trust 
IDE, I don't have the disk space.

But you convinced me; I need more time on lkcd, etc. 

--linas


  reply	other threads:[~2003-07-19  0:17 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <aJIn.3mj.15@gated-at.bofh.it>
2003-07-18 20:43 ` KDB in the mainstream 2.4.x kernels? Andi Kleen
2003-07-19  0:31   ` linas [this message]
2003-07-19  0:57     ` Andi Kleen
2003-07-20 12:55   ` Keith Owens
2003-07-20 13:31     ` David S. Miller
2003-07-20 22:27       ` Keith Owens
2003-07-21 15:06     ` Andi Kleen
2003-07-29 19:44   ` Robin Holt
2003-08-13  4:40   ` Martin Pool
2003-08-13 11:04     ` Andi Kleen
2003-08-25 12:16       ` Greg Stark
2003-08-25 16:23         ` Andi Kleen
2003-08-26 13:39           ` Greg Stark
2003-08-27 13:49           ` Alan Cox
2003-08-30 10:35             ` Pavel Machek
2003-09-02 20:40 Tolentino, Matthew E
  -- strict thread matches above, loose matches on Subject: below --
2003-08-28 17:08 Tolentino, Matthew E
2003-08-28 20:24 ` Alan Cox
2003-07-18 20:06 linas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030718193107.B45512@forte.austin.ibm.com \
    --to=linas@austin.ibm.com \
    --cc=ak@muc.de \
    --cc=linas@linas.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).