Date: Thu, 13 Dec 2012 08:51:20 +0200 From: Andriy Gapon <avg@FreeBSD.org> To: Adrian Chadd <adrian@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: <50C97AE8.1040806@FreeBSD.org> In-Reply-To: <CAJ-VmonxF92tr8P5Sg=G26pyNcqkFj4d5xjmsRKY=dx8k5f-4A@mail.gmail.com> 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> <CAJ-VmonxF92tr8P5Sg=G26pyNcqkFj4d5xjmsRKY=dx8k5f-4A@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
on 13/12/2012 00:43 Adrian Chadd said the following: > 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. Pal, it's because there are people who thoroughly and regularly test code with INVARIANTS that the code with or without INVARIANTS does not crash as often as it could. When I tested the code with INVARIANTS I trust it to run without those and if a user get a mystery panic one of the first things to advise is to enable various debugging options. > 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. :-) KASSERT is not optional contrary to your opinion. We elect to not compile it in for performance reasons, but it is not optional when it is compiled in. -- Andriy Gapon
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?50C97AE8.1040806>