On 10/9/18 8:36 AM, Jonathan T. Looney wrote: > On Tue, Oct 9, 2018 at 11:02 AM John Baldwin <j...@freebsd.org > <mailto:j...@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.
The one that would matter in this case would be idle ithreads. We have some existing checks (WITNESS_WARN) in ithread_loop() already. We should add a td_epochnest assertion next to that line I think. -- John Baldwin _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"