The Cirrus CI on my fork of the repo runs on Ubuntu 24.04 with kernel version 6.8.0-38. This has vm.mmap_rnd_bits=32
set, which causes the TSAN and MSAN jobs to fail.
See:
TSAN: https://cirrus-ci.com/task/6619444124844032
0FAIL: minisketch/test
1=====================
2ThreadSanitizer: CHECK failed: tsan_platform_linux.cpp:282 "((personality(old_personality | ADDR_NO_RANDOMIZE))) != ((-1))" (0xffffffffffffffff, 0xffffffffffffffff) (tid=42931)
3FAIL minisketch/test (exit status: 139)
4FAIL: univalue/test/object
5==========================
6ThreadSanitizer: CHECK failed: tsan_platform_linux.cpp:282 "((personality(old_personality | ADDR_NO_RANDOMIZE))) != ((-1))" (0xffffffffffffffff, 0xffffffffffffffff) (tid=42964)
7FAIL univalue/test/object (exit status: 139)
8FAIL: qt/test/test_bitcoin-qt
9=============================
10ThreadSanitizer: CHECK failed: tsan_platform_linux.cpp:282 "((personality(old_personality | ADDR_NO_RANDOMIZE))) != ((-1))" (0xffffffffffffffff, 0xffffffffffffffff) (tid=42994)
11FAIL qt/test/test_bitcoin-qt (exit status: 139)
MSAN: https://cirrus-ci.com/task/4578750543691776
0unning tests: base58_tests from test/base58_tests.cpp
1Running tests: base64_tests from test/base64_tests.cpp
2MemorySanitizer: CHECK failed: msan_linux.cpp:192 "((personality(old_personality | ADDR_NO_RANDOMIZE))) != ((-1))" (0xffffffffffffffff, 0xffffffffffffffff) (tid=22112)
3 <empty stack>
4make[3]: *** [Makefile:22563: test/base32_tests.cpp.test] Error 1
5make[3]: *** Waiting for unfinished jobs....
6MemorySanitizer: CHECK failed: msan_linux.cpp:192 "((personality(old_personality | ADDR_NO_RANDOMIZE))) != ((-1))" (0xffffffffffffffff, 0xffffffffffffffff) (tid=22137)
7 <empty stack>
This job was from mid July. Just in case I reproduced it against todays master: https://github.com/Sjors/bitcoin/pull/57 / https://cirrus-ci.com/task/4886869396160512
My (limited) understanding is that the underlying issue should have been fixed and the fix has been backported to llvm 18.1.3: https://github.com/google/sanitizers/issues/1614#issuecomment-2010316781
Ubuntu 24.04 has shipped that version since early July:https://launchpad.net/ubuntu/noble/amd64/clang-18
I can see in the CI log this this version was indeed used:
0Get:123 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 libllvm18 amd64 1:18.1.3-1ubuntu1 [27.5 MB]
Although I can trivially work around the issue by setting vm.mmap_rnd_bits=28
, perhaps there is a deeper issue worth investigating.
Possibly related: https://github.com/ClickHouse/ClickHouse/issues/64086 (they also tried 18.1.3 and 18.1.6).