Page MenuHomePhabricator

[CI] Ensure llvm-symbolizer is available in PATH

Authored by jasonbcox on Jun 25 2020, 23:34.


Group Reviewers
Restricted Project
rABCf42e227d0e70: [CI] Ensure llvm-symbolizer is available in PATH

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> (
    #5 <null> <null> (

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

Test Plan

Run ASAN, TSAN, UBSAN on CI and make sure they still pass

Diff Detail

rABC Bitcoin ABC
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.