Sjors / bitcoin

Bitcoin Core integration/staging tree
https://bitcoin.org/en/download
MIT License
8 stars 11 forks source link

Trigger spurious MSan / TSan failure on self-hosted CI #51

Closed Sjors closed 4 months ago

Sjors commented 4 months ago

Trivial change to try and trigger MSan and/or TSan failure on self-hosted CI.

The two CI machines run Ubuntu 24.04 on AMD. It uses Podman 4.9.3 with an individual user per cirrus runner (with no sudo rights).

One is on kernel 5.15.0-112, the other on 6.8.0-38.

Sjors commented 4 months ago

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>
Sjors commented 4 months ago

This might be the same as https://github.com/ClickHouse/ClickHouse/issues/64086, related to https://bugs.launchpad.net/ubuntu/+source/llvm-toolchain-14/+bug/2048768/comments/8.

Since I have two machine on different kernel versions, the reason it doesn't consistently fail could be that.

I'm now re-running MSan on the 5.15 machine (it previously ran and failed on the other). For TSan I'm trying the sudo sysctl vm.mmap_rnd_bits=28 workaround on the 6.8 machine.

(you can't see the restarted jobs here, the Cirrus - Github integration often shows a stale status, though it updates once the job ends)

Sjors commented 4 months ago

Ok, that did the trick.