Permanent SUMMARY: ThreadSanitizer: data race /builds/worker/checkouts/gecko/dom/media/gtest/AudioVerifier.h:69:47 in PreSilenceSamples
Categories
(Core :: WebRTC: Audio/Video, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox127 | --- | fixed |
People
(Reporter: RyanVM, Assigned: pehrsons)
References
Details
Attachments
(3 files)
I've been looking at enabling GTests in TSAN mode and this is currently permafailing.
https://treeherder.mozilla.org/logviewer?job_id=456460390&repo=try&lineNumber=34746
TEST-START | TestAudioCallbackDriver.StartStop
==================
WARNING: ThreadSanitizer: data race (pid=1001)
Read of size 8 at 0x7bb000107940 by thread T140912:
#0 PreSilenceSamples /checkouts/gecko/dom/media/gtest/AudioVerifier.h:69:47 (libxul.so+0x486c72b)
#1 mozilla::MockCubebStream::Stop() /checkouts/gecko/dom/media/gtest/MockCubeb.cpp:237:22 (libxul.so+0x486c72b)
#2 mozilla::cubeb_mock_stream_stop(cubeb_stream*) /checkouts/gecko/dom/media/gtest/MockCubeb.h:522:43 (libxul.so+0x48f8241)
#3 cubeb_stream_stop /checkouts/gecko/media/libcubeb/src/cubeb.c:434:10 (libxul.so+0x37431fb)
#4 mozilla::AudioCallbackDriver::Stop() /checkouts/gecko/dom/media/GraphDriver.cpp:752:7 (libxul.so+0x8b083b7)
#5 operator() /checkouts/gecko/dom/media/GraphDriver.cpp:781:60 (libxul.so+0x8baea3f)
#6 mozilla::detail::RunnableFunction<mozilla::AudioCallbackDriver::Shutdown()::$_0>::Run() /workspace/obj-build/dist/include/nsThreadUtils.h:548:5 (libxul.so+0x8baea3f)
#7 nsThreadSyncDispatch::Run() /checkouts/gecko/xpcom/threads/nsThreadSyncDispatch.h:41:51 (libxul.so+0x574170b)
#8 mozilla::TaskQueue::Runner::Run() /checkouts/gecko/xpcom/threads/TaskQueue.cpp:257:20 (libxul.so+0x570ba53)
#9 nsThreadPool::Run() /checkouts/gecko/xpcom/threads/nsThreadPool.cpp:341:14 (libxul.so+0x5732c9f)
#10 nsThread::ProcessNextEvent(bool, bool*) /checkouts/gecko/xpcom/threads/nsThread.cpp:1193:16 (libxul.so+0x5729e9e)
#11 NS_ProcessNextEvent(nsIThread*, bool) /checkouts/gecko/xpcom/threads/nsThreadUtils.cpp:480:10 (libxul.so+0x5730434)
#12 mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*) /checkouts/gecko/ipc/glue/MessagePump.cpp:300:20 (libxul.so+0x6274fde)
#13 RunInternal /checkouts/gecko/ipc/chromium/src/base/message_loop.cc:370:10 (libxul.so+0x61e8088)
#14 RunHandler /checkouts/gecko/ipc/chromium/src/base/message_loop.cc:363:3 (libxul.so+0x61e8088)
#15 MessageLoop::Run() /checkouts/gecko/ipc/chromium/src/base/message_loop.cc:345:3 (libxul.so+0x61e8088)
#16 nsThread::ThreadFunc(void*) /checkouts/gecko/xpcom/threads/nsThread.cpp:370:10 (libxul.so+0x5725723)
#17 _pt_root /checkouts/gecko/nsprpub/pr/src/pthreads/ptthread.c:201:5 (libnspr4.so+0x4ba79)
Previous write of size 8 at 0x7bb000107940 by thread T140913 (mutexes: write M0):
#0 CountPreSilence /checkouts/gecko/dom/media/gtest/AudioVerifier.h:86:7 (libxul.so+0x4822d5e)
#1 mozilla::AudioVerifier<float>::CheckSample(float) /checkouts/gecko/dom/media/gtest/AudioVerifier.h:76:10 (libxul.so+0x4822d5e)
#2 AppendDataInterleaved /checkouts/gecko/dom/media/gtest/AudioVerifier.h:41:7 (libxul.so+0x486d3b5)
#3 mozilla::MockCubebStream::Process(long) /checkouts/gecko/dom/media/gtest/MockCubeb.cpp:395:18 (libxul.so+0x486d3b5)
#4 Process10Ms /checkouts/gecko/dom/media/gtest/MockCubeb.cpp:432:10 (libxul.so+0x486f3f5)
#5 mozilla::MockCubeb::ThreadFunction() /checkouts/gecko/dom/media/gtest/MockCubeb.cpp:719:39 (libxul.so+0x486f3f5)
#6 mozilla::MockCubeb::ThreadFunction_s(mozilla::MockCubeb*) /checkouts/gecko/dom/media/gtest/MockCubeb.h:438:15 (libxul.so+0x486f105)
#7 __invoke_impl<void, void (*)(mozilla::MockCubeb *), mozilla::MockCubeb *> /fetches/sysroot-x86_64-linux-gnu/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/invoke.h:60:14 (libxul.so+0x4919df1)
#8 __invoke<void (*)(mozilla::MockCubeb *), mozilla::MockCubeb *> /fetches/sysroot-x86_64-linux-gnu/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/invoke.h:95:14 (libxul.so+0x4919df1)
#9 _M_invoke<0UL, 1UL> /fetches/sysroot-x86_64-linux-gnu/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/thread:244:13 (libxul.so+0x4919df1)
#10 operator() /fetches/sysroot-x86_64-linux-gnu/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/thread:253:11 (libxul.so+0x4919df1)
#11 std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (*)(mozilla::MockCubeb*), mozilla::MockCubeb*>>>::_M_run() /fetches/sysroot-x86_64-linux-gnu/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/thread:196:13 (libxul.so+0x4919df1)
#12 std::StateWrapper::_M_run() /checkouts/gecko/build/unix/stdc++compat/stdc++compat.cpp:111:36 (libxul.so+0xc2b02db)
#13 <null> <null> (libstdc++.so.6+0xbda4f)
Location is heap block of size 31424 at 0x7bb000100000 allocated by thread T140912:
#0 malloc /fetches/llvm-project/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:663:5 (firefox-bin+0xc3ddc)
#1 moz_xmalloc /checkouts/gecko/memory/mozalloc/mozalloc.cpp:52:15 (firefox-bin+0x150a08)
#2 operator new /workspace/obj-build/dist/include/mozilla/cxxalloc.h:33:10 (libxul.so+0x486ee69)
#3 MakeRefPtr<mozilla::SmartMockCubebStream, cubeb *&, const char *&, const void *&, cubeb_stream_params *&, const void *&, cubeb_stream_params *&, long (*&)(cubeb_stream *, void *, const void *, void *, long), void (*&)(cubeb_stream *, void *, cubeb_state), void *&, const mozilla::MockCubebStream::RunningMode &, mozilla::Atomic<bool, (mozilla::MemoryOrdering)2, void> &> /workspace/obj-build/dist/include/mozilla/RefPtr.h:631:15 (libxul.so+0x486ee69)
#4 mozilla::MockCubeb::StreamInit(cubeb*, cubeb_stream**, char const*, void const*, cubeb_stream_params*, void const*, cubeb_stream_params*, long (*)(cubeb_stream*, void*, void const*, void*, long), void (*)(cubeb_stream*, void*, cubeb_state), void*) /checkouts/gecko/dom/media/gtest/MockCubeb.cpp:648:21 (libxul.so+0x486ee69)
#5 mozilla::cubeb_mock_stream_init(cubeb*, cubeb_stream**, char const*, void const*, cubeb_stream_params*, void const*, cubeb_stream_params*, unsigned int, long (*)(cubeb_stream*, void*, void const*, void*, long), void (*)(cubeb_stream*, void*, cubeb_state), void*) /checkouts/gecko/dom/media/gtest/MockCubeb.h:511:38 (libxul.so+0x48f80d7)
#6 cubeb_stream_init /checkouts/gecko/media/libcubeb/src/cubeb.c:392:7 (libxul.so+0x374303c)
#7 mozilla::CubebUtils::CubebStreamInit(cubeb*, cubeb_stream**, char const*, void const*, cubeb_stream_params*, void const*, cubeb_stream_params*, unsigned int, long (*)(cubeb_stream*, void*, void const*, void*, long), void (*)(cubeb_stream*, void*, cubeb_state), void*) /checkouts/gecko/dom/media/CubebUtils.cpp:410:10 (libxul.so+0x8a7ddd4)
#8 mozilla::AudioCallbackDriver::Init(nsTString<char> const&) /checkouts/gecko/dom/media/GraphDriver.cpp:638:7 (libxul.so+0x8b073ff)
#9 operator() /checkouts/gecko/dom/media/GraphDriver.cpp:724:3 (libxul.so+0x8bae906)
#10 mozilla::detail::RunnableFunction<mozilla::AudioCallbackDriver::Start()::$_1>::Run() /workspace/obj-build/dist/include/nsThreadUtils.h:548:5 (libxul.so+0x8bae906)
#11 mozilla::TaskQueue::Runner::Run() /checkouts/gecko/xpcom/threads/TaskQueue.cpp:257:20 (libxul.so+0x570ba53)
#12 nsThreadPool::Run() /checkouts/gecko/xpcom/threads/nsThreadPool.cpp:341:14 (libxul.so+0x5732c9f)
#13 nsThread::ProcessNextEvent(bool, bool*) /checkouts/gecko/xpcom/threads/nsThread.cpp:1193:16 (libxul.so+0x5729e9e)
#14 NS_ProcessNextEvent(nsIThread*, bool) /checkouts/gecko/xpcom/threads/nsThreadUtils.cpp:480:10 (libxul.so+0x5730434)
#15 mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*) /checkouts/gecko/ipc/glue/MessagePump.cpp:300:20 (libxul.so+0x6274fde)
#16 RunInternal /checkouts/gecko/ipc/chromium/src/base/message_loop.cc:370:10 (libxul.so+0x61e8088)
#17 RunHandler /checkouts/gecko/ipc/chromium/src/base/message_loop.cc:363:3 (libxul.so+0x61e8088)
#18 MessageLoop::Run() /checkouts/gecko/ipc/chromium/src/base/message_loop.cc:345:3 (libxul.so+0x61e8088)
#19 nsThread::ThreadFunc(void*) /checkouts/gecko/xpcom/threads/nsThread.cpp:370:10 (libxul.so+0x5725723)
#20 _pt_root /checkouts/gecko/nsprpub/pr/src/pthreads/ptthread.c:201:5 (libnspr4.so+0x4ba79)
Mutex M0 (0x7b4400243530) created at:
#0 pthread_mutex_init /fetches/llvm-project/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:1313:3 (firefox-bin+0xc73a0)
#1 mozilla::detail::MutexImpl::MutexImpl() /checkouts/gecko/mozglue/misc/Mutex_posix.cpp:76:3 (firefox-bin+0x1bb5b4)
#2 OffTheBooksMutex /workspace/obj-build/dist/include/mozilla/Mutex.h:47:12 (libxul.so+0x48728fb)
#3 Mutex /workspace/obj-build/dist/include/mozilla/Mutex.h:126:39 (libxul.so+0x48728fb)
#4 DataMutexBase /workspace/obj-build/dist/include/mozilla/DataMutex.h:91:47 (libxul.so+0x48728fb)
#5 MockCubeb /checkouts/gecko/dom/media/gtest/MockCubeb.h:473:65 (libxul.so+0x48728fb)
#6 MockCubeb /checkouts/gecko/dom/media/gtest/MockCubeb.cpp:445:26 (libxul.so+0x48728fb)
#7 TestAudioCallbackDriver_StartStop_Test::TestBody() /checkouts/gecko/dom/media/gtest/TestAudioCallbackDriver.cpp:113:26 (libxul.so+0x48728fb)
#8 void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc (libxul.so+0x4286d7d)
#9 testing::Test::Run() /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:2688:5 (libxul.so+0x4286be9)
#10 testing::TestInfo::Run() /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:2837:11 (libxul.so+0x42885f8)
#11 testing::TestSuite::Run() /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:3016:30 (libxul.so+0x4289bf4)
#12 testing::internal::UnitTestImpl::RunAllTests() /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:5922:44 (libxul.so+0x42a7689)
#13 testing::Test::Run() /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:2688:5 (libxul.so+0x4286be9)
#14 testing::TestInfo::Run() /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:2837:11 (libxul.so+0x42885f8)
#15 testing::TestSuite::Run() /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:3016:30 (libxul.so+0x4289bf4)
#16 testing::internal::UnitTestImpl::RunAllTests() /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:5922:44 (libxul.so+0x42a7689)
#17 testing::Test::Run() /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:2688:5 (libxul.so+0x4286be9)
#18 testing::TestInfo::Run() /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:2837:11 (libxul.so+0x42885f8)
#19 testing::TestSuite::Run() /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:3016:30 (libxul.so+0x4289bf4)
#20 testing::internal::UnitTestImpl::RunAllTests() /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:5922:44 (libxul.so+0x42a7689)
#21 bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc (libxul.so+0x42a6e2d)
#22 testing::UnitTest::Run() /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:5486:10 (libxul.so+0x42a6bd0)
#23 RUN_ALL_TESTS /workspace/obj-build/dist/include/gtest/gtest.h:2319:73 (libxul.so+0x425c55f)
#24 mozilla::RunGTestFunc(int*, char**) /checkouts/gecko/testing/gtest/mozilla/GTestRunner.cpp:167:10 (libxul.so+0x425c55f)
#25 XREMain::XRE_mainStartup(bool*) /checkouts/gecko/toolkit/xre/nsAppRunner.cpp:4686:16 (libxul.so+0xc1c2e89)
#26 XREMain::XRE_main(int, char**, mozilla::BootstrapConfig const&) /checkouts/gecko/toolkit/xre/nsAppRunner.cpp:5946:12 (libxul.so+0xc1cabb2)
#27 XRE_main(int, char**, mozilla::BootstrapConfig const&) /checkouts/gecko/toolkit/xre/nsAppRunner.cpp:6015:21 (libxul.so+0xc1cb2f1)
#28 mozilla::BootstrapImpl::XRE_main(int, char**, mozilla::BootstrapConfig const&) /checkouts/gecko/toolkit/xre/Bootstrap.cpp:45:12 (libxul.so+0xc1da1e2)
#29 do_main /checkouts/gecko/browser/app/nsBrowserApp.cpp:227:22 (firefox-bin+0x14ea00)
#30 main /checkouts/gecko/browser/app/nsBrowserApp.cpp:445:16 (firefox-bin+0x14ea00)
Thread T140912 'CubebOp~tion #1' (tid=13377, running) created by main thread at:
#0 pthread_create /fetches/llvm-project/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:1020:3 (firefox-bin+0xc59bb)
#1 _PR_CreateThread /checkouts/gecko/nsprpub/pr/src/pthreads/ptthread.c:458:14 (libnspr4.so+0x42cee)
#2 PR_CreateThread /checkouts/gecko/nsprpub/pr/src/pthreads/ptthread.c:533:12 (libnspr4.so+0x37f84)
#3 nsThread::Init(nsTSubstring<char> const&) /checkouts/gecko/xpcom/threads/nsThread.cpp:620:20 (libxul.so+0x5726ec7)
#4 nsThreadManager::NewNamedThread(nsTSubstring<char> const&, nsIThreadManager::ThreadCreationOptions, nsIThread**) /checkouts/gecko/xpcom/threads/nsThreadManager.cpp:602:22 (libxul.so+0x572ef6d)
#5 NS_NewNamedThread(nsTSubstring<char> const&, nsIThread**, already_AddRefed<nsIRunnable>, nsIThreadManager::ThreadCreationOptions) /checkouts/gecko/xpcom/threads/nsThreadUtils.cpp:176:57 (libxul.so+0x5737c23)
#6 NS_NewNamedThread /checkouts/gecko/xpcom/threads/nsThreadUtils.cpp:168:10 (libxul.so+0x5731f3b)
#7 nsThreadPool::PutEvent(already_AddRefed<nsIRunnable>, unsigned int) /checkouts/gecko/xpcom/threads/nsThreadPool.cpp:126:17 (libxul.so+0x5731f3b)
#8 Dispatch /checkouts/gecko/xpcom/threads/nsThreadPool.cpp:379:3 (libxul.so+0x5733983)
#9 non-virtual thunk to nsThreadPool::Dispatch(already_AddRefed<nsIRunnable>, unsigned int) /checkouts/gecko/xpcom/threads/nsThreadPool.cpp (libxul.so+0x5733983)
#10 mozilla::SharedThreadPool::Dispatch(already_AddRefed<nsIRunnable>, unsigned int) /workspace/obj-build/dist/include/mozilla/SharedThreadPool.h:75:28 (libxul.so+0x570f20e)
#11 mozilla::TaskQueue::DispatchLocked(nsCOMPtr<nsIRunnable>&, unsigned int, mozilla::AbstractThread::DispatchReason) /checkouts/gecko/xpcom/threads/TaskQueue.cpp:121:26 (libxul.so+0x570a666)
#12 Dispatch /workspace/obj-build/dist/include/mozilla/TaskQueue.h:88:14 (libxul.so+0x8b080fb)
#13 mozilla::AudioCallbackDriver::Start() /checkouts/gecko/dom/media/GraphDriver.cpp:724:3 (libxul.so+0x8b080fb)
#14 TestAudioCallbackDriver_StartStop_Test::TestBody() /checkouts/gecko/dom/media/gtest/TestAudioCallbackDriver.cpp:126:11 (libxul.so+0x4872fcf)
#15 void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc (libxul.so+0x4286d7d)
#16 testing::Test::Run() /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:2688:5 (libxul.so+0x4286be9)
#17 testing::TestInfo::Run() /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:2837:11 (libxul.so+0x42885f8)
#18 testing::TestSuite::Run() /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:3016:30 (libxul.so+0x4289bf4)
#19 testing::internal::UnitTestImpl::RunAllTests() /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:5922:44 (libxul.so+0x42a7689)
#20 testing::Test::Run() /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:2688:5 (libxul.so+0x4286be9)
#21 testing::TestInfo::Run() /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:2837:11 (libxul.so+0x42885f8)
#22 testing::TestSuite::Run() /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:3016:30 (libxul.so+0x4289bf4)
#23 testing::internal::UnitTestImpl::RunAllTests() /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:5922:44 (libxul.so+0x42a7689)
#24 testing::Test::Run() /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:2688:5 (libxul.so+0x4286be9)
#25 testing::TestInfo::Run() /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:2837:11 (libxul.so+0x42885f8)
#26 testing::TestSuite::Run() /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:3016:30 (libxul.so+0x4289bf4)
#27 testing::internal::UnitTestImpl::RunAllTests() /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:5922:44 (libxul.so+0x42a7689)
#28 bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc (libxul.so+0x42a6e2d)
#29 testing::UnitTest::Run() /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:5486:10 (libxul.so+0x42a6bd0)
#30 RUN_ALL_TESTS /workspace/obj-build/dist/include/gtest/gtest.h:2319:73 (libxul.so+0x425c55f)
#31 mozilla::RunGTestFunc(int*, char**) /checkouts/gecko/testing/gtest/mozilla/GTestRunner.cpp:167:10 (libxul.so+0x425c55f)
#32 XREMain::XRE_mainStartup(bool*) /checkouts/gecko/toolkit/xre/nsAppRunner.cpp:4686:16 (libxul.so+0xc1c2e89)
#33 XREMain::XRE_main(int, char**, mozilla::BootstrapConfig const&) /checkouts/gecko/toolkit/xre/nsAppRunner.cpp:5946:12 (libxul.so+0xc1cabb2)
#34 XRE_main(int, char**, mozilla::BootstrapConfig const&) /checkouts/gecko/toolkit/xre/nsAppRunner.cpp:6015:21 (libxul.so+0xc1cb2f1)
#35 mozilla::BootstrapImpl::XRE_main(int, char**, mozilla::BootstrapConfig const&) /checkouts/gecko/toolkit/xre/Bootstrap.cpp:45:12 (libxul.so+0xc1da1e2)
#36 do_main /checkouts/gecko/browser/app/nsBrowserApp.cpp:227:22 (firefox-bin+0x14ea00)
#37 main /checkouts/gecko/browser/app/nsBrowserApp.cpp:445:16 (firefox-bin+0x14ea00)
Thread T140913 (tid=13378, running) created by thread T140912 at:
#0 pthread_create /fetches/llvm-project/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:1020:3 (firefox-bin+0xc59bb)
#1 std::thread::_M_start_thread(std::shared_ptr<std::thread::_Impl_base>, void (*)()) <null> (libstdc++.so.6+0xbdb63)
#2 thread<void (&)(mozilla::MockCubeb *), mozilla::MockCubeb *, void> /fetches/sysroot-x86_64-linux-gnu/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/thread:131:9 (libxul.so+0x486c609)
#3 mozilla::MockCubeb::StartStream(mozilla::MockCubebStream*) /checkouts/gecko/dom/media/gtest/MockCubeb.cpp:695:39 (libxul.so+0x486c609)
#4 mozilla::MockCubebStream::Start() /checkouts/gecko/dom/media/gtest/MockCubeb.cpp:231:31 (libxul.so+0x486c2d6)
#5 mozilla::cubeb_mock_stream_start(cubeb_stream*) /checkouts/gecko/dom/media/gtest/MockCubeb.h:518:43 (libxul.so+0x48f81d1)
#6 cubeb_stream_start /checkouts/gecko/media/libcubeb/src/cubeb.c:424:10 (libxul.so+0x374319b)
#7 StartStream /checkouts/gecko/dom/media/GraphDriver.cpp:738:7 (libxul.so+0x8b07722)
#8 mozilla::AudioCallbackDriver::Init(nsTString<char> const&) /checkouts/gecko/dom/media/GraphDriver.cpp:678:7 (libxul.so+0x8b07722)
#9 operator() /checkouts/gecko/dom/media/GraphDriver.cpp:724:3 (libxul.so+0x8bae906)
#10 mozilla::detail::RunnableFunction<mozilla::AudioCallbackDriver::Start()::$_1>::Run() /workspace/obj-build/dist/include/nsThreadUtils.h:548:5 (libxul.so+0x8bae906)
#11 mozilla::TaskQueue::Runner::Run() /checkouts/gecko/xpcom/threads/TaskQueue.cpp:257:20 (libxul.so+0x570ba53)
#12 nsThreadPool::Run() /checkouts/gecko/xpcom/threads/nsThreadPool.cpp:341:14 (libxul.so+0x5732c9f)
#13 nsThread::ProcessNextEvent(bool, bool*) /checkouts/gecko/xpcom/threads/nsThread.cpp:1193:16 (libxul.so+0x5729e9e)
#14 NS_ProcessNextEvent(nsIThread*, bool) /checkouts/gecko/xpcom/threads/nsThreadUtils.cpp:480:10 (libxul.so+0x5730434)
#15 mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*) /checkouts/gecko/ipc/glue/MessagePump.cpp:300:20 (libxul.so+0x6274fde)
#16 RunInternal /checkouts/gecko/ipc/chromium/src/base/message_loop.cc:370:10 (libxul.so+0x61e8088)
#17 RunHandler /checkouts/gecko/ipc/chromium/src/base/message_loop.cc:363:3 (libxul.so+0x61e8088)
#18 MessageLoop::Run() /checkouts/gecko/ipc/chromium/src/base/message_loop.cc:345:3 (libxul.so+0x61e8088)
#19 nsThread::ThreadFunc(void*) /checkouts/gecko/xpcom/threads/nsThread.cpp:370:10 (libxul.so+0x5725723)
#20 _pt_root /checkouts/gecko/nsprpub/pr/src/pthreads/ptthread.c:201:5 (libnspr4.so+0x4ba79)
SUMMARY: ThreadSanitizer: data race /checkouts/gecko/dom/media/gtest/AudioVerifier.h:69:47 in PreSilenceSamples
Assignee | ||
Comment 1•1 month ago
|
||
I imagine this will be fixed by https://phabricator.services.mozilla.com/D209001.
Reporter | ||
Comment 2•1 month ago
|
||
I guess it's nice to see that we have tests which would have caught them if they were running in CI at the moment!
Reporter | ||
Comment 3•1 month ago
|
||
Another one to check back on after that lands:
https://treeherder.mozilla.org/logviewer?job_id=456471330&repo=try&lineNumber=34909
ThreadSanitizer: data race /builds/worker/checkouts/gecko/dom/media/gtest/AudioVerifier.h:74:5 in mozilla::AudioVerifier<float>::CheckSample(float)
Reporter | ||
Comment 4•28 days ago
|
||
FYI, you'll need to revert the below change to re-enable the test when there's a fix ready.
https://hg.mozilla.org/mozilla-central/diff/8ceeacec0dfd1398a7cc01d1b5a08ae5be835435/dom/media/gtest/moz.build
Reporter | ||
Comment 5•24 days ago
|
||
Try push on top of bug 1404972 is still showing some issues, albeit intermittently now.
https://treeherder.mozilla.org/logviewer?job_id=457210120&repo=try&lineNumber=34542
TEST-START | TestAudioCallbackDriver.DeviceChangeAfterStop
GMOCK WARNING:
Uninteresting mock function call - returning directly.
Function call: NotifyInputStopped()
NOTE: You can safely ignore the above warning unless this call should not happen. Do not suppress it by blindly adding an EXPECT_CALL() if you don't mean to enforce the call. See https://github.com/google/googletest/blob/main/docs/gmock_cook_book.md#knowing-when-to-expect-useoncall for details.
==================
WARNING: ThreadSanitizer: lock-order-inversion (potential deadlock) (pid=994)
Cycle in lock order graph: M0 (0x7ffec3ab81d0) => M1 (0x7bb000140020) => M0
Mutex M1 acquired here while holding mutex M0 in main thread:
#0 pthread_mutex_lock /fetches/llvm-project/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:1339:3 (firefox-bin+0xc75ab)
#1 mutexLock /checkouts/gecko/mozglue/misc/Mutex_posix.cpp:94:3 (firefox-bin+0x1bb928)
#2 mozilla::detail::MutexImpl::lock() /checkouts/gecko/mozglue/misc/Mutex_posix.cpp:116:43 (firefox-bin+0x1bb928)
#3 Lock /workspace/obj-build/dist/include/mozilla/Mutex.h:66:48 (libxul.so+0x4864600)
#4 BaseAutoLock /workspace/obj-build/dist/include/mozilla/Mutex.h:237:11 (libxul.so+0x4864600)
#5 ManualDataCallback /checkouts/gecko/dom/media/gtest/MockCubeb.cpp:459:17 (libxul.so+0x4864600)
#6 mozilla::TestAudioCallbackDriver_DeviceChangeAfterStop_Test::TestBody() /checkouts/gecko/dom/media/gtest/TestAudioCallbackDriver.cpp:462:3 (libxul.so+0x4864600)
#7 void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc (libxul.so+0x426ce6d)
#8 testing::Test::Run() /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:2688:5 (libxul.so+0x426ccd9)
#9 testing::TestInfo::Run() /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:2837:11 (libxul.so+0x426e6e8)
#10 testing::TestSuite::Run() /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:3016:30 (libxul.so+0x426fce4)
#11 testing::internal::UnitTestImpl::RunAllTests() /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:5922:44 (libxul.so+0x428d779)
#12 testing::Test::Run() /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:2688:5 (libxul.so+0x426ccd9)
#13 testing::TestInfo::Run() /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:2837:11 (libxul.so+0x426e6e8)
#14 testing::TestSuite::Run() /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:3016:30 (libxul.so+0x426fce4)
#15 testing::internal::UnitTestImpl::RunAllTests() /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:5922:44 (libxul.so+0x428d779)
#16 testing::Test::Run() /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:2688:5 (libxul.so+0x426ccd9)
#17 testing::TestInfo::Run() /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:2837:11 (libxul.so+0x426e6e8)
#18 testing::TestSuite::Run() /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:3016:30 (libxul.so+0x426fce4)
#19 testing::internal::UnitTestImpl::RunAllTests() /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:5922:44 (libxul.so+0x428d779)
#20 bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc (libxul.so+0x428cf1d)
#21 testing::UnitTest::Run() /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:5486:10 (libxul.so+0x428ccc0)
#22 RUN_ALL_TESTS /workspace/obj-build/dist/include/gtest/gtest.h:2319:73 (libxul.so+0x424261f)
#23 mozilla::RunGTestFunc(int*, char**) /checkouts/gecko/testing/gtest/mozilla/GTestRunner.cpp:167:10 (libxul.so+0x424261f)
#24 XREMain::XRE_mainStartup(bool*) /checkouts/gecko/toolkit/xre/nsAppRunner.cpp:4681:16 (libxul.so+0xc0bd8a9)
#25 XREMain::XRE_main(int, char**, mozilla::BootstrapConfig const&) /checkouts/gecko/toolkit/xre/nsAppRunner.cpp:5941:12 (libxul.so+0xc0c55d2)
#26 XRE_main(int, char**, mozilla::BootstrapConfig const&) /checkouts/gecko/toolkit/xre/nsAppRunner.cpp:6010:21 (libxul.so+0xc0c5d11)
#27 mozilla::BootstrapImpl::XRE_main(int, char**, mozilla::BootstrapConfig const&) /checkouts/gecko/toolkit/xre/Bootstrap.cpp:45:12 (libxul.so+0xc0d4d62)
#28 do_main /checkouts/gecko/browser/app/nsBrowserApp.cpp:227:22 (firefox-bin+0x14e8f0)
#29 main /checkouts/gecko/browser/app/nsBrowserApp.cpp:445:16 (firefox-bin+0x14e8f0)
Hint: use TSAN_OPTIONS=second_deadlock_stack=1 to get more informative warning message
Mutex M0 acquired here while holding mutex M1 in thread T140731:
#0 pthread_mutex_lock /fetches/llvm-project/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:1339:3 (firefox-bin+0xc75ab)
#1 mutexLock /checkouts/gecko/mozglue/misc/Mutex_posix.cpp:94:3 (firefox-bin+0x1bb928)
#2 mozilla::detail::MutexImpl::lock() /checkouts/gecko/mozglue/misc/Mutex_posix.cpp:116:43 (firefox-bin+0x1bb928)
#3 Lock /workspace/obj-build/dist/include/mozilla/Mutex.h:66:48 (libxul.so+0x4925f7c)
#4 Lock /workspace/obj-build/dist/include/mozilla/Monitor.h:31:49 (libxul.so+0x4925f7c)
#5 BaseMonitorAutoLock /workspace/obj-build/dist/include/mozilla/Monitor.h:129:15 (libxul.so+0x4925f7c)
#6 operator() /checkouts/gecko/dom/media/gtest/TestAudioCallbackDriver.cpp:478:37 (libxul.so+0x4925f7c)
#7 mozilla::detail::RunnableFunction<mozilla::TestAudioCallbackDriver_DeviceChangeAfterStop_Test::TestBody()::$_1>::Run() /workspace/obj-build/dist/include/nsThreadUtils.h:548:5 (libxul.so+0x4925f7c)
#8 Switched /checkouts/gecko/dom/media/GraphDriver.h:121:28 (libxul.so+0x89c5af0)
#9 Switched /checkouts/gecko/dom/media/GraphDriver.h:170:34 (libxul.so+0x89c5af0)
#10 mozilla::AudioCallbackDriver::DataCallback(float const*, float*, long) /checkouts/gecko/dom/media/GraphDriver.cpp:1033:12 (libxul.so+0x89c5af0)
#11 mozilla::AudioCallbackDriver::DataCallback_s(cubeb_stream*, void*, void const*, void*, long) /checkouts/gecko/dom/media/GraphDriver.cpp:834:18 (libxul.so+0x89c3bfe)
#12 mozilla::MockCubebStream::Process(long) /checkouts/gecko/dom/media/gtest/MockCubeb.cpp:473:7 (libxul.so+0x4853a51)
#13 ManualDataCallback /checkouts/gecko/dom/media/gtest/MockCubeb.cpp:460:10 (libxul.so+0x49260ac)
#14 operator() /checkouts/gecko/dom/media/gtest/TestAudioCallbackDriver.cpp:524:9 (libxul.so+0x49260ac)
#15 mozilla::detail::RunnableFunction<mozilla::TestAudioCallbackDriver_DeviceChangeAfterStop_Test::TestBody()::$_2>::Run() /workspace/obj-build/dist/include/nsThreadUtils.h:548:5 (libxul.so+0x49260ac)
#16 nsThreadPool::Run() /checkouts/gecko/xpcom/threads/nsThreadPool.cpp:341:14 (libxul.so+0x55e930f)
#17 nsThread::ProcessNextEvent(bool, bool*) /checkouts/gecko/xpcom/threads/nsThread.cpp:1193:16 (libxul.so+0x55e050e)
#18 NS_ProcessNextEvent(nsIThread*, bool) /checkouts/gecko/xpcom/threads/nsThreadUtils.cpp:480:10 (libxul.so+0x55e6aa4)
#19 mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*) /checkouts/gecko/ipc/glue/MessagePump.cpp:300:20 (libxul.so+0x612ff5e)
#20 RunInternal /checkouts/gecko/ipc/chromium/src/base/message_loop.cc:370:10 (libxul.so+0x60a3008)
#21 RunHandler /checkouts/gecko/ipc/chromium/src/base/message_loop.cc:363:3 (libxul.so+0x60a3008)
#22 MessageLoop::Run() /checkouts/gecko/ipc/chromium/src/base/message_loop.cc:345:3 (libxul.so+0x60a3008)
#23 nsThread::ThreadFunc(void*) /checkouts/gecko/xpcom/threads/nsThread.cpp:370:10 (libxul.so+0x55dbd93)
#24 _pt_root /checkouts/gecko/nsprpub/pr/src/pthreads/ptthread.c:201:5 (libnspr4.so+0x4ba79)
Thread T140731 'Backgro~Pool #2' (tid=13014, running) created by main thread at:
#0 pthread_create /fetches/llvm-project/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:1020:3 (firefox-bin+0xc58ab)
#1 _PR_CreateThread /checkouts/gecko/nsprpub/pr/src/pthreads/ptthread.c:458:14 (libnspr4.so+0x42cee)
#2 PR_CreateThread /checkouts/gecko/nsprpub/pr/src/pthreads/ptthread.c:533:12 (libnspr4.so+0x37f84)
#3 nsThread::Init(nsTSubstring<char> const&) /checkouts/gecko/xpcom/threads/nsThread.cpp:620:20 (libxul.so+0x55dd537)
#4 nsThreadManager::NewNamedThread(nsTSubstring<char> const&, nsIThreadManager::ThreadCreationOptions, nsIThread**) /checkouts/gecko/xpcom/threads/nsThreadManager.cpp:602:22 (libxul.so+0x55e55dd)
#5 NS_NewNamedThread(nsTSubstring<char> const&, nsIThread**, already_AddRefed<nsIRunnable>, nsIThreadManager::ThreadCreationOptions) /checkouts/gecko/xpcom/threads/nsThreadUtils.cpp:176:57 (libxul.so+0x55ee293)
#6 NS_NewNamedThread /checkouts/gecko/xpcom/threads/nsThreadUtils.cpp:168:10 (libxul.so+0x55e85ab)
#7 nsThreadPool::PutEvent(already_AddRefed<nsIRunnable>, unsigned int) /checkouts/gecko/xpcom/threads/nsThreadPool.cpp:126:17 (libxul.so+0x55e85ab)
#8 Dispatch /checkouts/gecko/xpcom/threads/nsThreadPool.cpp:379:3 (libxul.so+0x55e9ff3)
#9 non-virtual thunk to nsThreadPool::Dispatch(already_AddRefed<nsIRunnable>, unsigned int) /checkouts/gecko/xpcom/threads/nsThreadPool.cpp (libxul.so+0x55e9ff3)
#10 BackgroundEventTarget::Dispatch(already_AddRefed<nsIRunnable>, unsigned int) /checkouts/gecko/xpcom/threads/nsThreadManager.cpp:167:16 (libxul.so+0x55e2d9d)
#11 mozilla::TaskQueue::DispatchLocked(nsCOMPtr<nsIRunnable>&, unsigned int, mozilla::AbstractThread::DispatchReason) /checkouts/gecko/xpcom/threads/TaskQueue.cpp:121:26 (libxul.so+0x55c0a66)
#12 mozilla::TaskQueue::Dispatch(already_AddRefed<nsIRunnable>, unsigned int) /workspace/obj-build/dist/include/mozilla/TaskQueue.h:73:14 (libxul.so+0x55ba347)
#13 mozilla::AbstractThread::DispatchFromScript(nsIRunnable*, unsigned int) /checkouts/gecko/xpcom/threads/AbstractThread.cpp:247:10 (libxul.so+0x55b6152)
#14 xpcom::interfaces::idl::nsIEventTarget::DispatchFromScript::h416f2b1358249819 /workspace/obj-build/dist/xpcrs/rt/nsIEventTarget.rs:304:9 (libxul.so+0xe7017e5)
#15 moz_task::dispatch_runnable::h754edef247434e40 /checkouts/gecko/xpcom/rust/moz_task/src/lib.rs:108:10 (libxul.so+0xe7017e5)
#16 moz_task::dispatcher::RunnableBuilder$LT$F$GT$::dispatch::h278aa38fe447919e /checkouts/gecko/xpcom/rust/moz_task/src/dispatcher.rs:96:18 (libxul.so+0xe7017e5)
#17 moz_task::executor::schedule::h0a10b0353673c1fa /checkouts/gecko/xpcom/rust/moz_task/src/executor.rs:126:45 (libxul.so+0xe7017e5)
#18 moz_task::executor::TaskBuilder$LT$F$GT$::spawn_onto::_$u7b$$u7b$closure$u7d$$u7d$::ha271e23bc41ef75d /checkouts/gecko/xpcom/rust/moz_task/src/executor.rs:205:13 (libxul.so+0xe700385)
#19 async_task::raw::RawTask$LT$F$C$T$C$S$GT$::schedule::h5317e702f69012a5 /checkouts/gecko/third_party/rust/async-task/src/raw.rs:414:9 (libxul.so+0xe700385)
#20 async_task::runnable::Runnable::schedule::h59f1b55ae5877df9 /checkouts/gecko/third_party/rust/async-task/src/runnable.rs:272:13 (libxul.so+0xe7037c9)
#21 moz_task::executor::TaskBuilder$LT$F$GT$::spawn_onto::h483db19d0a870820 /checkouts/gecko/xpcom/rust/moz_task/src/executor.rs:207:9 (libxul.so+0xe702121)
#22 moz_task::TaskRunnable::dispatch_with_options::h1e021f2e2ca89f19 /checkouts/gecko/xpcom/rust/moz_task/src/lib.rs:253:22 (libxul.so+0xe702121)
#23 moz_task::TaskRunnable::dispatch::hbbb906babaa08787 /checkouts/gecko/xpcom/rust/moz_task/src/lib.rs:243:9 (libxul.so+0xe701f41)
#24 cert_storage::do_construct_cert_storage::h43a0b46be61151fd /checkouts/gecko/security/manager/ssl/cert_storage/src/lib.rs:1301:5 (libxul.so+0xe425ef1)
#25 cert_storage_constructor /checkouts/gecko/security/manager/ssl/cert_storage/src/lib.rs:1390:11 (libxul.so+0xe425ef1)
#26 mozilla::xpcom::CreateInstanceImpl(mozilla::xpcom::ModuleID, nsID const&, void**) /workspace/obj-build/xpcom/components/StaticComponents.cpp:10356:27 (libxul.so+0x5598fed)
#27 mozilla::xpcom::StaticModule::CreateInstance(nsID const&, void**) const /workspace/obj-build/xpcom/components/StaticComponents.cpp:13003:10 (libxul.so+0x55a326a)
#28 CreateInstance /checkouts/gecko/xpcom/components/nsComponentManager.cpp:189:46 (libxul.so+0x55adc87)
#29 nsComponentManagerImpl::GetServiceLocked(mozilla::Maybe<mozilla::detail::BaseMonitorAutoLock<mozilla::Monitor>>&, (anonymous namespace)::EntryWrapper&, nsID const&, void**) /checkouts/gecko/xpcom/components/nsComponentManager.cpp:987:17 (libxul.so+0x55adc87)
#30 nsComponentManagerImpl::GetService(nsID const&, nsID const&, void**) /checkouts/gecko/xpcom/components/nsComponentManager.cpp:1041:10 (libxul.so+0x55ad6f7)
#31 CallGetService /checkouts/gecko/xpcom/components/nsComponentManagerUtils.cpp:53:43 (libxul.so+0x55b11db)
#32 nsGetServiceByCID::operator()(nsID const&, void**) const /checkouts/gecko/xpcom/components/nsComponentManagerUtils.cpp:217:21 (libxul.so+0x55b11db)
#33 assign_from_gs_cid /workspace/obj-build/dist/include/nsCOMPtr.h:851:7 (libxul.so+0xbcdd4ac)
#34 nsCOMPtr /workspace/obj-build/dist/include/nsCOMPtr.h:498:5 (libxul.so+0xbcdd4ac)
#35 nsNSSComponent::InitializeNSS() /checkouts/gecko/security/manager/ssl/nsNSSComponent.cpp:1663:28 (libxul.so+0xbcdd4ac)
#36 nsNSSComponent::Init() /checkouts/gecko/security/manager/ssl/nsNSSComponent.cpp:1908:17 (libxul.so+0xbce03cd)
#37 mozilla::xpcom::CreateInstanceImpl(mozilla::xpcom::ModuleID, nsID const&, void**) /workspace/obj-build/xpcom/components/StaticComponents.cpp:9510:7 (libxul.so+0x5596eaf)
#38 mozilla::xpcom::StaticModule::CreateInstance(nsID const&, void**) const /workspace/obj-build/xpcom/components/StaticComponents.cpp:13003:10 (libxul.so+0x55a326a)
#39 CreateInstance /checkouts/gecko/xpcom/components/nsComponentManager.cpp:189:46 (libxul.so+0x55adc87)
#40 nsComponentManagerImpl::GetServiceLocked(mozilla::Maybe<mozilla::detail::BaseMonitorAutoLock<mozilla::Monitor>>&, (anonymous namespace)::EntryWrapper&, nsID const&, void**) /checkouts/gecko/xpcom/components/nsComponentManager.cpp:987:17 (libxul.so+0x55adc87)
#41 nsComponentManagerImpl::GetServiceByContractID(char const*, nsID const&, void**) /checkouts/gecko/xpcom/components/nsComponentManager.cpp:1176:10 (libxul.so+0x55ae8fd)
#42 CallGetService /checkouts/gecko/xpcom/components/nsComponentManagerUtils.cpp:63:43 (libxul.so+0x55b12fb)
#43 nsGetServiceByContractID::operator()(nsID const&, void**) const /checkouts/gecko/xpcom/components/nsComponentManagerUtils.cpp:240:21 (libxul.so+0x55b12fb)
#44 assign_from_gs_contractid /workspace/obj-build/dist/include/nsCOMPtr.h:871:7 (libxul.so+0xbccf8a1)
#45 nsCOMPtr /workspace/obj-build/dist/include/nsCOMPtr.h:513:5 (libxul.so+0xbccf8a1)
#46 EnsureNSSInitializedChromeOrContent() /checkouts/gecko/security/manager/ssl/nsNSSComponent.cpp:191:33 (libxul.so+0xbccf8a1)
#47 net_EnsurePSMInit() /checkouts/gecko/netwerk/base/nsNetUtil.cpp (libxul.so+0x57dc044)
#48 mozilla::net::nsHttpHandler::NewProxiedChannel(nsIURI*, nsIProxyInfo*, unsigned int, nsIURI*, nsILoadInfo*, nsIChannel**) /checkouts/gecko/netwerk/protocol/http/nsHttpHandler.cpp:1951:5 (libxul.so+0x5c2b132)
#49 mozilla::net::nsIOService::NewChannelFromURIWithProxyFlagsInternal(nsIURI*, nsIURI*, unsigned int, nsILoadInfo*, nsIChannel**) /checkouts/gecko/netwerk/base/nsIOService.cpp:1123:15 (libxul.so+0x57afd45)
#50 NewChannelFromURIWithProxyFlagsInternal /checkouts/gecko/netwerk/base/nsIOService.cpp:1099:10 (libxul.so+0x57afafb)
#51 mozilla::net::nsIOService::NewChannelFromURIWithClientAndController(nsIURI*, nsINode*, nsIPrincipal*, nsIPrincipal*, mozilla::Maybe<mozilla::dom::ClientInfo> const&, mozilla::Maybe<mozilla::dom::ServiceWorkerDescriptor> const&, unsigned int, nsIContentPolicy::nsContentPolicyType, unsigned int, bool, nsIChannel**) /checkouts/gecko/netwerk/base/nsIOService.cpp:1069:10 (libxul.so+0x57afafb)
#52 NS_NewChannelInternal(nsIChannel**, nsIURI*, nsINode*, nsIPrincipal*, nsIPrincipal*, mozilla::Maybe<mozilla::dom::ClientInfo> const&, mozilla::Maybe<mozilla::dom::ServiceWorkerDescriptor> const&, unsigned int, nsIContentPolicy::nsContentPolicyType, nsICookieJarSettings*, mozilla::dom::PerformanceStorage*, nsILoadGroup*, nsIInterfaceRequestor*, unsigned int, nsIIOService*, unsigned int, bool) /checkouts/gecko/netwerk/base/nsNetUtil.cpp:449:20 (libxul.so+0x57d0616)
#53 NS_NewChannel(nsIChannel**, nsIURI*, nsIPrincipal*, unsigned int, nsIContentPolicy::nsContentPolicyType, nsICookieJarSettings*, mozilla::dom::PerformanceStorage*, nsILoadGroup*, nsIInterfaceRequestor*, unsigned int, nsIIOService*, unsigned int, bool) /checkouts/gecko/netwerk/base/nsNetUtil.cpp:388:10 (libxul.so+0x57d047b)
#54 SetACookieInternal(nsICookieService*, char const*, char const*, bool) /checkouts/gecko/netwerk/test/gtest/TestCookie.cpp:88:3 (libxul.so+0x3c40826)
#55 SetACookie /checkouts/gecko/netwerk/test/gtest/TestCookie.cpp:115:3 (libxul.so+0x3c413c5)
#56 TestCookie_TestCookieMain_Test::TestBody() /checkouts/gecko/netwerk/test/gtest/TestCookie.cpp:251:3 (libxul.so+0x3c413c5)
#57 void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc (libxul.so+0x426ce6d)
#58 testing::Test::Run() /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:2688:5 (libxul.so+0x426ccd9)
#59 testing::TestInfo::Run() /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:2837:11 (libxul.so+0x426e6e8)
#60 testing::TestSuite::Run() /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:3016:30 (libxul.so+0x426fce4)
#61 testing::internal::UnitTestImpl::RunAllTests() /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:5922:44 (libxul.so+0x428d779)
#62 bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc (libxul.so+0x428cf1d)
#63 testing::UnitTest::Run() /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:5486:10 (libxul.so+0x428ccc0)
#64 RUN_ALL_TESTS /workspace/obj-build/dist/include/gtest/gtest.h:2319:73 (libxul.so+0x424261f)
#65 mozilla::RunGTestFunc(int*, char**) /checkouts/gecko/testing/gtest/mozilla/GTestRunner.cpp:167:10 (libxul.so+0x424261f)
#66 XREMain::XRE_mainStartup(bool*) /checkouts/gecko/toolkit/xre/nsAppRunner.cpp:4681:16 (libxul.so+0xc0bd8a9)
#67 XREMain::XRE_main(int, char**, mozilla::BootstrapConfig const&) /checkouts/gecko/toolkit/xre/nsAppRunner.cpp:5941:12 (libxul.so+0xc0c55d2)
#68 XRE_main(int, char**, mozilla::BootstrapConfig const&) /checkouts/gecko/toolkit/xre/nsAppRunner.cpp:6010:21 (libxul.so+0xc0c5d11)
#69 mozilla::BootstrapImpl::XRE_main(int, char**, mozilla::BootstrapConfig const&) /checkouts/gecko/toolkit/xre/Bootstrap.cpp:45:12 (libxul.so+0xc0d4d62)
#70 do_main /checkouts/gecko/browser/app/nsBrowserApp.cpp:227:22 (firefox-bin+0x14e8f0)
#71 main /checkouts/gecko/browser/app/nsBrowserApp.cpp:445:16 (firefox-bin+0x14e8f0)
SUMMARY: ThreadSanitizer: lock-order-inversion (potential deadlock) /checkouts/gecko/mozglue/misc/Mutex_posix.cpp:94:3 in mutexLock
Assignee | ||
Comment 6•23 days ago
|
||
Thanks for checking. I'll take a look.
Assignee | ||
Comment 7•23 days ago
|
||
This was hard to reproduce, but rr with --chaos helped: https://pernos.co/debug/f__HqLMFsmFoK2vFj3XJVQ/index.html
Assignee | ||
Comment 8•23 days ago
|
||
So this lock inversion is controlled and harmless, but happens when we exhibit the race explained here. The fix is easy. Same for the NotifyInputStopped
call. I'll silence that warning too.
Assignee | ||
Comment 9•23 days ago
|
||
Assignee | ||
Comment 10•23 days ago
|
||
Assignee | ||
Comment 11•23 days ago
|
||
Comment 12•22 days ago
|
||
Pushed by pehrsons@gmail.com: https://hg.mozilla.org/integration/autoland/rev/f8264dd39d83 Fix a TSAN lock inversion error in TestAudioCallbackDriver.DeviceChangeAfterStop. r=karlt https://hg.mozilla.org/integration/autoland/rev/557c8ea8965c Silence a gmock warning over an unexpected NotifyInputStopped call. r=karlt
Comment 13•22 days ago
|
||
Pushed by rvandermeulen@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/eaf5173742da Enable audio gtests under TSAN. r=RyanVM
Comment 14•22 days ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/f8264dd39d83
https://hg.mozilla.org/mozilla-central/rev/557c8ea8965c
Comment 15•22 days ago
|
||
bugherder |
Description
•