# ThreadSanitizer suppressions
# ============================
#
# https://github.com/google/sanitizers/wiki/ThreadSanitizerSuppressions

# Data races from zmq namespace
race:zmq::*

# race (TODO fix)
race:LoadWallet
race:WalletBatch::WriteHDChain
race:BerkeleyBatch
race:BerkeleyDatabase
race:DatabaseBatch
race:zmq::*
race:bitcoin-qt
# deadlock (TODO fix)
# To reproduce, see:
# https://github.com/bitcoin/bitcoin/issues/19303#issuecomment-1514926359
deadlock:CChainState::ConnectTip
deadlock:wallet_tests::CreateWallet

# deadlock false positive (see: https://github.com/dashpay/dash/pull/4563)
deadlock:CChainState::ConnectTip

# Intentional deadlock in tests
deadlock:sync_tests::potential_deadlock_detected

# fRPCRunning race
race:InterruptRPC

# Wildcard for all gui tests, should be replaced with non-wildcard suppressions
race:src/qt/test/*
deadlock:src/qt/test/*

# External libraries
# https://github.com/bitcoin/bitcoin/pull/27658#issuecomment-1547639621
deadlock:libdb
race:libzmq

# Race in headers only Boost Test
race:std::__1::ios_base::flags

# BerkeleyDB internal lock ordering - BDB uses its own locking protocol
# with pthread rwlocks that TSAN cannot properly reason about
deadlock:BerkeleyBatch
deadlock:DatabaseBatch
deadlock:__db_pthread_mutex


# Intermittent issues
# -------------------
#
# Suppressions that follow might only happen intermittently, thus they are not
# reproducible. Make sure to include a link to a full trace.

# https://github.com/bitcoin/bitcoin/issues/20618
race:CZMQAbstractPublishNotifier::SendZmqMessage

# https://github.com/bitcoin/bitcoin/pull/27498#issuecomment-1517410478
race:epoll_ctl

# https://github.com/bitcoin/bitcoin/issues/23366
race:std::__1::ios_base::*
