I’m seeing this race failure in two unrelated PRs during the validation_chainstate_tests/chainstate_update_tip
case:
https://cirrus-ci.com/task/5125235994263552?logs=ci#L4140 from #22702 https://cirrus-ci.com/task/5269464468946944?logs=ci#L4142 from #21206
0test/validation_chainstate_tests.cpp(83): Entering test case "chainstate_update_tip"
1
2...
3
4[Makefile:18480: test/validation_chainstate_tests.cpp.test] Error 1
5
6...
7
8WARNING: ThreadSanitizer: data race (pid=23076)
9Read of size 8 at 0x7f23d669c6d0 by main thread:
10[#0](/bitcoin-bitcoin/0/) std::__1::ios_base::width() const /usr/lib/llvm-12/bin/../include/c++/v1/ios:523:12 (test_bitcoin+0x17826c)
11
12...
13
14 Location is global 'std::__1::cout' of size 160 at 0x7f23d669c6b0 (libc++.so.1+0x0000000cd6d0)
15
16...
17
18SUMMARY: ThreadSanitizer: data race /usr/lib/llvm-12/bin/../include/c++/v1/ios:523:12 in std::__1::ios_base::width() const
I’m not sure if this is a real bug or spurious, but I did work around a similar problem previously (in #15719) by adding a suppression: