Closed Bug 1806222 Opened 3 years ago Closed 3 years ago

llvm-symbolizer path isn't properly set for TSAN cppunittests

Categories

(Testing :: General, task)

task

Tracking

(firefox110 fixed)

RESOLVED FIXED
110 Branch
Tracking Status
firefox110 --- fixed

People

(Reporter: RyanVM, Assigned: RyanVM)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

I've been looking at enabling more test suites in TSAN mode. When looking at cppunit tests, I noticed that TSAN couldn't find the llvm-symbolizer causing output as shown below:

==1619==WARNING: external symbolizer didn't start up correctly!
==1619==WARNING: Can't write to symbolizer at fd 8
llvm-symbolizer: Unknown command line argument '--inlines'.  Try: '/usr/bin/llvm-symbolizer -help'
llvm-symbolizer: Did you mean '-inlining'?
==1619==WARNING: external symbolizer didn't start up correctly!
==1619==WARNING: Failed to use and restart external symbolizer!
==================
WARNING: ThreadSanitizer: data race (pid=1619)
  Read of size 8 at 0x55bebb822588 by main thread:
    #0 <null> <null> (TestBaseProfiler+0x1ef5e5) (BuildId: 14998f002c2747752fde24c57f9a5b6412e4e2eb)
    #1 <null> <null> (TestBaseProfiler+0xceaba) (BuildId: 14998f002c2747752fde24c57f9a5b6412e4e2eb)
    #2 <null> <null> (libstdc++.so.6+0xbdb63) (BuildId: f2119a44a99758114620c8e9d8e243d7094f77f6)
    #3 <null> <null> (TestBaseProfiler+0x17ec61) (BuildId: 14998f002c2747752fde24c57f9a5b6412e4e2eb)
    #4 <null> <null> (TestBaseProfiler+0x196010) (BuildId: 14998f002c2747752fde24c57f9a5b6412e4e2eb)
    #5 <null> <null> (libc.so.6+0x21b96) (BuildId: 3247775c25514939b9a5ffa9d3be63f3a4cb9641)
  Previous write of size 8 at 0x55bebb822588 by thread T71 (mutexes: write M0):
    #0 <null> <null> (TestBaseProfiler+0x1ee25b) (BuildId: 14998f002c2747752fde24c57f9a5b6412e4e2eb)
    #1 <null> <null> (TestBaseProfiler+0x1ef865) (BuildId: 14998f002c2747752fde24c57f9a5b6412e4e2eb)
    #2 <null> <null> (TestBaseProfiler+0xc8206) (BuildId: 14998f002c2747752fde24c57f9a5b6412e4e2eb)
  Location is global '<null>' at 0x000000000000 (TestBaseProfiler+0x16a2588)
  Mutex M0 (0x55bebb822538) created at:
    #0 <null> <null> (TestBaseProfiler+0xc9a6f) (BuildId: 14998f002c2747752fde24c57f9a5b6412e4e2eb)
    #1 <null> <null> (TestBaseProfiler+0x230ff2) (BuildId: 14998f002c2747752fde24c57f9a5b6412e4e2eb)
    #2 <null> <null> (TestBaseProfiler+0x223609) (BuildId: 14998f002c2747752fde24c57f9a5b6412e4e2eb)
    #3 <null> <null> (TestBaseProfiler+0x2a9e6c) (BuildId: 14998f002c2747752fde24c57f9a5b6412e4e2eb)
  Thread T71 (tid=1693, running) created by main thread at:
    #0 <null> <null> (TestBaseProfiler+0xc829d) (BuildId: 14998f002c2747752fde24c57f9a5b6412e4e2eb)
    #1 <null> <null> (TestBaseProfiler+0x1ef7b7) (BuildId: 14998f002c2747752fde24c57f9a5b6412e4e2eb)
    #2 <null> <null> (TestBaseProfiler+0x217e01) (BuildId: 14998f002c2747752fde24c57f9a5b6412e4e2eb)
    #3 <null> <null> (TestBaseProfiler+0x1f2907) (BuildId: 14998f002c2747752fde24c57f9a5b6412e4e2eb)
    #4 <null> <null> (TestBaseProfiler+0x1f72ff) (BuildId: 14998f002c2747752fde24c57f9a5b6412e4e2eb)
    #5 <null> <null> (TestBaseProfiler+0x17ebc1) (BuildId: 14998f002c2747752fde24c57f9a5b6412e4e2eb)
    #6 <null> <null> (TestBaseProfiler+0x196010) (BuildId: 14998f002c2747752fde24c57f9a5b6412e4e2eb)
    #7 <null> <null> (libc.so.6+0x21b96) (BuildId: 3247775c25514939b9a5ffa9d3be63f3a4cb9641)
SUMMARY: ThreadSanitizer: data race (/builds/worker/workspace/build/tests/cppunittest/TestBaseProfiler+0x1ef5e5) (BuildId: 14998f002c2747752fde24c57f9a5b6412e4e2eb)

The patch I wrote refactors the existing logic for ASAN symbolication to work for both ASAN and TSAN. Resulting log output now shows proper symbolication:

==1714==ERROR: ThreadSanitizer: SEGV on unknown address 0x7f61225537ff (pc 0x55dc8e1c81b9 bp 0x000000000800 sp 0x7ffd00052290 T1714)
==1714==The signal is caused by a READ memory access.
    #0 TestPage(char const*, unsigned long, int) /builds/worker/checkouts/gecko/mfbt/tests/TestPoisonArea.cpp:457:21 (TestPoisonArea+0x1341b9) (BuildId: 24befbb4f927332d960875204b1aa0f05e149b05)
    #1 main /builds/worker/checkouts/gecko/mfbt/tests/TestPoisonArea.cpp:526:13 (TestPoisonArea+0x133e3b) (BuildId: 24befbb4f927332d960875204b1aa0f05e149b05)
    #2 __libc_start_main /tmp/glibc/csu/../csu/libc-start.c:310 (libc.so.6+0x21b96) (BuildId: 3247775c25514939b9a5ffa9d3be63f3a4cb9641)
    #3 _start <null> (TestPoisonArea+0x85a78) (BuildId: 24befbb4f927332d960875204b1aa0f05e149b05)
ThreadSanitizer can not provide additional info.
SUMMARY: ThreadSanitizer: SEGV /builds/worker/checkouts/gecko/mfbt/tests/TestPoisonArea.cpp:457:21 in TestPage(char const*, unsigned long, int)
Summary: llvm-symbolicator path isn't properly set for TSAN cppunittests → llvm-symbolizer path isn't properly set for TSAN cppunittests
Attachment #9308798 - Attachment description: Bug 1806222 - Set llvm-symbolicator path for TSAN cpptests & gtests. → Bug 1806222 - Set llvm-symbolizer path for TSAN cpptests & gtests.
Blocks: 1806483
Pushed by rvandermeulen@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/9275ff4a7953 Set llvm-symbolizer path for TSAN cpptests & gtests. r=glandium
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 110 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: