From owner-svn-src-all@freebsd.org Tue Oct 9 15:43:46 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 93D3510B0B82; Tue, 9 Oct 2018 15:43:46 +0000 (UTC) (envelope-from jonlooney@gmail.com) Received: from mail-ed1-f47.google.com (mail-ed1-f47.google.com [209.85.208.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F286E8EB35; Tue, 9 Oct 2018 15:43:45 +0000 (UTC) (envelope-from jonlooney@gmail.com) Received: by mail-ed1-f47.google.com with SMTP id r1-v6so2139098edd.7; Tue, 09 Oct 2018 08:43:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=l413lcB+H9hHocEy/xKZyiszxq37lUdmqLfVT3FldMM=; b=ZzWruewirCPpp9nxgmyxfLexuk8Rb/l31S0CzBoONWWry3chbsT8Syveku1fIueB+7 wAwc8nWE0MtWIKic21nfWwbQExCXg76s8yqcFPaQ7P9hBYRuAoHIwXY4VwKFbakdYhQw sr3ulB+Zb5w3IbxScKVQw+E3o81g1YrE7WnRo+K0EzRLz99MiXt9DbvLb1nQO6wm1K8q pmqK7E8IBOTDrGWkfY5c/4WZKZ0K4BSlIDVb2TyszB8EM2JLoWuxgE8jmy5c4RjrM9yH O58n8yyOTH0elQb/hG3A237BIwZ70J0QyZxqV14Z1O1DXgqPOA4BkohUpzRw9ycMErlA cyWg== X-Gm-Message-State: ABuFfogxNsAi7E/iCqEiOctdya3vMAUHufvJo6yBRC2aQK/xo0mEptXs JlC148a65og/6I7sT+BOYEMZyXwK X-Google-Smtp-Source: ACcGV60+M8RwEQLFfXPz+WGvIGxPtceqxfk3ONnv6QLCfG7e/LURda7ffLe0A6pvQOFCumhLvm+wAQ== X-Received: by 2002:a50:d2d4:: with SMTP id q20-v6mr36559936edg.212.1539099392716; Tue, 09 Oct 2018 08:36:32 -0700 (PDT) Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com. [209.85.128.46]) by smtp.gmail.com with ESMTPSA id o10-v6sm3628521ejc.61.2018.10.09.08.36.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 Oct 2018 08:36:32 -0700 (PDT) Received: by mail-wm1-f46.google.com with SMTP id z25-v6so11319254wmf.1; Tue, 09 Oct 2018 08:36:32 -0700 (PDT) X-Received: by 2002:a1c:dac9:: with SMTP id r192-v6mr2302710wmg.141.1539099391873; Tue, 09 Oct 2018 08:36:31 -0700 (PDT) MIME-Version: 1.0 References: <201810091326.w99DQ7MN083891@repo.freebsd.org> In-Reply-To: From: "Jonathan T. Looney" Date: Tue, 9 Oct 2018 11:36:20 -0400 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r339251 - in head/sys: net netinet netinet6 To: John Baldwin Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.27 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.27 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: Tue, 09 Oct 2018 15:43:46 -0000 On Tue, Oct 9, 2018 at 11:02 AM John Baldwin wrote: > Do we have some sort of simple per-thread epoch counter similar to > td->td_locks that we could assert on in userret() and in the ithread loop > when ithreads go to sleep to help catch leaked locks? > Yes: td->td_epochnest. There are already INVARIANTS checks in malloc (for M_WAITOK), userret(), and _sleep(). I think that covers the cases you mentioned. However, I am very much in favor of adding any additional checks which make sense. Jonathan