LinuxKPI and WITNESS and db> show alllocks not working?

From: Bjoern A. Zeeb <bz_at_FreeBSD.org>
Date: Thu, 27 Aug 2026 20:43:56 UTC
Hi,

I was trying to debug some locking issues in LinuxKPI once again.  This
time I didn't want to manually adjust the locking code in there but put
something up to disable the *_NOWITNESS in LinuxKPI on the locks [1].

My problem is that despite all of this dbb show alllocks et all will not
show the locks.  I manually added a warning or (also manually) removed
the NOWITNESS from the relevant lock entirely but nothing made a
difference.

The WITNESS_ALL case did work as that give withint the LinuxKPI macros
different lock names, which helped to identify some but not all in all
cases;  also show lockchain did help in one case but not the other.

Anyone an idea why a kernel including std.debug and clearly having the
changes working and compiled in not track the locks in witness?

/bz


[1] https://reviews.freebsd.org/D59231  (depends on another revision for
LINUXKPI_DEBUG; see stack).

-- 
For there shall arise false Christs, and false prophets, and shall shew
great signs and wonders; insomuch that, if it were possible, they shall
deceive the very elect. Behold, I have told you before. [Mat. 24:24-25]