From owner-svn-src-all@FreeBSD.ORG Wed Dec 12 22:43:13 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AA317447; Wed, 12 Dec 2012 22:43:13 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-we0-f182.google.com (mail-we0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id E015C8FC0C; Wed, 12 Dec 2012 22:43:11 +0000 (UTC) Received: by mail-we0-f182.google.com with SMTP id u54so578499wey.13 for ; Wed, 12 Dec 2012 14:43:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=i8/YdtaWV3nVoVYlmSxfzubqgWOsi68FmtFxykYi5Fg=; b=vjuTA8U9DX/9dpUkwFt1uzRGjC77TpqKr8pLrYCn3RnYxONXoHVK3yYOJ4fXkRw90i VZgmbhoHIBkVt9FwTGTwcJzWyU134pkJC+tYb6EkhpRseoohJh0q4BXDmg3CdqTfMWdN XhLIRsMi4MKoCUqhHbVNgeLN2kGvuX7G4KykbxnbcAUS1qIquFC/CSMWfzisuUnBKBSf aIYDLZkfgxjuRf89oV7E6ddWcHWGE1J8QxXgcEyty/iiqbQl5hPGWYOsyt+JZu9LVB6g rxH2QLK4TBOxS/zf+zLNygW7Opg2M/+dJrIKoRpeKAbtgby2wt0kC773HS7vyoMuJ/3M ZZcw== MIME-Version: 1.0 Received: by 10.194.179.34 with SMTP id dd2mr4591109wjc.1.1355352191136; Wed, 12 Dec 2012 14:43:11 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.217.57.9 with HTTP; Wed, 12 Dec 2012 14:43:11 -0800 (PST) In-Reply-To: <50C90641.4030000@FreeBSD.org> References: <201212110708.qBB78EWx025288@svn.freebsd.org> <201212121046.43706.jhb@freebsd.org> <201212121658.49048.jhb@freebsd.org> <50C904B8.6000502@mu.org> <50C90641.4030000@FreeBSD.org> Date: Wed, 12 Dec 2012 14:43:11 -0800 X-Google-Sender-Auth: 07h6SMbpxIUcj-Aiz7i3W_Pg7sE Message-ID: Subject: Re: svn commit: r244112 - head/sys/kern From: Adrian Chadd To: Andriy Gapon Content-Type: text/plain; charset=ISO-8859-1 Cc: Alfred Perlstein , John Baldwin , svn-src-all@freebsd.org, Alfred Perlstein , src-committers@freebsd.org, svn-src-head@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2012 22:43:13 -0000 On 12 December 2012 14:33, Andriy Gapon 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