Thread 3 (Thread 0x7f3a03cff700 (LWP 1469)): #0 0x00007f3a0cf35087 in __sanitizer::internal_sched_yield() () #1 0x00007f3a0cf97b45 in __tsan::Mutex::Lock() () #2 0x00007f3a0cf9aff6 in __tsan::BackgroundThread(void*) () #3 0x00007f3a07f3f0a5 in start_thread (arg=0x7f3a03cff700) at pthread_create.c:309 #4 0x00007f3a0784e57d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111 Thread 2 (Thread 0x7f3a028de700 (LWP 1481)): #0 0x00007f3a0cf34f64 in __sanitizer::internal_read(int, void*, unsigned long) () #1 0x00007f3a0cf3d5f7 in __sanitizer::SymbolizerProcess::SendCommandImpl(bool, char const*, unsigned long) () #2 0x00007f3a0cf3d401 in __sanitizer::SymbolizerProcess::SendCommand(bool, char const*, unsigned long) () #3 0x00007f3a0cf3d0d2 in __sanitizer::POSIXSymbolizer::SendCommand(bool, char const*, unsigned long) () #4 0x00007f3a0cf3c74b in __sanitizer::POSIXSymbolizer::SymbolizePC(unsigned long) () #5 0x00007f3a0cfa4079 in __tsan::SymbolizeStack(__sanitizer::StackTrace) () #6 0x00007f3a0cfa4363 in __tsan::ScopedReport::AddMemoryAccess(unsigned long, _---Type to continue, or q to quit--- _tsan::Shadow, __sanitizer::StackTrace, __tsan::MutexSet const*) () #7 0x00007f3a0cfa5c04 in __tsan::ReportRace(__tsan::ThreadState*) () #8 0x00007f3a0cfa1da2 in __tsan_report_race_thunk () #9 0x00007f3a0cfa1be2 in __tsan::MemoryAccessImpl(__tsan::ThreadState*, unsigned long, int, bool, bool, unsigned long long*, __tsan::Shadow) () #10 0x00007f3a0cfa773e in __tsan::MemoryAccessRange(__tsan::ThreadState*, unsigned long, unsigned long, unsigned long, bool) () #11 0x00007f3a0cf9c350 in __tsan::MemoryRangeFreed(__tsan::ThreadState*, unsigned long, unsigned long, unsigned long) () #12 0x00007f3a0cf95a79 in __tsan::user_free(__tsan::ThreadState*, unsigned long, void*, bool) () #13 0x00007f3a0cf43f6c in operator delete(void*) () #14 0x00007f3a0d177fb0 in __gnu_cxx::new_allocator::TestBody()::{lambda()#1} ()> >, std::allocator::TestBody()::{lambda()#1} ()> >, (__gnu_cxx::_Lock_policy)2> >::deallocate(__gnu_cxx::_Lock_policy*, unsigned long) (this=0x7f3a02874b20, __p=0x7d1400005640) at /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/ext/new_allocator.h:110 #15 0x00007f3a0d177e81 in std::allocator_traits to continue, or q to quit--- ssagesWhenInterrupted_Test::TestBody()::{lambda()#1} ()> >, std::allocator::TestBody()::{lambda()#1} ()> >, (__gnu_cxx::_Lock_policy)2> > >::deallocate(std::_Sp_counted_ptr_inplace::TestBody()::{lambda()#1} ()> >, std::allocator::TestBody()::{lambda()#1} ()> >, (__gnu_cxx::_Lock_policy)2>&, __gnu_cxx::_Lock_policy*, unsigned long) (__a=..., __p=0x7d1400005640, __n=1) at /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/bits/alloc_traits.h:383 #16 0x00007f3a0d1788c3 in std::_Sp_counted_ptr_inplace::TestBody()::{lambda()#1} ()> >, std::allocator::TestBody()::{lambda()#1} ()> >, (__gnu_cxx::_Lock_policy)2>::_M_destroy() (this=0x7d1400005640) at /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/bits/shared_ptr_base.h:535 #17 0x00007f3a08515ea2 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6 #18 0x00007f3a0cf46d3e in __tsan_thread_start_func () #19 0x00007f3a07f3f0a5 in start_thread (arg=0x7f3a028de700) ---Type to continue, or q to quit--- at pthread_create.c:309 #20 0x00007f3a0784e57d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111 Thread 1 (Thread 0x7f3a0ba45ac0 (LWP 1467)): #0 0x00007f3a0cf35577 in __sanitizer::BlockingMutex::Lock() () #1 0x00007f3a0cf3e0c0 in __sanitizer::ThreadRegistry::FindThread(bool (*)(__sanitizer::ThreadContextBase*, void*), void*) () #2 0x00007f3a0cf47123 in pthread_join () #3 0x00007f3a08515cc7 in std::thread::join() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6 #4 0x00007f3a0d05fb4e in mir::test::AutoJoinThread::stop (this=0x7fff37021af8) at /home/alberto/source/mir/no-tsan-ctest-hang/tests/include/mir_test/auto_unblock_thread.h:55 #5 0x00007f3a0d173b2a in StreamTransportTest_SendsFullMessagesWhenInterrupted_Test::TestBody (this=0x7d1000018d80) at /home/alberto/source/mir/no-tsan-ctest-hang/tests/unit-tests/client/test_stream_transport.cpp:1154 #6 0x00007f3a0f093b31 in void testing::internal::HandleSehExceptionsInMethodIfSupported(testing::Test*, void (testing::Test::*)(), char const*) () #7 0x00007f3a0f06dcf2 in void testing::internal::HandleExceptionsInMethodIfSupported(testing::Test*, void (testing::Test::*)(), char const---Type to continue, or q to quit--- *) () #8 0x00007f3a0f03f017 in testing::Test::Run() () #9 0x00007f3a0f040c28 in testing::TestInfo::Run() () #10 0x00007f3a0f041dae in testing::TestCase::Run() () #11 0x00007f3a0f05022d in testing::internal::UnitTestImpl::RunAllTests() () #12 0x00007f3a0f08a871 in bool testing::internal::HandleSehExceptionsInMethodIfSupported(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) () #13 0x00007f3a0f072d88 in bool testing::internal::HandleExceptionsInMethodIfSupported(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) () #14 0x00007f3a0f04fafa in testing::UnitTest::Run() () #15 0x00007f3a0ece48ce in RUN_ALL_TESTS () at /usr/include/gtest/gtest.h:2288 #16 0x00007f3a0ece489c in main (argc=1, argv=0x7fff37022808) at /home/alberto/source/mir/no-tsan-ctest-hang/tests/mir_test_framework/command_line_server_configuration.cpp:55 (gdb)