Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 30 Dec 2006 19:52:11 +0100
From:      Karol Kwiatkowski <freebsd@orchid.homeunix.org>
To:        Robert Watson <rwatson@freebsd.org>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: debugging kernel options
Message-ID:  <4596B55B.7080506@orchid.homeunix.org>
In-Reply-To: <20061230182714.O18740@fledge.watson.org>
References:  <20061230035722.L39715@thebighonker.lerctr.org>	<20061230151933.P18740@fledge.watson.org>	<20061230093730.I47579@thebighonker.lerctr.org>	<20061230160353.K18740@fledge.watson.org>	<45969487.1020806@orchid.homeunix.org>	<20061230170358.K50974@fledge.watson.org>	<4596AF32.2060205@orchid.homeunix.org> <20061230182714.O18740@fledge.watson.org>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enig684C0066F830AEE958763581
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Robert Watson wrote:
>=20
> On Sat, 30 Dec 2006, Karol Kwiatkowski wrote:
>=20
>> Robert Watson wrote:
>>>> P.S. out of curiosity - now that I have configured kernel with DDB a=
nd
>>>> 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 no=
w.
>=20
> BTW, if you're running X on your desktop, be aware that it's X that doe=
s
> all the video mode management.  If your box enters the debugger while i=
n
> X, the debugger doesn't know how to switch back to text mode (and X
> isn't running, obviously), so while you'll be talking to the debugger,
> the chances you'll see anything comprehensible are actually quite low. =

> For this reason, 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.

Right, I haven't thought about that. I guess without a serial console my
best option is to set debug.debugger_on_panic to 0, debug.trace_on_panic
to 1 and keep crash dump with kernel.debug for later examination, isn't
it? The whole point of doing this, as I am not really experienced in
debugging, is to have the information saved somewhere in case of a panic.=


Regards,

Karol

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


--------------enig684C0066F830AEE958763581
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (FreeBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFlrViezeoPAwGIYsRCJ7iAJ0WhekN2ZzjCvoZfkcatgIpgsEZMwCfRFMD
Y01GBkYoJgQ6sfOc5e1sNlk=
=7f/I
-----END PGP SIGNATURE-----

--------------enig684C0066F830AEE958763581--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4596B55B.7080506>