Bug 1894419 Comment 3 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

https://treeherder.mozilla.org/logviewer?job_id=456547867&repo=try&lineNumber=44791
```
TEST-START | NrTcpSocketTest.TestReadConsumeReadDrain
TEST-PASS | NrTcpSocketTest.TestReadConsumeReadDrain | test completed (time: 8ms)
==================
WARNING: ThreadSanitizer: data race (pid=996)
  Write of size 4 at 0x7f77664c6d4c by main thread:
    #0 r_log_register /checkouts/gecko/dom/media/webrtc/transport/third_party/nrappkit/src/log/r_log.c:188:16 (libxul.so+0xc0b0114)
    #1 RLogConnectorTest::SetUpTestCase() /checkouts/gecko/dom/media/webrtc/transport/test/rlogconnector_unittest.cpp:38:5 (libxul.so+0x4fad94a)
    #2 RunSetUpTestSuite /workspace/obj-build/dist/include/gtest/gtest.h:796:7 (libxul.so+0x4257154)
    #3 HandleExceptionsInMethodIfSupported<testing::TestSuite, void> /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc (libxul.so+0x4257154)
    #4 testing::TestSuite::Run() /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:3004:3 (libxul.so+0x4257154)
    #5 testing::internal::UnitTestImpl::RunAllTests() /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:5922:44 (libxul.so+0x4274eb9)
    #6 libvpx_test_cases_Test::TestBody() /checkouts/gecko/dom/media/gtest/TestVPXDecoding.cpp:89:9 (libxul.so+0x4a7b0e7)
    #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+0x42545ad)
    #8 testing::Test::Run() /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:2688:5 (libxul.so+0x4254419)
    #9 testing::TestInfo::Run() /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:2837:11 (libxul.so+0x4255e28)
    #10 testing::TestSuite::Run() /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:3016:30 (libxul.so+0x4257424)
    #11 testing::internal::UnitTestImpl::RunAllTests() /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:5922:44 (libxul.so+0x4274eb9)
    #12 testing::Test::Run() /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:2688:5 (libxul.so+0x4254419)
    #13 testing::TestInfo::Run() /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:2837:11 (libxul.so+0x4255e28)
    #14 testing::TestSuite::Run() /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:3016:30 (libxul.so+0x4257424)
    #15 testing::internal::UnitTestImpl::RunAllTests() /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:5922:44 (libxul.so+0x4274eb9)
    #16 testing::Test::Run() /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:2688:5 (libxul.so+0x4254419)
    #17 testing::TestInfo::Run() /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:2837:11 (libxul.so+0x4255e28)
    #18 testing::TestSuite::Run() /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:3016:30 (libxul.so+0x4257424)
    #19 testing::internal::UnitTestImpl::RunAllTests() /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:5922:44 (libxul.so+0x4274eb9)
    #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+0x427465d)
    #21 testing::UnitTest::Run() /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:5486:10 (libxul.so+0x4274400)
    #22 RUN_ALL_TESTS /workspace/obj-build/dist/include/gtest/gtest.h:2319:73 (libxul.so+0x4229dbf)
    #23 mozilla::RunGTestFunc(int*, char**) /checkouts/gecko/testing/gtest/mozilla/GTestRunner.cpp:167:10 (libxul.so+0x4229dbf)
    #24 XREMain::XRE_mainStartup(bool*) /checkouts/gecko/toolkit/xre/nsAppRunner.cpp:4686:16 (libxul.so+0xbfe2da9)
    #25 XREMain::XRE_main(int, char**, mozilla::BootstrapConfig const&) /checkouts/gecko/toolkit/xre/nsAppRunner.cpp:5946:12 (libxul.so+0xbfeaad2)
    #26 XRE_main(int, char**, mozilla::BootstrapConfig const&) /checkouts/gecko/toolkit/xre/nsAppRunner.cpp:6015:21 (libxul.so+0xbfeb211)
    #27 mozilla::BootstrapImpl::XRE_main(int, char**, mozilla::BootstrapConfig const&) /checkouts/gecko/toolkit/xre/Bootstrap.cpp:45:12 (libxul.so+0xbffa262)
    #28 do_main /checkouts/gecko/browser/app/nsBrowserApp.cpp:227:22 (firefox-bin+0x14ea00)
    #29 main /checkouts/gecko/browser/app/nsBrowserApp.cpp:445:16 (firefox-bin+0x14ea00)
  Previous read of size 4 at 0x7f77664c6d4c by thread T5:
    #0 r_logging_dest /checkouts/gecko/dom/media/webrtc/transport/third_party/nrappkit/src/log/r_log.c:489:35 (libxul.so+0xc0b0cb9)
    #1 r_vlog /checkouts/gecko/dom/media/webrtc/transport/third_party/nrappkit/src/log/r_log.c:364:10 (libxul.so+0xc0b0cb9)
    #2 r_log /checkouts/gecko/dom/media/webrtc/transport/third_party/nrappkit/src/log/r_log.c:302:5 (libxul.so+0xc0b0986)
    #3 OnSocketDetached /checkouts/gecko/dom/media/webrtc/transport/nr_socket_prsock.cpp:350:3 (libxul.so+0x629ae65)
    #4 non-virtual thunk to mozilla::NrSocket::OnSocketDetached(PRFileDesc*) /checkouts/gecko/dom/media/webrtc/transport/nr_socket_prsock.cpp (libxul.so+0x629ae65)
    #5 mozilla::net::nsSocketTransportService::DetachSocket(AutoTArray<mozilla::net::nsSocketTransportService::SocketContext, 50ul>&, mozilla::net::nsSocketTransportService::SocketContext*) /checkouts/gecko/netwerk/base/nsSocketTransportService2.cpp:424:21 (libxul.so+0x5771303)
    #6 mozilla::net::nsSocketTransportService::DoPollIteration(mozilla::BaseTimeDuration<mozilla::TimeDurationValueCalculator>*) /checkouts/gecko/netwerk/base/nsSocketTransportService2.cpp:1315:7 (libxul.so+0x5775d34)
    #7 mozilla::net::nsSocketTransportService::Run() /checkouts/gecko/netwerk/base/nsSocketTransportService2.cpp:1163:7 (libxul.so+0x577509b)
    #8 non-virtual thunk to mozilla::net::nsSocketTransportService::Run() /checkouts/gecko/netwerk/base/nsSocketTransportService2.cpp (libxul.so+0x57771b9)
    #9 nsThread::ProcessNextEvent(bool, bool*) /checkouts/gecko/xpcom/threads/nsThread.cpp:1193:16 (libxul.so+0x554170e)
    #10 NS_ProcessNextEvent(nsIThread*, bool) /checkouts/gecko/xpcom/threads/nsThreadUtils.cpp:480:10 (libxul.so+0x5547ca4)
    #11 mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*) /checkouts/gecko/ipc/glue/MessagePump.cpp:300:20 (libxul.so+0x608dc0e)
    #12 RunInternal /checkouts/gecko/ipc/chromium/src/base/message_loop.cc:370:10 (libxul.so+0x6000cb8)
    #13 RunHandler /checkouts/gecko/ipc/chromium/src/base/message_loop.cc:363:3 (libxul.so+0x6000cb8)
    #14 MessageLoop::Run() /checkouts/gecko/ipc/chromium/src/base/message_loop.cc:345:3 (libxul.so+0x6000cb8)
    #15 nsThread::ThreadFunc(void*) /checkouts/gecko/xpcom/threads/nsThread.cpp:370:10 (libxul.so+0x553cf93)
    #16 _pt_root /checkouts/gecko/nsprpub/pr/src/pthreads/ptthread.c:201:5 (libnspr4.so+0x4ba79)
  Location is global 'log_type_ct' of size 4 at 0x7f77664c6d4c (libxul.so+0xf95ad4c)
  Thread T5 'Socket Thread' (tid=1004, 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+0x553e737)
    #4 nsThreadManager::NewNamedThread(nsTSubstring<char> const&, nsIThreadManager::ThreadCreationOptions, nsIThread**) /checkouts/gecko/xpcom/threads/nsThreadManager.cpp:602:22 (libxul.so+0x55467dd)
    #5 NS_NewNamedThread(nsTSubstring<char> const&, nsIThread**, already_AddRefed<nsIRunnable>, nsIThreadManager::ThreadCreationOptions) /checkouts/gecko/xpcom/threads/nsThreadUtils.cpp:176:57 (libxul.so+0x554f493)
    #6 NS_NewNamedThread<14UL> /workspace/obj-build/dist/include/nsThreadUtils.h:87:10 (libxul.so+0x57737fb)
    #7 mozilla::net::nsSocketTransportService::Init() /checkouts/gecko/netwerk/base/nsSocketTransportService2.cpp:748:19 (libxul.so+0x57737fb)
    #8 mozilla::xpcom::CreateInstanceImpl(mozilla::xpcom::ModuleID, nsID const&, void**) /workspace/obj-build/xpcom/components/StaticComponents.cpp:9683:7 (libxul.so+0x54f888a)
    #9 mozilla::xpcom::StaticModule::CreateInstance(nsID const&, void**) const /workspace/obj-build/xpcom/components/StaticComponents.cpp:12981:10 (libxul.so+0x550446a)
    #10 CreateInstance /checkouts/gecko/xpcom/components/nsComponentManager.cpp:189:46 (libxul.so+0x550ee87)
    #11 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+0x550ee87)
    #12 nsComponentManagerImpl::GetServiceByContractID(char const*, nsID const&, void**) /checkouts/gecko/xpcom/components/nsComponentManager.cpp:1176:10 (libxul.so+0x550fafd)
    #13 CallGetService /checkouts/gecko/xpcom/components/nsComponentManagerUtils.cpp:63:43 (libxul.so+0x551257b)
    #14 nsGetServiceByContractIDWithError::operator()(nsID const&, void**) const /checkouts/gecko/xpcom/components/nsComponentManagerUtils.cpp:250:21 (libxul.so+0x551257b)
    #15 assign_from_gs_contractid_with_error /workspace/obj-build/dist/include/nsCOMPtr.h:881:7 (libxul.so+0x570c7b0)
    #16 operator= /workspace/obj-build/dist/include/nsCOMPtr.h:665:5 (libxul.so+0x570c7b0)
    #17 mozilla::net::nsIOService::InitializeSocketTransportService() /checkouts/gecko/netwerk/base/nsIOService.cpp:439:29 (libxul.so+0x570c7b0)
    #18 mozilla::net::nsIOService::SetOfflineInternal(bool, bool) /checkouts/gecko/netwerk/base/nsIOService.cpp:1303:7 (libxul.so+0x5710edf)
    #19 SetOffline /checkouts/gecko/netwerk/base/nsIOService.cpp:1242:48 (libxul.so+0x570ad9c)
    #20 mozilla::net::nsIOService::Init() /checkouts/gecko/netwerk/base/nsIOService.cpp:311:3 (libxul.so+0x570ad9c)
    #21 mozilla::net::nsIOService::GetInstance() /checkouts/gecko/netwerk/base/nsIOService.cpp:496:9 (libxul.so+0x570cdd1)
    #22 mozilla::xpcom::CreateInstanceImpl(mozilla::xpcom::ModuleID, nsID const&, void**) /workspace/obj-build/xpcom/components/StaticComponents.cpp:12089:48 (libxul.so+0x5500003)
    #23 mozilla::xpcom::StaticModule::CreateInstance(nsID const&, void**) const /workspace/obj-build/xpcom/components/StaticComponents.cpp:12981:10 (libxul.so+0x550446a)
    #24 CreateInstance /checkouts/gecko/xpcom/components/nsComponentManager.cpp:189:46 (libxul.so+0x550ee87)
    #25 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+0x550ee87)
    #26 nsComponentManagerImpl::GetService(mozilla::xpcom::ModuleID, nsID const&, void**) /checkouts/gecko/xpcom/components/nsComponentManager.cpp:1077:10 (libxul.so+0x550f413)
    #27 mozilla::xpcom::GetServiceHelper::operator()(nsID const&, void**) const /workspace/obj-build/xpcom/components/StaticComponents.cpp:13127:50 (libxul.so+0x5505068)
    #28 RefPtr /workspace/obj-build/dist/include/nsCOMPtr.h:1111:7 (libxul.so+0x637051e)
    #29 nsScriptSecurityManager::Init() /checkouts/gecko/caps/nsScriptSecurityManager.cpp:1565:29 (libxul.so+0x637051e)
    #30 nsScriptSecurityManager::InitStatics() /checkouts/gecko/caps/nsScriptSecurityManager.cpp:1627:28 (libxul.so+0x6370a89)
    #31 nsXPConnect::InitStatics() /checkouts/gecko/js/xpconnect/src/nsXPConnect.cpp:165:3 (libxul.so+0x62130a0)
    #32 xpcModuleCtor() /checkouts/gecko/js/xpconnect/src/XPCModule.cpp:11:3 (libxul.so+0x61e11cf)
    #33 nsLayoutModuleInitialize() /checkouts/gecko/layout/build/nsLayoutModule.cpp:97:7 (libxul.so+0xa936dfb)
    #34 nsComponentManagerImpl::Init() /checkouts/gecko/xpcom/components/nsComponentManager.cpp:387:5 (libxul.so+0x550c12f)
    #35 NS_InitXPCOM /checkouts/gecko/xpcom/build/XPCOMInit.cpp:448:51 (libxul.so+0x557e520)
    #36 ScopedXPCOM /workspace/obj-build/dist/include/testing/TestHarness.h:84:15 (libxul.so+0x4229d1e)
    #37 mozilla::RunGTestFunc(int*, char**) /checkouts/gecko/testing/gtest/mozilla/GTestRunner.cpp:114:15 (libxul.so+0x4229d1e)
    #38 XREMain::XRE_mainStartup(bool*) /checkouts/gecko/toolkit/xre/nsAppRunner.cpp:4686:16 (libxul.so+0xbfe2da9)
    #39 XREMain::XRE_main(int, char**, mozilla::BootstrapConfig const&) /checkouts/gecko/toolkit/xre/nsAppRunner.cpp:5946:12 (libxul.so+0xbfeaad2)
    #40 XRE_main(int, char**, mozilla::BootstrapConfig const&) /checkouts/gecko/toolkit/xre/nsAppRunner.cpp:6015:21 (libxul.so+0xbfeb211)
    #41 mozilla::BootstrapImpl::XRE_main(int, char**, mozilla::BootstrapConfig const&) /checkouts/gecko/toolkit/xre/Bootstrap.cpp:45:12 (libxul.so+0xbffa262)
    #42 do_main /checkouts/gecko/browser/app/nsBrowserApp.cpp:227:22 (firefox-bin+0x14ea00)
    #43 main /checkouts/gecko/browser/app/nsBrowserApp.cpp:445:16 (firefox-bin+0x14ea00)
SUMMARY: ThreadSanitizer: data race /checkouts/gecko/dom/media/webrtc/transport/third_party/nrappkit/src/log/r_log.c:188:16 in r_log_register
```
`ThreadSanitizer: data race dom/media/webrtc/transport/third_party/nrappkit/src/log/r_log.c:188:16 in r_log_register`

