Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 9 Oct 2018 11:36:20 -0400
From:      "Jonathan T. Looney" <jtl@freebsd.org>
To:        John Baldwin <jhb@freebsd.org>
Cc:        src-committers <src-committers@freebsd.org>, svn-src-all@freebsd.org,  svn-src-head@freebsd.org
Subject:   Re: svn commit: r339251 - in head/sys: net netinet netinet6
Message-ID:  <CADrOrmviC-%2BVz3PMM0yA1=VRwhKnY6Kkv8aG=nFE=VYPL8mZyQ@mail.gmail.com>
In-Reply-To: <bb0f4bca-8cca-f2c2-f8d8-5a8ee548d3ef@FreeBSD.org>
References:  <201810091326.w99DQ7MN083891@repo.freebsd.org> <bb0f4bca-8cca-f2c2-f8d8-5a8ee548d3ef@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Oct 9, 2018 at 11:02 AM John Baldwin <jhb@freebsd.org> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CADrOrmviC-%2BVz3PMM0yA1=VRwhKnY6Kkv8aG=nFE=VYPL8mZyQ>