backtrace() and the console log (was Re: cvs commit: src/sys/alpha...)

Nate Lawson nate at root.org
Wed Jan 21 17:50:21 PST 2004


On Thu, 22 Jan 2004, Bruce Evans wrote:
> On Thu, 22 Jan 2004, Greg 'groggy' Lehey wrote:
>
> > On Wednesday, 21 January 2004 at 16:40:46 +1100, Bruce Evans wrote:
> > > On Tue, 20 Jan 2004, Nate Lawson wrote:
> > >
> > >> On Wed, 21 Jan 2004, Ian Dowse wrote:
> > >>> I've been using the following patch for a while to get backtrace()
> > >>> to output to the kernel message buffer. Sending all ddb output via
> > >>> printf might be undesirable for some cases, but I guess having it
> > >>> configurable with a `debug.ddb_use_printf' sysctl that defaults to
> > >>> the old behaviour would be ok?
> > >
> > > It's undesireable in almost all cases, since it fills up the message
> > > buffer with garbage.
> >
> > If it's "garbage", why are we ever producing it?  Currently I'm
> > getting a lot of LORs which don't get reported anywhere.  I'd really
> > like to catch this "garbage".
>
> Because it is hard to debug when the debugger doesn't print any output.
> In almost all cases, you don't want to record all the false trails that
> you followed tracking down a problem, especially since any recording might
> cycle more important records out of the message buffer before syslogd(8)
> has a chance to run.

And...... cut!  We're right back at the part where Ian says "hey, here's a
patch" and then I say "hey, here's how to only dump non-DDB data to the
message buffer" and then Bruce says "ok by me".

Now we skip to the part where Ian commits it.

-Nate

(Oh, and I forgot the epilogue where the panic line numbers disappear
because the backtrace is more useful. :)


More information about the cvs-src mailing list