https://treeherder.mozilla.org/logviewer?job_id=456547867&repo=try&lineNumber=44791
```
TEST-START | NrTcpSocketTest.TestReadConsumeReadDrain
TEST-PASS | NrTcpSocketTest.TestReadConsumeReadDrain | test completed (time: 8ms)
==================
WARNING: ThreadSanitizer: data race (pid=996)
  Write of size 4 at 0x7f77664c6d4c by main thread:
    #0 r_log_register /checkouts/gecko/dom/media/webrtc/transport/third_party/nrappkit/src/log/r_log.c:188:16 (libxul.so+0xc0b0114)
    #1 RLogConnectorTest::SetUpTestCase() /checkouts/gecko/dom/media/webrtc/transport/test/rlogconnector_unittest.cpp:38:5 (libxul.so+0x4fad94a)
    #2 RunSetUpTestSuite /workspace/obj-build/dist/include/gtest/gtest.h:796:7 (libxul.so+0x4257154)
    #3 HandleExceptionsInMethodIfSupported<testing::TestSuite, void> /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc (libxul.so+0x4257154)
    #4 testing::TestSuite::Run() /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:3004:3 (libxul.so+0x4257154)
    #5 testing::internal::UnitTestImpl::RunAllTests() /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:5922:44 (libxul.so+0x4274eb9)
    #6 libvpx_test_cases_Test::TestBody() /checkouts/gecko/dom/media/gtest/TestVPXDecoding.cpp:89:9 (libxul.so+0x4a7b0e7)
    #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+0x42545ad)
    #8 testing::Test::Run() /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:2688:5 (libxul.so+0x4254419)
    #9 testing::TestInfo::Run() /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:2837:11 (libxul.so+0x4255e28)
    #10 testing::TestSuite::Run() /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:3016:30 (libxul.so+0x4257424)
    #11 testing::internal::UnitTestImpl::RunAllTests() /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:5922:44 (libxul.so+0x4274eb9)
    #12 testing::Test::Run() /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:2688:5 (libxul.so+0x4254419)
    #13 testing::TestInfo::Run() /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:2837:11 (libxul.so+0x4255e28)
    #14 testing::TestSuite::Run() /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:3016:30 (libxul.so+0x4257424)
    #15 testing::internal::UnitTestImpl::RunAllTests() /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:5922:44 (libxul.so+0x4274eb9)
    #16 testing::Test::Run() /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:2688:5 (libxul.so+0x4254419)
    #17 testing::TestInfo::Run() /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:2837:11 (libxul.so+0x4255e28)
    #18 testing::TestSuite::Run() /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:3016:30 (libxul.so+0x4257424)
    #19 testing::internal::UnitTestImpl::RunAllTests() /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:5922:44 (libxul.so+0x4274eb9)
    #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+0x427465d)
    #21 testing::UnitTest::Run() /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:5486:10 (libxul.so+0x4274400)
    #22 RUN_ALL_TESTS /workspace/obj-build/dist/include/gtest/gtest.h:2319:73 (libxul.so+0x4229dbf)
    #23 mozilla::RunGTestFunc(int*, char**) /checkouts/gecko/testing/gtest/mozilla/GTestRunner.cpp:167:10 (libxul.so+0x4229dbf)
    #24 XREMain::XRE_mainStartup(bool*) /checkouts/gecko/toolkit/xre/nsAppRunner.cpp:4686:16 (libxul.so+0xbfe2da9)
    #25 XREMain::XRE_main(int, char**, mozilla::BootstrapConfig const&) /checkouts/gecko/toolkit/xre/nsAppRunner.cpp:5946:12 (libxul.so+0xbfeaad2)
    #26 XRE_main(int, char**, mozilla::BootstrapConfig const&) /checkouts/gecko/toolkit/xre/nsAppRunner.cpp:6015:21 (libxul.so+0xbfeb211)
    #27 mozilla::BootstrapImpl::XRE_main(int, char**, mozilla::BootstrapConfig const&) /checkouts/gecko/toolkit/xre/Bootstrap.cpp:45:12 (libxul.so+0xbffa262)
    #28 do_main /checkouts/gecko/browser/app/nsBrowserApp.cpp:227:22 (firefox-bin+0x14ea00)
    #29 main /checkouts/gecko/browser/app/nsBrowserApp.cpp:445:16 (firefox-bin+0x14ea00)
  Previous read of size 4 at 0x7f77664c6d4c by thread T5:
    #0 r_logging_dest /checkouts/gecko/dom/media/webrtc/transport/third_party/nrappkit/src/log/r_log.c:489:35 (libxul.so+0xc0b0cb9)
    #1 r_vlog /checkouts/gecko/dom/media/webrtc/transport/third_party/nrappkit/src/log/r_log.c:364:10 (libxul.so+0xc0b0cb9)
    #2 r_log /checkouts/gecko/dom/media/webrtc/transport/third_party/nrappkit/src/log/r_log.c:302:5 (libxul.so+0xc0b0986)
    #3 OnSocketDetached /checkouts/gecko/dom/media/webrtc/transport/nr_socket_prsock.cpp:350:3 (libxul.so+0x629ae65)
    #4 non-virtual thunk to mozilla::NrSocket::OnSocketDetached(PRFileDesc*) /checkouts/gecko/dom/media/webrtc/transport/nr_socket_prsock.cpp (libxul.so+0x629ae65)
    #5 mozilla::net::nsSocketTransportService::DetachSocket(AutoTArray<mozilla::net::nsSocketTransportService::SocketContext, 50ul>&, mozilla::net::nsSocketTransportService::SocketContext*) /checkouts/gecko/netwerk/base/nsSocketTransportService2.cpp:424:21 (libxul.so+0x5771303)
    #6 mozilla::net::nsSocketTransportService::DoPollIteration(mozilla::BaseTimeDuration<mozilla::TimeDurationValueCalculator>*) /checkouts/gecko/netwerk/base/nsSocketTransportService2.cpp:1315:7 (libxul.so+0x5775d34)
    #7 mozilla::net::nsSocketTransportService::Run() /checkouts/gecko/netwerk/base/nsSocketTransportService2.cpp:1163:7 (libxul.so+0x577509b)
    #8 non-virtual thunk to mozilla::net::nsSocketTransportService::Run() /checkouts/gecko/netwerk/base/nsSocketTransportService2.cpp (libxul.so+0x57771b9)
    #9 nsThread::ProcessNextEvent(bool, bool*) /checkouts/gecko/xpcom/threads/nsThread.cpp:1193:16 (libxul.so+0x554170e)
    #10 NS_ProcessNextEvent(nsIThread*, bool) /checkouts/gecko/xpcom/threads/nsThreadUtils.cpp:480:10 (libxul.so+0x5547ca4)
    #11 mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*) /checkouts/gecko/ipc/glue/MessagePump.cpp:300:20 (libxul.so+0x608dc0e)
    #12 RunInternal /checkouts/gecko/ipc/chromium/src/base/message_loop.cc:370:10 (libxul.so+0x6000cb8)
    #13 RunHandler /checkouts/gecko/ipc/chromium/src/base/message_loop.cc:363:3 (libxul.so+0x6000cb8)
    #14 MessageLoop::Run() /checkouts/gecko/ipc/chromium/src/base/message_loop.cc:345:3 (libxul.so+0x6000cb8)
    #15 nsThread::ThreadFunc(void*) /checkouts/gecko/xpcom/threads/nsThread.cpp:370:10 (libxul.so+0x553cf93)
    #16 _pt_root /checkouts/gecko/nsprpub/pr/src/pthreads/ptthread.c:201:5 (libnspr4.so+0x4ba79)
  Location is global 'log_type_ct' of size 4 at 0x7f77664c6d4c (libxul.so+0xf95ad4c)
  Thread T5 'Socket Thread' (tid=1004, 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+0x553e737)
    #4 nsThreadManager::NewNamedThread(nsTSubstring<char> const&, nsIThreadManager::ThreadCreationOptions, nsIThread**) /checkouts/gecko/xpcom/threads/nsThreadManager.cpp:602:22 (libxul.so+0x55467dd)
    #5 NS_NewNamedThread(nsTSubstring<char> const&, nsIThread**, already_AddRefed<nsIRunnable>, nsIThreadManager::ThreadCreationOptions) /checkouts/gecko/xpcom/threads/nsThreadUtils.cpp:176:57 (libxul.so+0x554f493)
    #6 NS_NewNamedThread<14UL> /workspace/obj-build/dist/include/nsThreadUtils.h:87:10 (libxul.so+0x57737fb)
    #7 mozilla::net::nsSocketTransportService::Init() /checkouts/gecko/netwerk/base/nsSocketTransportService2.cpp:748:19 (libxul.so+0x57737fb)
    #8 mozilla::xpcom::CreateInstanceImpl(mozilla::xpcom::ModuleID, nsID const&, void**) /workspace/obj-build/xpcom/components/StaticComponents.cpp:9683:7 (libxul.so+0x54f888a)
    #9 mozilla::xpcom::StaticModule::CreateInstance(nsID const&, void**) const /workspace/obj-build/xpcom/components/StaticComponents.cpp:12981:10 (libxul.so+0x550446a)
    #10 CreateInstance /checkouts/gecko/xpcom/components/nsComponentManager.cpp:189:46 (libxul.so+0x550ee87)
    #11 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+0x550ee87)
    #12 nsComponentManagerImpl::GetServiceByContractID(char const*, nsID const&, void**) /checkouts/gecko/xpcom/components/nsComponentManager.cpp:1176:10 (libxul.so+0x550fafd)
    #13 CallGetService /checkouts/gecko/xpcom/components/nsComponentManagerUtils.cpp:63:43 (libxul.so+0x551257b)
    #14 nsGetServiceByContractIDWithError::operator()(nsID const&, void**) const /checkouts/gecko/xpcom/components/nsComponentManagerUtils.cpp:250:21 (libxul.so+0x551257b)
    #15 assign_from_gs_contractid_with_error /workspace/obj-build/dist/include/nsCOMPtr.h:881:7 (libxul.so+0x570c7b0)
    #16 operator= /workspace/obj-build/dist/include/nsCOMPtr.h:665:5 (libxul.so+0x570c7b0)
    #17 mozilla::net::nsIOService::InitializeSocketTransportService() /checkouts/gecko/netwerk/base/nsIOService.cpp:439:29 (libxul.so+0x570c7b0)
    #18 mozilla::net::nsIOService::SetOfflineInternal(bool, bool) /checkouts/gecko/netwerk/base/nsIOService.cpp:1303:7 (libxul.so+0x5710edf)
    #19 SetOffline /checkouts/gecko/netwerk/base/nsIOService.cpp:1242:48 (libxul.so+0x570ad9c)
    #20 mozilla::net::nsIOService::Init() /checkouts/gecko/netwerk/base/nsIOService.cpp:311:3 (libxul.so+0x570ad9c)
    #21 mozilla::net::nsIOService::GetInstance() /checkouts/gecko/netwerk/base/nsIOService.cpp:496:9 (libxul.so+0x570cdd1)
    #22 mozilla::xpcom::CreateInstanceImpl(mozilla::xpcom::ModuleID, nsID const&, void**) /workspace/obj-build/xpcom/components/StaticComponents.cpp:12089:48 (libxul.so+0x5500003)
    #23 mozilla::xpcom::StaticModule::CreateInstance(nsID const&, void**) const /workspace/obj-build/xpcom/components/StaticComponents.cpp:12981:10 (libxul.so+0x550446a)
    #24 CreateInstance /checkouts/gecko/xpcom/components/nsComponentManager.cpp:189:46 (libxul.so+0x550ee87)
    #25 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+0x550ee87)
    #26 nsComponentManagerImpl::GetService(mozilla::xpcom::ModuleID, nsID const&, void**) /checkouts/gecko/xpcom/components/nsComponentManager.cpp:1077:10 (libxul.so+0x550f413)
    #27 mozilla::xpcom::GetServiceHelper::operator()(nsID const&, void**) const /workspace/obj-build/xpcom/components/StaticComponents.cpp:13127:50 (libxul.so+0x5505068)
    #28 RefPtr /workspace/obj-build/dist/include/nsCOMPtr.h:1111:7 (libxul.so+0x637051e)
    #29 nsScriptSecurityManager::Init() /checkouts/gecko/caps/nsScriptSecurityManager.cpp:1565:29 (libxul.so+0x637051e)
    #30 nsScriptSecurityManager::InitStatics() /checkouts/gecko/caps/nsScriptSecurityManager.cpp:1627:28 (libxul.so+0x6370a89)
    #31 nsXPConnect::InitStatics() /checkouts/gecko/js/xpconnect/src/nsXPConnect.cpp:165:3 (libxul.so+0x62130a0)
    #32 xpcModuleCtor() /checkouts/gecko/js/xpconnect/src/XPCModule.cpp:11:3 (libxul.so+0x61e11cf)
    #33 nsLayoutModuleInitialize() /checkouts/gecko/layout/build/nsLayoutModule.cpp:97:7 (libxul.so+0xa936dfb)
    #34 nsComponentManagerImpl::Init() /checkouts/gecko/xpcom/components/nsComponentManager.cpp:387:5 (libxul.so+0x550c12f)
    #35 NS_InitXPCOM /checkouts/gecko/xpcom/build/XPCOMInit.cpp:448:51 (libxul.so+0x557e520)
    #36 ScopedXPCOM /workspace/obj-build/dist/include/testing/TestHarness.h:84:15 (libxul.so+0x4229d1e)
    #37 mozilla::RunGTestFunc(int*, char**) /checkouts/gecko/testing/gtest/mozilla/GTestRunner.cpp:114:15 (libxul.so+0x4229d1e)
    #38 XREMain::XRE_mainStartup(bool*) /checkouts/gecko/toolkit/xre/nsAppRunner.cpp:4686:16 (libxul.so+0xbfe2da9)
    #39 XREMain::XRE_main(int, char**, mozilla::BootstrapConfig const&) /checkouts/gecko/toolkit/xre/nsAppRunner.cpp:5946:12 (libxul.so+0xbfeaad2)
    #40 XRE_main(int, char**, mozilla::BootstrapConfig const&) /checkouts/gecko/toolkit/xre/nsAppRunner.cpp:6015:21 (libxul.so+0xbfeb211)
    #41 mozilla::BootstrapImpl::XRE_main(int, char**, mozilla::BootstrapConfig const&) /checkouts/gecko/toolkit/xre/Bootstrap.cpp:45:12 (libxul.so+0xbffa262)
    #42 do_main /checkouts/gecko/browser/app/nsBrowserApp.cpp:227:22 (firefox-bin+0x14ea00)
    #43 main /checkouts/gecko/browser/app/nsBrowserApp.cpp:445:16 (firefox-bin+0x14ea00)
SUMMARY: ThreadSanitizer: data race /checkouts/gecko/dom/media/webrtc/transport/third_party/nrappkit/src/log/r_log.c:188:16 in r_log_register
```

Back to Bug 1894419 Comment 3