HomePhabricator

tests: Fix lock-order-inversion (potential deadlock) in DoS_tests.

Description

tests: Fix lock-order-inversion (potential deadlock) in DoS_tests.

Summary:

Reported by TSAN.

Makes `src/test/test_bitcoin --run_test=DoS_tests` pass also when
compiled with TreadSanitizer (`./configure --with-sanitizers=thread`).

Backport of core PR12882
https://github.com/bitcoin/bitcoin/pull/12882/files

Test Plan:

mkdir build && cd build
../configure --with-sanitizers=thread
make
export TSAN_OPTIONS="suppressions=${PWD}/../test/sanitizer_suppressions/tsan"
./src/test/test_bitcoin -t denialofservice_tests

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D3606

Details

Provenance
practicalswift <practicalswift@users.noreply.github.com>Authored on Apr 4 2018, 12:04
FabienCommitted on Jul 9 2019, 18:57
nakihitoPushed on Jul 9 2019, 19:49
Reviewer
Restricted Project
Differential Revision
D3606: tests: Fix lock-order-inversion (potential deadlock) in DoS_tests.
Parents
rSTAGING8517025eccb8: Merge #13039: Add logging and error handling for file syncing
Branches
Unknown
Tags
Unknown