svn commit: r244112 - head/sys/kern
Andriy Gapon
avg at FreeBSD.org
Wed Dec 12 22:33:44 UTC 2012
on 13/12/2012 00:27 Alfred Perlstein said the following:
> On 12/12/12 2:15 PM, Adrian Chadd wrote:
>> On 12 December 2012 13:58, John Baldwin <jhb at freebsd.org> wrote:
>>
>>
>>> (Note that the primary reason I know for people not running with INVARIANTS
>>> enabled is not that they don't want panics, but that they don't want the
>>> performance hit.)
>> Well, it would be nice to be able to enable invariants on some
>> shipping "debug" versions of images in order to gather more data
>> without crashing the kernel.
> Yes, two of my employers were more of "we want to get more debug metrics, we
> have the spare cycles, but we can't deal with superfluous panics".
>
> It also allows us "non-architects" to slip in a debug image when we have spare
> cpu without getting yelled at for "crashing the $foo".
There is clearly something wrong with this sort of mentality.
If you find instances where a developer put panic(9) (or KASSERT or etc) to mean
"maybe here is a bug, let's just panic", then let's get those things fixed.
But most of assertions in our code that are know to me really mean that a real
bug has already occurred, that portions of kernel state are corrupted and there
is no going back to a sane state, only going forward to corrupting more and more.
--
Andriy Gapon
More information about the svn-src-head
mailing list