From owner-freebsd-current@FreeBSD.ORG Tue Dec 7 19:40:45 2010 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 341AE1065673 for ; Tue, 7 Dec 2010 19:40:45 +0000 (UTC) (envelope-from mdf356@gmail.com) Received: from mail-iw0-f174.google.com (mail-iw0-f174.google.com [209.85.214.174]) by mx1.freebsd.org (Postfix) with ESMTP id CE6318FC23 for ; Tue, 7 Dec 2010 19:40:44 +0000 (UTC) Received: by iwn9 with SMTP id 9so252035iwn.19 for ; Tue, 07 Dec 2010 11:40:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=juBEuXkOB9/OTN7xpo+kQ/u6sPgrGJdqF3H7lVUBANA=; b=GkIiVSBNZKuQmDTAb0+EyhheZ9YsseCy6bvvK0mqBRK4DzPEFOq7siy2iePOL8GvFk E1bZrp6KOva6Q/DSt1Oi82Hil4M30RDIB/2UIsjodpoS2QDnrS/nthxSYflko9gXuqlP FF00rU6chnbWW+iPnPmfSOWDwCbMUH77+nK84= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=KaYL7ZP2Iq5pI5voMeB1/7UKmBMo12JnJ49/gUiaV4fDtMGVfU2fH9qfEJZgILR/xt u0ZZd5sWM0wFg+cErHkLvKlvQF/VMiidktvMbcam897KKOi8YOIXAarDwf8FubS4Xe/R LkC77LwJz6vxIJ+D04oc8T7CMxRXXaMn1EqGs= MIME-Version: 1.0 Received: by 10.231.15.136 with SMTP id k8mr7999786iba.51.1291750843930; Tue, 07 Dec 2010 11:40:43 -0800 (PST) Received: by 10.231.35.130 with HTTP; Tue, 7 Dec 2010 11:40:41 -0800 (PST) In-Reply-To: <4CFE6C83.70100@freebsd.org> References: <44B787D8-243C-4880-A532-261435C89940@gmail.com> <4CFE6C83.70100@freebsd.org> Date: Tue, 7 Dec 2010 11:40:41 -0800 Message-ID: From: Matthew Fleming To: Julian Elischer Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Attilio Rao , Garrett Cooper , freebsd-current , Erik Cederstrand Subject: Re: Lock order reversal . X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Dec 2010 19:40:45 -0000 On Tue, Dec 7, 2010 at 9:18 AM, Julian Elischer wrote: > On 12/7/10 3:41 AM, Attilio Rao wrote: >> >> 2010/12/7 Erik Cederstrand: >>> >>> Den 07/12/2010 kl. 10.20 skrev Garrett Cooper: >>> >>>> On Dec 7, 2010, at 12:26 AM, Mehmet Erol >>>> Sanliturk =A0wrote: >>>> >>>>> A Dmesg.TXT is attached having a lock order reversal . >>>> >>>> =A0 =A0The mount LOR is well known. >>> >>> I see that this is the standard response to lot's of LOR reports. It >>> seems to be one of the most-reported errors on CURRENT (and it's certai= nly a >>> loud one), but I think a lot of people waste time researching the error= and >>> browsing Bjoerns LOR page, only to get the above response (not picking = on >>> you, Garrett). >>> >>> Do we have the possibility of silencing well-known and presumably >>> harmless LOR's if there isn't sufficient motivation to fix the source? >> >> Witness has an 'internal blessing list' we never wanted to use in >> order to keep them popping up as reminder. >> Actually, the fact the LOR is 'known' doesn't mean it is 'analyzed'. >> The very few 'Analyzed but harmless' cases in the past have been >> handled via _NOWITNESS flags I guess. > > the problem is that the witness output tells you the second case (the > reversed case) > but it doesn't have any clues about the first case (the one that wsa the > other way around). > > An extended witness might use a lot of memory but associate with each loc= k a > 'last place called when a lock was already held' > that might give a clue as to where the other instance was. I'm not > volunteering to write it, > but it might be very worth while.. I'd certainly like to hear other ideas= as > well. I have a small patch against stable/7 that adds a single bit to each witness structure so that, if the "normal" lock order is ever encountered after a reversal, the stack is printed. It doesn't help when the order is defined statically, though. I could try to roll this up against -CURRENT this weekend. Thanks, matthew