Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Dec 2012 14:43:11 -0800
From:      Adrian Chadd <adrian@freebsd.org>
To:        Andriy Gapon <avg@freebsd.org>
Cc:        Alfred Perlstein <alfred@freebsd.org>, John Baldwin <jhb@freebsd.org>, svn-src-all@freebsd.org, Alfred Perlstein <bright@mu.org>, src-committers@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r244112 - head/sys/kern
Message-ID:  <CAJ-VmonxF92tr8P5Sg=G26pyNcqkFj4d5xjmsRKY=dx8k5f-4A@mail.gmail.com>
In-Reply-To: <50C90641.4030000@FreeBSD.org>
References:  <201212110708.qBB78EWx025288@svn.freebsd.org> <201212121046.43706.jhb@freebsd.org> <CAJ-Vmo=U04GX%2BZyKuzXLwV%2BPpzU6_dm5BCmL=DWfsmhTVAR%2BsA@mail.gmail.com> <201212121658.49048.jhb@freebsd.org> <CAJ-Vmom8aivK7Z95%2BSwigReOTdn-OwXspK3pXO=0CVr1y1Unzg@mail.gmail.com> <50C904B8.6000502@mu.org> <50C90641.4030000@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 12 December 2012 14:33, Andriy Gapon <avg@freebsd.org> wrote:

>> 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.

Dude, if you're running -STABLE right now, you don't have invariants
enabled and you aren't checking for them.
So right now, as it stands, large swaths of our kernel code are
falling afoul of what you're calling Alfred out on.

Before you all reply, please review and understand the difference
between "panic()" and "KASSERT()". panic() is not being changed here.
KASSERT() is what's being changed here. panic() is not optional.
KASSERT() is. With a non-INVARIANTS kernel, we _are not checking
invariants_ and we are continuing to run _after_ said non-compiled-in
invariants. With this in mind, please re-review this. :-)



Adrian



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-VmonxF92tr8P5Sg=G26pyNcqkFj4d5xjmsRKY=dx8k5f-4A>