Skip to content

Commit

Permalink
[#21585] docdb: Add a tsan suppression for boost::regex_match
Browse files Browse the repository at this point in the history
Summary:
**Issue:**
Starting from D29217, we changed from std::regex to boost::regex for faster Prometheus metric regex match.
Recently, we observed TSAN race inside of boost::regex_match from many unit tests. This is because saved_state in boost::regex uses a global caches for mem block, and since time period between checking regex was low, TSAN detects race condition.

**Fix:**
Add a tsan suppression as it is a false positive.
Jira: DB-10476

Test Plan: Jenkins

Reviewers: sergei

Reviewed By: sergei

Subscribers: ybase, bogdan

Differential Revision: https://phorge.dev.yugabyte.com/D33355
  • Loading branch information
yusong-yan committed Mar 21, 2024
1 parent f689455 commit c1bd57d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions build-support/tsan-suppressions.txt
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ race:yb::ExternalDaemon::LogTailerThread::LogTailerThread
# Known well implemented lock-free containers
race:boost::lockfree

# Suppress TSAN data race in boost::regex_match (potential false positive)
race:boost::regex_detail_500::saved_state::saved_state

# -------------------------------------------------------------------------------------------------
# Supressions from libcds:

Expand Down

0 comments on commit c1bd57d

Please sign in to comment.