debugging kernel options (was: Re: 6.2-PRE: Fatal Trap?)



Robert Watson wrote:
P.S. out of curiosity - now that I have configured kernel with DDB and
KDB options, is there any performance penalty of running such kernel?

No, it shouldn't really have any effect on performance. The one thing
to watch out for is that your system will no longer reboot automatically
on a panic, as it will drop to the debugger, by default. You can change
this by setting debug.debugger_on_panic to 0, in which case you will
likely want to set debug.trace_on_panic to 1 so it prints a stack trace
before rebooting (which is often sufficient, combined with the trap
frame and panic message to debug the problem).

Right now these are sysctls, not tunables, but you can change the
default using options KDB_UNATTENDED (which flips the default to not
entering the debugger and rebooting) and options KDB_TRACE (which causes
a trace to be printed on panic by default). Probably they should also
be tunables so that loader.conf entries will work.

Great explanation, thank you. I turned on debugging on my desktop
computer which, apart from normal every day use, is 'testing' STABLE by
running it :) I'm perfectly fine with the defaults, at least for now.

Cheers and thanks again,

Karol

--
Karol Kwiatkowski <freebsd at orchid dot homeunix dot org>
OpenPGP: http://www.orchid.homeunix.org/carlos/gpg/0x06E09309.asc

Attachment: signature.asc
Description: OpenPGP digital signature



Relevant Pages

  • Re: debugging kernel options (was: Re: 6.2-PRE: Fatal Trap?)
    ... is there any performance penalty of running such kernel? ... You can change this by setting debug.debugger_on_panic to 0, in which case you will likely want to set debug.trace_on_panic to 1 so it prints a stack trace before rebooting. ... Right now these are sysctls, not tunables, but you can change the default using options KDB_UNATTENDED (which flips the default to not entering the debugger and rebooting) and options KDB_TRACE. ... I normally also use a serial console when debugging desktop boxes: I can always plug my notebook in with a serial cable to see why it's entered the debugger. ...
    (freebsd-stable)
  • Re: 6.2-PRE: Fatal Trap?
    ... You can change this by setting debug.debugger_on_panic to 0, in which case you will likely want to set debug.trace_on_panic to 1 so it prints a stack trace before rebooting. ... Right now these are sysctls, not tunables, but you can change the default using options KDB_UNATTENDED (which flips the default to not entering the debugger and rebooting) and options KDB_TRACE. ...
    (freebsd-stable)
  • Re: debugging kernel options
    ... is there any performance penalty of running such kernel? ... entering the debugger and rebooting) and options KDB_TRACE (which ... I normally also use a serial console when debugging ... Karol Kwiatkowski ...
    (freebsd-stable)
  • Re: panic: mb_dtor_mbuf: M_EXT set
    ... > I>> this moment you couldn't be dropped into debugger, ... > I>> box was rebooting. ... It dumps core if you have KDB_UNATTENDED in ... > kernel, in other case it just reboots. ...
    (freebsd-stable)
  • automatic reboot during kernel boot
    ... rebooting. ... He doesn't even go to the debugger. ... Dual pentium 2 450Mhz processors ... While booting safe mode, the last thing see ...
    (freebsd-current)