We see occasional flakiness on TSAN that gives not-so-useful output like this:
==5540==WARNING: failed to fork (errno 12)
==5540==WARNING: Failed to use and restart external symbolizer!
==================
WARNING: ThreadSanitizer: lock-order-inversion (potential deadlock) (pid=5540)
Cycle in lock order graph: M100059481 (0x7fffa93419f8) => M100059482 (0x7fffa93419d0) => M100059481
Mutex M100059482 acquired here while holding mutex M100059481 in main thread:
#0 <null> <null> (test_bitcoin+0xeacce)
#1 <null> <null> (test_bitcoin+0x7b9675)
#2 <null> <null> (test_bitcoin+0x7b8e8b)
#3 <null> <null> (test_bitcoin+0x198299)
#4 <null> <null> (libboost_unit_test_framework.so.1.67.0+0x55dbd)
#5 <null> <null> (libc.so.6+0x2409a)Attempts to symbolize that memory manually suggests a deadlock that is already in our suppressions file.
Although clang sanitizers will default to llvm-symbolizer, it's not in our path, so it defaults to addr2line.
It's not clear if addr2line can be assumed to perform as well as llvm-symbolizer. Testing both locally
indicates they produce very similar output when suppressions files are not used, for instance.
This patch is more of an experiment to see if llvm-symbolizer is able to correctly symbolize the above logs.
If so, either the suppression will stop being flaky or we will obtain useful information to pinpoint the root
cause.