From owner-freebsd-current@FreeBSD.ORG Sat Nov 24 16:16:03 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C96FC64B; Sat, 24 Nov 2012 16:16:03 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com [209.85.217.182]) by mx1.freebsd.org (Postfix) with ESMTP id 0FAE68FC08; Sat, 24 Nov 2012 16:16:02 +0000 (UTC) Received: by mail-lb0-f182.google.com with SMTP id go10so6879083lbb.13 for ; Sat, 24 Nov 2012 08:16:01 -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=yZF2MVY0AGAjBaiU5rTWKzytSPGbFEvDkgsZhOnpWqE=; b=ODpRjz35Ik8Vtfsm/kDUDUkWHAZpOVwxxD0es5/12wWCZu/wvRhs7nBSwOyuGk3F62 EpKLcpmcH4RKlv+8lzyE8s8/z1OzoHVngYtA3APlC6U2Ylin+U+uw6IkICsr9XKP1W9q WFdbJtzA9l5WDghceE8XhA6lZmfeGPuhaAZnz5pmKnK2CtHvkPzAtyGbWpnTyujLFbnB i7spD34BYftrXTcL/McekDtORGAPvPPUvUT7X5ImOJV2Wzxj0qzl9Uzxapyb6j8PEVi2 HfNGs1NrgjCm5iFgsQSoOyGeH3Bg6gPoBmrP9JxYq1SUkqtf2KN/+M/AJy/v/Bev/Pei W/rQ== MIME-Version: 1.0 Received: by 10.152.104.50 with SMTP id gb18mr6482132lab.9.1353773761333; Sat, 24 Nov 2012 08:16:01 -0800 (PST) Sender: asmrookie@gmail.com Received: by 10.112.134.5 with HTTP; Sat, 24 Nov 2012 08:16:01 -0800 (PST) In-Reply-To: References: Date: Sat, 24 Nov 2012 16:16:01 +0000 X-Google-Sender-Auth: YF6dnUXsjlGfNSfVvCS3OfD_cFY Message-ID: Subject: Re: Spurious witness warning when destroying spin mtx From: Attilio Rao To: Ryan Stone Content-Type: text/plain; charset=UTF-8 Cc: FreeBSD Current X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: attilio@FreeBSD.org List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Nov 2012 16:16:03 -0000 On Sat, Nov 24, 2012 at 3:51 PM, Attilio Rao wrote: > On Sat, Nov 24, 2012 at 3:46 PM, Ryan Stone wrote: >> >> On Sat, Nov 24, 2012 at 10:01 AM, Attilio Rao wrote: >>> >>> I seriously wonder why right now we don't assume the lock is unheld. >>> There are likely historically reasons for that, but I would like to >>> know which one are those and eventually fix them out. >>> FWIK, all the other locking primitives assume the lock is already >>> unheld when destroying and I think it would be good to have that for >>> mutexes as well. >>> >>> Can you please show which lock triggers the panic you saw? >>> >>> Thanks, >>> Attilio >>> >> >> It was taskqueue_free: > > taskqueue_free() must not be called in places where there are still > races, so the lock is not really meaningful and should be acquired. Herm, I mean to say "after taskqueue_termintate() returns must not be races...". Attilio -- Peace can only be achieved by understanding - A. Einstein