Page MenuHomeFreeBSD

witness: fix an incorrect assertion
ClosedPublic

Authored by markj on Jul 2 2015, 12:51 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Sep 22, 1:25 AM
Unknown Object (File)
Tue, Sep 16, 3:25 AM
Unknown Object (File)
Aug 30 2025, 8:37 AM
Unknown Object (File)
Aug 25 2025, 1:21 AM
Unknown Object (File)
Aug 20 2025, 1:56 PM
Unknown Object (File)
Aug 8 2025, 2:38 PM
Unknown Object (File)
Jul 24 2025, 12:12 PM
Unknown Object (File)
Jul 22 2025, 3:28 AM
Subscribers
None

Details

Summary

The number of possible lock list entries for a thread is
LOCK_CHILDCOUNT, and each entry can record up to LOCK_NCHILDREN locks.
When iterating over the list of sleep locks held by a thread, assert
that the loop index is less than LOCK_CHILDCOUNT * LOCK_NCHILDREN rather
than witness_count. The latter determines the size of the lock order
matrix and is thus unrelated, so the previous assertion was incorrect.

Test Plan

None, but this change just weakens an existing assertion. We ran into this at Isilon because we have threads that can acquire a large number (> 2000) of shared locks.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

markj retitled this revision from to witness: fix an incorrect assertion.
markj edited the test plan for this revision. (Show Details)
markj updated this object.
markj added a reviewer: jhb.
jhb edited edge metadata.
This revision is now accepted and ready to land.Jul 7 2015, 3:41 PM
This revision was automatically updated to reflect the committed changes.