From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 15 17:48:00 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A824975; Thu, 15 Nov 2012 17:48:00 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-la0-f54.google.com (mail-la0-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id BF46C8FC12; Thu, 15 Nov 2012 17:47:59 +0000 (UTC) Received: by mail-la0-f54.google.com with SMTP id j13so1803763lah.13 for ; Thu, 15 Nov 2012 09:47:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=Xw6bdC+I6eFvkTXqwe+Mo9bEXEeVNz0MqNR4heZsnOk=; b=N9Gwly5kod5mO29CnLO8nyvOhkfhF556UHnKZi/wd0FLvllKajx+KSHvHsm3GkYa97 VcnnV3sDXLoXSuaxN5IOwNMtrrrBEw1RFlIXgDpsVES0itXR9d96T5QSPOc6ictejUl0 1u5/VOQNi7l2P7lJzoxP0jbjTApgK4TdYPxXdId6hI9R1g7MQJRx7CzXoRGi02pGneqL aRJcM9jpRVodpD1KgMcNmk2yBtupKINTxcb3rhUv1sp676evlItueRQHXBmbfDpXihze 0TxbD2BEC4iYA5DyZbsePWfHjRwA2Vi61zhjCRRjSM58OyjLZUq1MwP/WQDwvX7/60ye DCuQ== MIME-Version: 1.0 Received: by 10.152.110.234 with SMTP id id10mr1839112lab.15.1353001678357; Thu, 15 Nov 2012 09:47:58 -0800 (PST) Sender: asmrookie@gmail.com Received: by 10.112.134.5 with HTTP; Thu, 15 Nov 2012 09:47:58 -0800 (PST) In-Reply-To: <1353001175.1217.153.camel@revolution.hippie.lan> References: <1353001175.1217.153.camel@revolution.hippie.lan> Date: Thu, 15 Nov 2012 17:47:58 +0000 X-Google-Sender-Auth: acsIoPDz87qrn1kfVH81V7-EOkQ Message-ID: Subject: Re: [RFQ] make witness panic an option From: Attilio Rao To: Ian Lepore Content-Type: text/plain; charset=UTF-8 Cc: freebsd-hackers@freebsd.org, Adrian Chadd , freebsd-arch@freebsd.org X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: attilio@FreeBSD.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Nov 2012 17:48:00 -0000 On 11/15/12, Ian Lepore wrote: > On Wed, 2012-11-14 at 22:15 -0800, Adrian Chadd wrote: >> Hi all, >> >> When debugging and writing wireless drivers/stack code, I like to >> sprinkle lots of locking assertions everywhere. However, this does >> cause things to panic quite often during active development. >> >> This patch (against stable/9) makes the actual panic itself >> configurable. It still prints the message regardless. >> >> This has allowed me to sprinkle more locking assertions everywhere to >> investigate whether particular paths have been hit or not. I don't >> necessarily want those to panic the kernel. >> >> I'd like everyone to consider this for FreeBSD-HEAD. >> >> Thanks! > > I strongly support this, because I'm tired of having to hack it in by > hand every time I need it. > > You can't boot an arm platform right now (on freebsd 8, 9, or 10) > without a LOR very early in the boot. Once you get past that, 2 or 3 > device drivers I use panic way before we even get to mounting root. > Those panics can clearly be ignored, because we've been shipping > products for years based on this code. (It's on my to-do list to fix > them, but more pressing problems are higher on the list.) This is a ridicolous motivation. What are the panics in question? Why they are not fixed yet? Without WITNESS_KDB you should not panic even in cases where WITNESS yells. So if you do, it means there is a more subdole breakage going on here. Do you really think that an abusable mechanism will help here rather than fixing the actual problems? > When a new problem crops up that isn't harmless, it totally sucks that I > can't just turn on witness without first hacking the code to make the > known problems non-panicky. I really don't understand what are these "harmless problems" here. I just know one and it is between the dirhash lock and the bufwait lock for UFS, which is carefully documented in the code comments. All the others cases haven't been analyzed deeply enough to quantify them as "harmless". Can you please make real examples? Attilio -- Peace can only be achieved by understanding - A. Einstein