Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-49346

Re-enable use of libunwind with TSAN

    • Server Development Platform
    • ALL
    • Hide

      Example backtrace:

      >>> bt
      #0  0x00007ffff4e7b727 in raise () from /lib/x86_64-linux-gnu/libpthread.so.0
      #1  0x00005555556462cc in __interceptor_raise () at /data/mci/76345995686809862f0b80d49f4a9e31/toolchain-builder/tmp/build-llvm.sh-IHB/llvm/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:1998
      #2  0x00005555556bacb2 in mongo::(anonymous namespace)::StackTraceSigAltStackTest::tryHandler(void (*)(int, siginfo_t*, void*))::{lambda()#2}::operator()() const (this=0x7b0c00000c10) at src/mongo/util/stacktrace_test.cpp:435
      #3  0x00005555556ba981 in std::__invoke_impl<void, mongo::(anonymous namespace)::StackTraceSigAltStackTest::tryHandler(void (*)(int, siginfo_t*, void*))::{lambda()#2}>(std::__invoke_other, mongo::(anonymous namespace)::StackTraceSigAltStackTest::tryHandler(void (*)(int, siginfo_t*, void*))::{lambda()#2}&&) (__f=...) at /opt/mongodbtoolchain/revisions/e5348beb43e147b74a40f4ca5fb05a330ea646cf/stow/gcc-v3.U0D/lib/gcc/x86_64-mongodb-linux/8.2.0/../../../../include/c++/8.2.0/bits/invoke.h:60
      #4  0x00005555556ba921 in std::__invoke<mongo::(anonymous namespace)::StackTraceSigAltStackTest::tryHandler(void (*)(int, siginfo_t*, void*))::{lambda()#2}>(std::__invoke_result&&, (mongo::(anonymous namespace)::StackTraceSigAltStackTest::tryHandler(void (*)(int, siginfo_t*, void*))::{lambda()#2}&&)...) (__fn=...) at /opt/mongodbtoolchain/revisions/e5348beb43e147b74a40f4ca5fb05a330ea646cf/stow/gcc-v3.U0D/lib/gcc/x86_64-mongodb-linux/8.2.0/../../../../include/c++/8.2.0/bits/invoke.h:95
      #5  0x00005555556ba87d in std::__apply_impl<mongo::(anonymous namespace)::StackTraceSigAltStackTest::tryHandler(void (*)(int, siginfo_t*, void*))::{lambda()#2}, std::tuple<>>(mongo::(anonymous namespace)::StackTraceSigAltStackTest::tryHandler(void (*)(int, siginfo_t*, void*))::{lambda()#2}&&, std::tuple<>&&, std::integer_sequence<unsigned long>) (__f=..., __t=...) at /opt/mongodbtoolchain/revisions/e5348beb43e147b74a40f4ca5fb05a330ea646cf/stow/gcc-v3.U0D/lib/gcc/x86_64-mongodb-linux/8.2.0/../../../../include/c++/8.2.0/tuple:1678
      #6  0x00005555556ba80e in std::apply<mongo::(anonymous namespace)::StackTraceSigAltStackTest::tryHandler(void (*)(int, siginfo_t*, void*))::{lambda()#2}, std::tuple<> >(mongo::(anonymous namespace)::StackTraceSigAltStackTest::tryHandler(void (*)(int, siginfo_t*, void*))::{lambda()#2}&&, std::tuple<>&&) (__f=..., __t=...) at /opt/mongodbtoolchain/revisions/e5348beb43e147b74a40f4ca5fb05a330ea646cf/stow/gcc-v3.U0D/lib/gcc/x86_64-mongodb-linux/8.2.0/../../../../include/c++/8.2.0/tuple:1687
      #7  0x00005555556ba751 in mongo::stdx::thread::thread<mongo::(anonymous namespace)::StackTraceSigAltStackTest::tryHandler(void (*)(int, siginfo_t*, void*))::{lambda()#2}, , 0>(mongo::(anonymous namespace)::StackTraceSigAltStackTest::tryHandler(void (*)(int, siginfo_t*, void*))::{lambda()#2})::{lambda()#1}::operator()() (this=0x7b0c00000c08) at src/mongo/stdx/thread.h:186
      #8  0x00005555556ba6c1 in std::__invoke_impl<void, mongo::stdx::thread::thread<mongo::(anonymous namespace)::StackTraceSigAltStackTest::tryHandler(void (*)(int, siginfo_t*, void*))::{lambda()#2}, , 0>(mongo::(anonymous namespace)::StackTraceSigAltStackTest::tryHandler(void (*)(int, siginfo_t*, void*))::{lambda()#2})::{lambda()#1}>(std::__invoke_other, mongo::stdx::thread::thread<mongo::(anonymous namespace)::StackTraceSigAltStackTest::tryHandler(void (*)(int, siginfo_t*, void*))::{lambda()#2}, , 0>(mongo::(anonymous namespace)::StackTraceSigAltStackTest::tryHandler(void (*)(int, siginfo_t*, void*))::{lambda()#2})::{lambda()#1}&&) (__f=...) at /opt/mongodbtoolchain/revisions/e5348beb43e147b74a40f4ca5fb05a330ea646cf/stow/gcc-v3.U0D/lib/gcc/x86_64-mongodb-linux/8.2.0/../../../../include/c++/8.2.0/bits/invoke.h:60
      #9  0x00005555556ba5e1 in std::__invoke<mongo::stdx::thread::thread<mongo::(anonymous namespace)::StackTraceSigAltStackTest::tryHandler(void (*)(int, siginfo_t*, void*))::{lambda()#2}, , 0>(mongo::(anonymous namespace)::StackTraceSigAltStackTest::tryHandler(void (*)(int, siginfo_t*, void*))::{lambda()#2})::{lambda()#1}> (__fn=...) at /opt/mongodbtoolchain/revisions/e5348beb43e147b74a40f4ca5fb05a330ea646cf/stow/gcc-v3.U0D/lib/gcc/x86_64-mongodb-linux/8.2.0/../../../../include/c++/8.2.0/bits/invoke.h:95
      #10 0x00005555556ba599 in std::thread::_Invoker<std::tuple<mongo::stdx::thread::thread<mongo::(anonymous namespace)::StackTraceSigAltStackTest::tryHandler(void (*)(int, siginfo_t*, void*))::{lambda()#2}, , 0>(mongo::(anonymous namespace)::StackTraceSigAltStackTest::tryHandler(void (*)(int, siginfo_t*, void*))::{lambda()#2})::{lambda()#1}> >::_M_invoke<0ul> (this=0x7b0c00000c08) at /opt/mongodbtoolchain/revisions/e5348beb43e147b74a40f4ca5fb05a330ea646cf/stow/gcc-v3.U0D/lib/gcc/x86_64-mongodb-linux/8.2.0/../../../../include/c++/8.2.0/thread:234
      #11 0x00005555556ba549 in std::thread::_Invoker<std::tuple<mongo::stdx::thread::thread<mongo::(anonymous namespace)::StackTraceSigAltStackTest::tryHandler(void (*)(int, siginfo_t*, void*))::{lambda()#2}, , 0>(mongo::(anonymous namespace)::StackTraceSigAltStackTest::tryHandler(void (*)(int, siginfo_t*, void*))::{lambda()#2})::{lambda()#1}> >::operator()() (this=0x7b0c00000c08) at /opt/mongodbtoolchain/revisions/e5348beb43e147b74a40f4ca5fb05a330ea646cf/stow/gcc-v3.U0D/lib/gcc/x86_64-mongodb-linux/8.2.0/../../../../include/c++/8.2.0/thread:243
      #12 0x00005555556ba2cd in std::thread::_State_impl<std::thread::_Invoker<std::tuple<mongo::stdx::thread::thread<mongo::(anonymous namespace)::StackTraceSigAltStackTest::tryHandler(void (*)(int, siginfo_t*, void*))::{lambda()#2}, , 0>(mongo::(anonymous namespace)::StackTraceSigAltStackTest::tryHandler(void (*)(int, siginfo_t*, void*))::{lambda()#2})::{lambda()#1}> > >::_M_run() (this=0x7b0c00000c00) at /opt/mongodbtoolchain/revisions/e5348beb43e147b74a40f4ca5fb05a330ea646cf/stow/gcc-v3.U0D/lib/gcc/x86_64-mongodb-linux/8.2.0/../../../../include/c++/8.2.0/thread:186
      #13 0x00005555557247df in std::execute_native_thread_routine (__p=0x7b0c00000c00) at ../../../../../src/combined/libstdc++-v3/src/c++11/thread.cc:80
      #14 0x000055555563fa03 in __tsan_thread_start_func () at /data/mci/76345995686809862f0b80d49f4a9e31/toolchain-builder/tmp/build-llvm.sh-IHB/llvm/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:955
      #15 0x00007ffff4e706db in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
      #16 0x00007ffff498188f in clone () from /lib/x86_64-linux-gnu/libc.so.6
      
      Show
      Example backtrace: >>> bt #0 0x00007ffff4e7b727 in raise () from /lib/x86_64-linux-gnu/libpthread.so.0 #1 0x00005555556462cc in __interceptor_raise () at /data/mci/76345995686809862f0b80d49f4a9e31/toolchain-builder/tmp/build-llvm.sh-IHB/llvm/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:1998 #2 0x00005555556bacb2 in mongo::(anonymous namespace)::StackTraceSigAltStackTest::tryHandler(void (*)( int , siginfo_t*, void*))::{lambda()#2}:: operator ()() const ( this =0x7b0c00000c10) at src/mongo/util/stacktrace_test.cpp:435 #3 0x00005555556ba981 in std::__invoke_impl<void, mongo::(anonymous namespace)::StackTraceSigAltStackTest::tryHandler(void (*)( int , siginfo_t*, void*))::{lambda()#2}>(std::__invoke_other, mongo::(anonymous namespace)::StackTraceSigAltStackTest::tryHandler(void (*)( int , siginfo_t*, void*))::{lambda()#2}&&) (__f=...) at /opt/mongodbtoolchain/revisions/e5348beb43e147b74a40f4ca5fb05a330ea646cf/stow/gcc-v3.U0D/lib/gcc/x86_64-mongodb-linux/8.2.0/../../../../include/c++/8.2.0/bits/invoke.h:60 #4 0x00005555556ba921 in std::__invoke<mongo::(anonymous namespace)::StackTraceSigAltStackTest::tryHandler(void (*)( int , siginfo_t*, void*))::{lambda()#2}>(std::__invoke_result&&, (mongo::(anonymous namespace)::StackTraceSigAltStackTest::tryHandler(void (*)( int , siginfo_t*, void*))::{lambda()#2}&&)...) (__fn=...) at /opt/mongodbtoolchain/revisions/e5348beb43e147b74a40f4ca5fb05a330ea646cf/stow/gcc-v3.U0D/lib/gcc/x86_64-mongodb-linux/8.2.0/../../../../include/c++/8.2.0/bits/invoke.h:95 #5 0x00005555556ba87d in std::__apply_impl<mongo::(anonymous namespace)::StackTraceSigAltStackTest::tryHandler(void (*)( int , siginfo_t*, void*))::{lambda()#2}, std::tuple<>>(mongo::(anonymous namespace)::StackTraceSigAltStackTest::tryHandler(void (*)( int , siginfo_t*, void*))::{lambda()#2}&&, std::tuple<>&&, std::integer_sequence<unsigned long >) (__f=..., __t=...) at /opt/mongodbtoolchain/revisions/e5348beb43e147b74a40f4ca5fb05a330ea646cf/stow/gcc-v3.U0D/lib/gcc/x86_64-mongodb-linux/8.2.0/../../../../include/c++/8.2.0/tuple:1678 #6 0x00005555556ba80e in std::apply<mongo::(anonymous namespace)::StackTraceSigAltStackTest::tryHandler(void (*)( int , siginfo_t*, void*))::{lambda()#2}, std::tuple<> >(mongo::(anonymous namespace)::StackTraceSigAltStackTest::tryHandler(void (*)( int , siginfo_t*, void*))::{lambda()#2}&&, std::tuple<>&&) (__f=..., __t=...) at /opt/mongodbtoolchain/revisions/e5348beb43e147b74a40f4ca5fb05a330ea646cf/stow/gcc-v3.U0D/lib/gcc/x86_64-mongodb-linux/8.2.0/../../../../include/c++/8.2.0/tuple:1687 #7 0x00005555556ba751 in mongo::stdx::thread::thread<mongo::(anonymous namespace)::StackTraceSigAltStackTest::tryHandler(void (*)( int , siginfo_t*, void*))::{lambda()#2}, , 0>(mongo::(anonymous namespace)::StackTraceSigAltStackTest::tryHandler(void (*)( int , siginfo_t*, void*))::{lambda()#2})::{lambda()#1}:: operator ()() ( this =0x7b0c00000c08) at src/mongo/stdx/thread.h:186 #8 0x00005555556ba6c1 in std::__invoke_impl<void, mongo::stdx::thread::thread<mongo::(anonymous namespace)::StackTraceSigAltStackTest::tryHandler(void (*)( int , siginfo_t*, void*))::{lambda()#2}, , 0>(mongo::(anonymous namespace)::StackTraceSigAltStackTest::tryHandler(void (*)( int , siginfo_t*, void*))::{lambda()#2})::{lambda()#1}>(std::__invoke_other, mongo::stdx::thread::thread<mongo::(anonymous namespace)::StackTraceSigAltStackTest::tryHandler(void (*)( int , siginfo_t*, void*))::{lambda()#2}, , 0>(mongo::(anonymous namespace)::StackTraceSigAltStackTest::tryHandler(void (*)( int , siginfo_t*, void*))::{lambda()#2})::{lambda()#1}&&) (__f=...) at /opt/mongodbtoolchain/revisions/e5348beb43e147b74a40f4ca5fb05a330ea646cf/stow/gcc-v3.U0D/lib/gcc/x86_64-mongodb-linux/8.2.0/../../../../include/c++/8.2.0/bits/invoke.h:60 #9 0x00005555556ba5e1 in std::__invoke<mongo::stdx::thread::thread<mongo::(anonymous namespace)::StackTraceSigAltStackTest::tryHandler(void (*)( int , siginfo_t*, void*))::{lambda()#2}, , 0>(mongo::(anonymous namespace)::StackTraceSigAltStackTest::tryHandler(void (*)( int , siginfo_t*, void*))::{lambda()#2})::{lambda()#1}> (__fn=...) at /opt/mongodbtoolchain/revisions/e5348beb43e147b74a40f4ca5fb05a330ea646cf/stow/gcc-v3.U0D/lib/gcc/x86_64-mongodb-linux/8.2.0/../../../../include/c++/8.2.0/bits/invoke.h:95 #10 0x00005555556ba599 in std::thread::_Invoker<std::tuple<mongo::stdx::thread::thread<mongo::(anonymous namespace)::StackTraceSigAltStackTest::tryHandler(void (*)( int , siginfo_t*, void*))::{lambda()#2}, , 0>(mongo::(anonymous namespace)::StackTraceSigAltStackTest::tryHandler(void (*)( int , siginfo_t*, void*))::{lambda()#2})::{lambda()#1}> >::_M_invoke<0ul> ( this =0x7b0c00000c08) at /opt/mongodbtoolchain/revisions/e5348beb43e147b74a40f4ca5fb05a330ea646cf/stow/gcc-v3.U0D/lib/gcc/x86_64-mongodb-linux/8.2.0/../../../../include/c++/8.2.0/thread:234 #11 0x00005555556ba549 in std::thread::_Invoker<std::tuple<mongo::stdx::thread::thread<mongo::(anonymous namespace)::StackTraceSigAltStackTest::tryHandler(void (*)( int , siginfo_t*, void*))::{lambda()#2}, , 0>(mongo::(anonymous namespace)::StackTraceSigAltStackTest::tryHandler(void (*)( int , siginfo_t*, void*))::{lambda()#2})::{lambda()#1}> >:: operator ()() ( this =0x7b0c00000c08) at /opt/mongodbtoolchain/revisions/e5348beb43e147b74a40f4ca5fb05a330ea646cf/stow/gcc-v3.U0D/lib/gcc/x86_64-mongodb-linux/8.2.0/../../../../include/c++/8.2.0/thread:243 #12 0x00005555556ba2cd in std::thread::_State_impl<std::thread::_Invoker<std::tuple<mongo::stdx::thread::thread<mongo::(anonymous namespace)::StackTraceSigAltStackTest::tryHandler(void (*)( int , siginfo_t*, void*))::{lambda()#2}, , 0>(mongo::(anonymous namespace)::StackTraceSigAltStackTest::tryHandler(void (*)( int , siginfo_t*, void*))::{lambda()#2})::{lambda()#1}> > >::_M_run() ( this =0x7b0c00000c00) at /opt/mongodbtoolchain/revisions/e5348beb43e147b74a40f4ca5fb05a330ea646cf/stow/gcc-v3.U0D/lib/gcc/x86_64-mongodb-linux/8.2.0/../../../../include/c++/8.2.0/thread:186 #13 0x00005555557247df in std::execute_native_thread_routine (__p=0x7b0c00000c00) at ../../../../../src/combined/libstdc++-v3/src/c++11/thread.cc:80 #14 0x000055555563fa03 in __tsan_thread_start_func () at /data/mci/76345995686809862f0b80d49f4a9e31/toolchain-builder/tmp/build-llvm.sh-IHB/llvm/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:955 #15 0x00007ffff4e706db in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0 #16 0x00007ffff498188f in clone () from /lib/x86_64-linux-gnu/libc.so.6

      We recently discovered in SERVER-49078 that attempting to trigger a signal handler during the stacktrace unit tests. There isn't an obvious reason in the code why this should be happening, but it prevents the stacktrace tests from passing when run with TSAN right now.

            Assignee:
            alex.neben@mongodb.com Alex Neben
            Reporter:
            ryan.egesdahl@mongodb.com Ryan Egesdahl (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: