Page MenuHomeFreeBSD

witness: fix an incorrect assertion
ClosedPublic

Authored by markj on Jul 2 2015, 12:51 AM.
Tags
None
Referenced Files
F103273086: D2974.id6761.diff
Fri, Nov 22, 10:17 PM
Unknown Object (File)
Sep 26 2024, 8:24 AM
Unknown Object (File)
Sep 22 2024, 1:40 PM
Unknown Object (File)
Sep 21 2024, 3:11 PM
Unknown Object (File)
Sep 17 2024, 7:25 PM
Unknown Object (File)
Sep 9 2024, 3:51 AM
Unknown Object (File)
Sep 8 2024, 5:47 PM
Unknown Object (File)
Sep 8 2024, 5:39 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.