I made some observations while addressing what I consider bogus failures with Valgrind (MDEV-29710).
When run under Valgrind, the server can be a lot slower, because Valgrind is a single-threaded JIT based CPU that emulates multiple threads by interleaving them. InnoDB is a multi-threaded storage engine. Shutdown or crash recovery can take very long under Valgrind when it chooses an unfortunate scheduling. For example, the mtr framework would silently and forcibly kill the server in the middle of STOP SLAVE or while InnoDB is shutting down. The test could subsequently fail in surprising ways.
Moreover, as lock-free or std::atomic based performance improvements have been added to InnoDB, the Valgrind tests could be taking longer to run. Also new tests are being added to later branches. 10.3 typically completes tests in less than 1 hour, while later branches require 1 to 2 hours, depending on the assigned worker. MDEV-29508 was causing additional 2-hour timeouts in 10.5 and later until I disabled that test under Valgrind.
I think that running Valgrind for 10.5 or later is a serious waste of resources. On the currently latest available 10.5 push, the ASAN build+test would complete in 36 minutes, and the MSAN build+test in 22 minutes.
Unlike Valgrind, ASAN and MSAN cover all code (not just the server) and they are much more likely to catch errors that involve race conditions. And unlike Valgrind, the overhead of ASAN or MSAN is fairly low for multi-threaded programs (I think about 250% or 350%). Valgrind can make many things run hundreds or thousands of times slower.
ASAN shadow bytes are roughly equivalent to the A bits of Valgrind memcheck. One ASAN shadow byte covers 64 bytes, while the Valgrind A bits have 1-byte granularity.
MSAN shadow bytes should be strictly equivalent to the V bits of Valgrind memcheck.
Before 10.5, the code is too broken for MSAN, mainly because before
MDEV-14024updated the Perl Compatible Regular Expression library, it was massively broken (also for ASAN if you let it instrument that code).For branches up to 10.4, a Valgrind builder might still be useful.