-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#25391] DocDB: Enable TSAN for RWCLock and fix potential deadlocks
Summary: Thread sanitizer does not understand `std::timed_mutex`, so it cannot detect related issue, such as lock order reversal. Could use `std::mutex` when building for TSAN to turn on detection of related issues. Also fixed all TSAN issues found after this change. There are two most common patterns for lock order reversion: 1) Usually we acquire object write lock while holding catalog manager mutex_. But sometimes we acquire catalog manager mutex_ while holding object write lock. Fixed by changing place where we acquire catalog manager mutex_. Doing it before acquiring object write lock. Or after object write lock is released. 2) Different write lock order for catalog objects. Fixed by adjusting code to take locks in the object id order. Jira: DB-14620 Test Plan: Jenkins Reviewers: zdrudi, hsunder, xCluster, asrivastava, stiwary Reviewed By: zdrudi, hsunder, asrivastava Subscribers: stiwary, yql, esheng, ybase Tags: #jenkins-ready Differential Revision: https://phorge.dev.yugabyte.com/D40697
- Loading branch information
Showing
45 changed files
with
809 additions
and
575 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.