-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ci: Enable tsan on linux64 build #4563
ci: Enable tsan on linux64 build #4563
Conversation
5d891a6
to
d391967
Compare
I question whether we should retain one run of functional tests that doesn't include any sanitizer so that it is nice and fast.. |
d391967
to
0d6c51b
Compare
I could do that, but we need a target without sanitizers at all and a new job for testing as tsan and ubsan can't run together (see: google/sanitizers#1106). We could use the |
Yes, I think it makes sense to have the following |
7462c2f
to
12f2c27
Compare
This pull request has conflicts, please rebase. |
12f2c27
to
4a1b159
Compare
pls see 3748656 (NOTE: I kept pure |
4a1b159
to
55d2233
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One tiny issue, LGTM otherwise
9ba7ec9
to
65a77d1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, one issue
@@ -178,7 +179,7 @@ class CCoinJoinClientManager | |||
// TODO: or map<denom, CCoinJoinClientSession> ?? | |||
std::deque<CCoinJoinClientSession> deqSessions GUARDED_BY(cs_deqsessions); | |||
|
|||
bool fMixing{false}; | |||
std::atomic<bool> fMixing{false}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you should update
Lines 238 to 241 in c46306a
if (IsMixing()) { | |
return false; | |
} | |
return fMixing = true; |
This pull request has conflicts, please rebase. |
65a77d1
to
1c5e378
Compare
a74691f
to
c5c0eaf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK for squash merge
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
feature_llmq_signing.py failed twice in ci so far..
c5c0eaf
to
5209f25
Compare
5209f25
to
e8cc8e9
Compare
I tried to reproduce locally, but after running the test that's failing for 2 hours in a loop I gave up. I increased the timeout of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK for squash merge
restarted ci test run, hopefully it passes
Make fMixing atomic as it has concurrent access Add tsan suppression for zmq namespace Suppress deadlock false positive in ConnectTip Switch ubsan target to linux32 Add new test job for linux64_cxx17 target without any sanitizers Increase rpc time out for block reward reallocation test Fix heap use after free in CConnman::GetExtraOutboundCount() Different builds for linux32 and linux64 tsan and ubsan Increase timeout for llmq_signing functional test
e8cc8e9
to
99f8609
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK for squash merge
Make fMixing atomic as it has concurrent access Add tsan suppression for zmq namespace Suppress deadlock false positive in ConnectTip Switch ubsan target to linux32 Add new test job for linux64_cxx17 target without any sanitizers Increase rpc time out for block reward reallocation test Fix heap use after free in CConnman::GetExtraOutboundCount() Different builds for linux32 and linux64 tsan and ubsan Increase timeout for llmq_signing functional test
Make fMixing atomic as it has concurrent access Add tsan suppression for zmq namespace Suppress deadlock false positive in ConnectTip Switch ubsan target to linux32 Add new test job for linux64_cxx17 target without any sanitizers Increase rpc time out for block reward reallocation test Fix heap use after free in CConnman::GetExtraOutboundCount() Different builds for linux32 and linux64 tsan and ubsan Increase timeout for llmq_signing functional test
This pull request enables thread sanitiser for linux64 build (including unit tests & functional tests) and fixes/suppresses the following:
fMixing
)deadlock:CChainState::ConnectTip
). False positive description:This kind of lock order inversion looks like a bug in tsan (similar known issue: google/sanitizers#814) and can be easily reproduced with 3 locks by changing the order of the last 2 locks: thread1 locks A, B, C and thread2 locks A, C, B (assuming a reversed unlocking order). Godbolt example here: https://godbolt.org/z/81Y6frYKv (same example with std::scoped_lock https://godbolt.org/z/175x6Yv9h)
I will keep the PR in draft until everything is green and passing in gitlab ci.