Issue Details

Number
30674
Title
TSAN/MSAN fails with vm.mmap_rnd_bits=32 even with llvm 18.1.3
Description
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 ``` FAIL: minisketch/test ===================== ThreadSanitizer: CHECK failed: tsan_platform_linux.cpp:282 "((personality(old_personality | ADDR_NO_RANDOMIZE))) != ((-1))" (0xffffffffffffffff, 0xffffffffffffffff) (tid=42931) FAIL minisketch/test (exit status: 139) FAIL: univalue/test/object ========================== ThreadSanitizer: CHECK failed: tsan_platform_linux.cpp:282 "((personality(old_personality | ADDR_NO_RANDOMIZE))) != ((-1))" (0xffffffffffffffff, 0xffffffffffffffff) (tid=42964) FAIL univalue/test/object (exit status: 139) FAIL: qt/test/test_bitcoin-qt ============================= ThreadSanitizer: CHECK failed: tsan_platform_linux.cpp:282 "((personality(old_personality | ADDR_NO_RANDOMIZE))) != ((-1))" (0xffffffffffffffff, 0xffffffffffffffff) (tid=42994) FAIL qt/test/test_bitcoin-qt (exit status: 139) ``` MSAN: https://cirrus-ci.com/task/4578750543691776 ``` unning tests: base58_tests from test/base58_tests.cpp Running tests: base64_tests from test/base64_tests.cpp MemorySanitizer: CHECK failed: msan_linux.cpp:192 "((personality(old_personality | ADDR_NO_RANDOMIZE))) != ((-1))" (0xffffffffffffffff, 0xffffffffffffffff) (tid=22112) <empty stack> make[3]: *** [Makefile:22563: test/base32_tests.cpp.test] Error 1 make[3]: *** Waiting for unfinished jobs.... MemorySanitizer: CHECK failed: msan_linux.cpp:192 "((personality(old_personality | ADDR_NO_RANDOMIZE))) != ((-1))" (0xffffffffffffffff, 0xffffffffffffffff) (tid=22137) <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: ``` Get: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).
URL
https://github.com/bitcoin/bitcoin/issue/30674
Closed by
Back to List