From owner-freebsd-hackers@FreeBSD.ORG Sun Nov 25 14:20:14 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 C37FD60A; Sun, 25 Nov 2012 14:20:14 +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 911C58FC08; Sun, 25 Nov 2012 14:20:13 +0000 (UTC) Received: by mail-la0-f54.google.com with SMTP id j13so9859159lah.13 for ; Sun, 25 Nov 2012 06:20:12 -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=cnNqoQPukRmNldxMx9UofAenoA3cai5nayBCAeWjFvo=; b=E0KfcDGGr+KQEZ/nPVcPELLb8AqrZn/f7EhpeQkoccD6FCqrJwsQXJ0i/UjkdMVTzx rG4xBoqzxPpTl2xp/+tQvr0H+nP/430Ti8oGVilHRO79oDvecUfax0ddv9bjIWx3dyjj rnvqU4fFeiK/ZNh++/3/3D04wAHCKOUEa0kydl8Lj0YqljIZ/UBHYT6UglKMSO08yN43 pti+hCgwBjZHTK3x00P9ToaHRnzx6VzFmCdji6ZqEg4Lz2QAHb3X7beRusWdcmDoUgy3 1yse8QlqaesAIC/dMisCeFnRYIpKF3Rr0vNK1hJ9CgQIn3xptssrxosX06hA9vk2Jgyq cA1Q== MIME-Version: 1.0 Received: by 10.152.123.103 with SMTP id lz7mr8223554lab.21.1353853212272; Sun, 25 Nov 2012 06:20:12 -0800 (PST) Sender: asmrookie@gmail.com Received: by 10.112.134.5 with HTTP; Sun, 25 Nov 2012 06:20:12 -0800 (PST) In-Reply-To: <20121125131252.GJ1460@garage.freebsd.pl> References: <20121125123920.GI1460@garage.freebsd.pl> <20121125131252.GJ1460@garage.freebsd.pl> Date: Sun, 25 Nov 2012 14:20:12 +0000 X-Google-Sender-Auth: VIDSUp_4vKS6zzsIoSf3vrNnqRY Message-ID: Subject: Re: [RFQ] make witness panic an option From: Attilio Rao To: Pawel Jakub Dawidek Content-Type: text/plain; charset=UTF-8 Cc: "freebsd-hackers@freebsd.org" , Adrian Chadd , Giovanni Trematerra , 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: Sun, 25 Nov 2012 14:20:14 -0000 On Sun, Nov 25, 2012 at 1:12 PM, Pawel Jakub Dawidek wrote: > On Sun, Nov 25, 2012 at 12:42:16PM +0000, Attilio Rao wrote: >> On Sun, Nov 25, 2012 at 12:39 PM, Pawel Jakub Dawidek wrote: >> > WITNESS is a development tool. We don't ship production kernels with >> > WITNESS even compiled in. What is more efficient use of developer time: >> > going through full reboot cycle every time or reading the warning from >> > console, unloading a module, fixing the bug and loading it again? >> > >> > And if this option is turned off by default what is the problem? >> >> Yes, so, why do you write here? > > I'm trying to understand why do you object. Until now the only concern > you have that I found is that you are afraid of it being abused. I don't > see how this can be abused if it is turned off by default. If someone > will commit a change that will turn it on by default, believe me, I'll > unleash hell personally. > > As I said, WITNESS is development tool, a very handy one. This doesn't > mean we can't make it even more handy. It is there to help find bugs > faster, right? Adrian is proposing a change that will make it help to > find and fix bugs maybe even faster. > >> Go ahead and fix BLESSED, make it the default, etc. > > This is another story, but BLESSED is much less controversial to me. > It is turned off by default in assumption that all the code that runs in > our kernel is developed for FreeBSD, which is not true. For example ZFS > is, I think, the biggest locking consumer in our kernel (around 120 > locks), which wasn't originally developed for FreeBSD and locking order > was verified using different tools. Now on FreeBSD it triggers massive > LOR warnings from WITNESS, eventhough those are not bugs. At some point > I verified many of them and they were all false-positives, so I simply > turned off WITNESS warnings for ZFS locks. Why? Because BLESSED is > turned off in fear of abuse, and this is turn is the cause of mentioned > hack in ZFS. Just a few notes about this: to my knowledge you never discussed publically this. WITNESS is not a perfect tool and it has several issues (I tried to summarize them a bit at the beginning of this thread), where the biggest problem is that its file/line approach doesn't help when willing to shutdown specific LOR without shutting down all of them involving the lock pair, etc. I have no idea what are the problems you are facing here with WITNESS and ZFS but if you could summarize them we can work on getting something which is useful also with ZFS. Attilio -- Peace can only be achieved by understanding - A. Einstein