Closed Bug 1894261 Opened 9 months ago Closed 8 months ago

Permanent SUMMARY: ThreadSanitizer: data race /builds/worker/workspace/obj-build/dist/include/gtest/gtest-assertion-result.h:161:18 in AssertionResult<bool>

Categories

(Core :: SQLite and Embedded Database Bindings, defect)

defect

Tracking

()

RESOLVED FIXED
127 Branch
Tracking Status
firefox-esr115 --- wontfix
firefox125 --- wontfix
firefox126 --- wontfix
firefox127 --- fixed

People

(Reporter: RyanVM, Assigned: jjalkanen)

References

(Regression)

Details

(Keywords: regression)

Attachments

(2 files)

I've been looking at enabling GTests in TSAN mode and this is currently permafailing. Any thoughts on this, Jari?

https://treeherder.mozilla.org/logviewer?job_id=456435680&repo=try&lineNumber=12673

TEST-START | SynchronousConnectionInterruptionTest.shouldBeAbleToInterruptInfiniteOperation
==================
WARNING: ThreadSanitizer: data race (pid=999)
  Read of size 1 at 0x7b0c00138c20 by main thread:
    #0 AssertionResult<bool> /workspace/obj-build/dist/include/gtest/gtest-assertion-result.h:161:18 (libxul.so+0x3e6dce9)
    #1 SynchronousConnectionInterruptionTest_shouldBeAbleToInterruptInfiniteOperation_Test::TestBody() /checkouts/gecko/storage/test/gtest/test_interruptSynchronousConnection.cpp:62:3 (libxul.so+0x3e6dce9)
    #2 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+0x429321d)
    #3 testing::Test::Run() /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:2688:5 (libxul.so+0x4293089)
    #4 testing::TestInfo::Run() /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:2837:11 (libxul.so+0x4294a98)
    #5 testing::TestSuite::Run() /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:3016:30 (libxul.so+0x4296094)
    #6 testing::internal::UnitTestImpl::RunAllTests() /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:5922:44 (libxul.so+0x42b3b29)
    #7 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+0x42b32cd)
    #8 testing::UnitTest::Run() /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:5486:10 (libxul.so+0x42b3070)
    #9 RUN_ALL_TESTS /workspace/obj-build/dist/include/gtest/gtest.h:2319:73 (libxul.so+0x42689ff)
    #10 mozilla::RunGTestFunc(int*, char**) /checkouts/gecko/testing/gtest/mozilla/GTestRunner.cpp:167:10 (libxul.so+0x42689ff)
    #11 XREMain::XRE_mainStartup(bool*) /checkouts/gecko/toolkit/xre/nsAppRunner.cpp:4686:16 (libxul.so+0xc20d469)
    #12 XREMain::XRE_main(int, char**, mozilla::BootstrapConfig const&) /checkouts/gecko/toolkit/xre/nsAppRunner.cpp:5946:12 (libxul.so+0xc215192)
    #13 XRE_main(int, char**, mozilla::BootstrapConfig const&) /checkouts/gecko/toolkit/xre/nsAppRunner.cpp:6015:21 (libxul.so+0xc2158d1)
    #14 mozilla::BootstrapImpl::XRE_main(int, char**, mozilla::BootstrapConfig const&) /checkouts/gecko/toolkit/xre/Bootstrap.cpp:45:12 (libxul.so+0xc2247c2)
    #15 do_main /checkouts/gecko/browser/app/nsBrowserApp.cpp:227:22 (firefox-bin+0x14ea00) (BuildId: 799a9f5cef2c79b155e93e0bf470dbcb802ebda9)
    #16 main /checkouts/gecko/browser/app/nsBrowserApp.cpp:445:16 (firefox-bin+0x14ea00)
  Previous write of size 1 at 0x7b0c00138c20 by thread T140906:
    #0 operator() /checkouts/gecko/storage/test/gtest/test_interruptSynchronousConnection.cpp:43:3 (libxul.so+0x3e8aea8)
    #1 mozilla::detail::RunnableFunction<SynchronousConnectionInterruptionTest_shouldBeAbleToInterruptInfiniteOperation_Test::TestBody()::$_0>::Run() /workspace/obj-build/dist/include/nsThreadUtils.h:548:5 (libxul.so+0x3e8aea8)
    #2 mozilla::DelayedRunnable::Notify(nsITimer*) /checkouts/gecko/xpcom/threads/DelayedRunnable.cpp:92:20 (libxul.so+0x574b252)
    #3 non-virtual thunk to mozilla::DelayedRunnable::Notify(nsITimer*) /checkouts/gecko/xpcom/threads/DelayedRunnable.cpp (libxul.so+0x574b2c9)
    #4 operator() /checkouts/gecko/xpcom/threads/nsTimerImpl.cpp:677:44 (libxul.so+0x57670b4)
    #5 matchN<mozilla::Variant<nsTimerImpl::UnknownCallback, nsCOMPtr<nsITimerCallback>, nsCOMPtr<nsIObserver>, nsTimerImpl::FuncCallback, nsTimerImpl::ClosureCallback> &, (lambda at /checkouts/gecko/xpcom/threads/nsTimerImpl.cpp:677:7), (lambda at /checkouts/gecko/xpcom/threads/nsTimerImpl.cpp:678:7), (lambda at /checkouts/gecko/xpcom/threads/nsTimerImpl.cpp:681:7), (lambda at /checkouts/gecko/xpcom/threads/nsTimerImpl.cpp:682:7)> /workspace/obj-build/dist/include/mozilla/Variant.h:309:16 (libxul.so+0x57670b4)
    #6 matchN<mozilla::Variant<nsTimerImpl::UnknownCallback, nsCOMPtr<nsITimerCallback>, nsCOMPtr<nsIObserver>, nsTimerImpl::FuncCallback, nsTimerImpl::ClosureCallback> &, (lambda at /checkouts/gecko/xpcom/threads/nsTimerImpl.cpp:676:7), (lambda at /checkouts/gecko/xpcom/threads/nsTimerImpl.cpp:677:7), (lambda at /checkouts/gecko/xpcom/threads/nsTimerImpl.cpp:678:7), (lambda at /checkouts/gecko/xpcom/threads/nsTimerImpl.cpp:681:7), (lambda at /checkouts/gecko/xpcom/threads/nsTimerImpl.cpp:682:7)> /workspace/obj-build/dist/include/mozilla/Variant.h:318:14 (libxul.so+0x57670b4)
    #7 matchN<mozilla::Variant<nsTimerImpl::UnknownCallback, nsCOMPtr<nsITimerCallback>, nsCOMPtr<nsIObserver>, nsTimerImpl::FuncCallback, nsTimerImpl::ClosureCallback> &, (lambda at /checkouts/gecko/xpcom/threads/nsTimerImpl.cpp:676:7), (lambda at /checkouts/gecko/xpcom/threads/nsTimerImpl.cpp:677:7), (lambda at /checkouts/gecko/xpcom/threads/nsTimerImpl.cpp:678:7), (lambda at /checkouts/gecko/xpcom/threads/nsTimerImpl.cpp:681:7), (lambda at /checkouts/gecko/xpcom/threads/nsTimerImpl.cpp:682:7)> /workspace/obj-build/dist/include/mozilla/Variant.h:902:12 (libxul.so+0x57670b4)
    #8 match<(lambda at /checkouts/gecko/xpcom/threads/nsTimerImpl.cpp:676:7), (lambda at /checkouts/gecko/xpcom/threads/nsTimerImpl.cpp:677:7), (lambda at /checkouts/gecko/xpcom/threads/nsTimerImpl.cpp:678:7), (lambda at /checkouts/gecko/xpcom/threads/nsTimerImpl.cpp:681:7), (lambda at /checkouts/gecko/xpcom/threads/nsTimerImpl.cpp:682:7)> /workspace/obj-build/dist/include/mozilla/Variant.h:857:12 (libxul.so+0x57670b4)
    #9 nsTimerImpl::Fire(int) /checkouts/gecko/xpcom/threads/nsTimerImpl.cpp:675:22 (libxul.so+0x57670b4)
    #10 nsTimerEvent::Run() /checkouts/gecko/xpcom/threads/TimerThread.cpp:515:11 (libxul.so+0x5765f07)
    #11 nsThread::ProcessNextEvent(bool, bool*) /checkouts/gecko/xpcom/threads/nsThread.cpp:1193:16 (libxul.so+0x57744ce)
    #12 NS_ProcessNextEvent(nsIThread*, bool) /checkouts/gecko/xpcom/threads/nsThreadUtils.cpp:480:10 (libxul.so+0x577aa64)
    #13 mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*) /checkouts/gecko/ipc/glue/MessagePump.cpp:330:5 (libxul.so+0x62bf6d9)
    #14 RunInternal /checkouts/gecko/ipc/chromium/src/base/message_loop.cc:370:10 (libxul.so+0x62326c8)
    #15 RunHandler /checkouts/gecko/ipc/chromium/src/base/message_loop.cc:363:3 (libxul.so+0x62326c8)
    #16 MessageLoop::Run() /checkouts/gecko/ipc/chromium/src/base/message_loop.cc:345:3 (libxul.so+0x62326c8)
    #17 nsThread::ThreadFunc(void*) /checkouts/gecko/xpcom/threads/nsThread.cpp:370:10 (libxul.so+0x576fd53)
    #18 _pt_root /checkouts/gecko/nsprpub/pr/src/pthreads/ptthread.c:201:5 (libnspr4.so+0x4ba79) (BuildId: bc31c74a45b1d0905acafb431fb8165a84a87c38)
  Location is heap block of size 40 at 0x7b0c00138c00 allocated by main thread:
    #0 malloc /fetches/llvm-project/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:663:5 (firefox-bin+0xc3ddc) (BuildId: 799a9f5cef2c79b155e93e0bf470dbcb802ebda9)
    #1 moz_xmalloc /checkouts/gecko/memory/mozalloc/mozalloc.cpp:52:15 (firefox-bin+0x150a08) (BuildId: 799a9f5cef2c79b155e93e0bf470dbcb802ebda9)
    #2 operator new /workspace/obj-build/dist/include/mozilla/cxxalloc.h:33:10 (libxul.so+0x3e7ea97)
    #3 testing::internal::TestFactoryImpl<SynchronousConnectionInterruptionTest_shouldBeAbleToInterruptInfiniteOperation_Test>::CreateTest() /workspace/obj-build/dist/include/gtest/internal/gtest-internal.h:456:40 (libxul.so+0x3e7ea97)
    #4 testing::Test* testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::TestFactoryBase, testing::Test*>(testing::internal::TestFactoryBase*, testing::Test* (testing::internal::TestFactoryBase::*)(), char const*) /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc (libxul.so+0x4294e0d)
    #5 testing::TestInfo::Run() /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:2827:22 (libxul.so+0x4294a7b)
    #6 testing::TestSuite::Run() /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:3016:30 (libxul.so+0x4296094)
    #7 testing::internal::UnitTestImpl::RunAllTests() /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:5922:44 (libxul.so+0x42b3b29)
    #8 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+0x42b32cd)
    #9 testing::UnitTest::Run() /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:5486:10 (libxul.so+0x42b3070)
    #10 RUN_ALL_TESTS /workspace/obj-build/dist/include/gtest/gtest.h:2319:73 (libxul.so+0x42689ff)
    #11 mozilla::RunGTestFunc(int*, char**) /checkouts/gecko/testing/gtest/mozilla/GTestRunner.cpp:167:10 (libxul.so+0x42689ff)
    #12 XREMain::XRE_mainStartup(bool*) /checkouts/gecko/toolkit/xre/nsAppRunner.cpp:4686:16 (libxul.so+0xc20d469)
    #13 XREMain::XRE_main(int, char**, mozilla::BootstrapConfig const&) /checkouts/gecko/toolkit/xre/nsAppRunner.cpp:5946:12 (libxul.so+0xc215192)
    #14 XRE_main(int, char**, mozilla::BootstrapConfig const&) /checkouts/gecko/toolkit/xre/nsAppRunner.cpp:6015:21 (libxul.so+0xc2158d1)
    #15 mozilla::BootstrapImpl::XRE_main(int, char**, mozilla::BootstrapConfig const&) /checkouts/gecko/toolkit/xre/Bootstrap.cpp:45:12 (libxul.so+0xc2247c2)
    #16 do_main /checkouts/gecko/browser/app/nsBrowserApp.cpp:227:22 (firefox-bin+0x14ea00) (BuildId: 799a9f5cef2c79b155e93e0bf470dbcb802ebda9)
    #17 main /checkouts/gecko/browser/app/nsBrowserApp.cpp:445:16 (firefox-bin+0x14ea00)
  Thread T140906 'Test Thread' (tid=13301, 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) (BuildId: 799a9f5cef2c79b155e93e0bf470dbcb802ebda9)
    #1 _PR_CreateThread /checkouts/gecko/nsprpub/pr/src/pthreads/ptthread.c:458:14 (libnspr4.so+0x42cee) (BuildId: bc31c74a45b1d0905acafb431fb8165a84a87c38)
    #2 PR_CreateThread /checkouts/gecko/nsprpub/pr/src/pthreads/ptthread.c:533:12 (libnspr4.so+0x37f84) (BuildId: bc31c74a45b1d0905acafb431fb8165a84a87c38)
    #3 nsThread::Init(nsTSubstring<char> const&) /checkouts/gecko/xpcom/threads/nsThread.cpp:620:20 (libxul.so+0x57714f7)
    #4 nsThreadManager::NewNamedThread(nsTSubstring<char> const&, nsIThreadManager::ThreadCreationOptions, nsIThread**) /checkouts/gecko/xpcom/threads/nsThreadManager.cpp:602:22 (libxul.so+0x577959d)
    #5 NS_NewNamedThread(nsTSubstring<char> const&, nsIThread**, already_AddRefed<nsIRunnable>, nsIThreadManager::ThreadCreationOptions) /checkouts/gecko/xpcom/threads/nsThreadUtils.cpp:176:57 (libxul.so+0x5782253)
    #6 NS_NewNamedThread<12UL> /workspace/obj-build/dist/include/nsThreadUtils.h:87:10 (libxul.so+0x3e7d507)
    #7 SynchronousConnectionInterruptionTest::SetUp() /checkouts/gecko/storage/test/gtest/test_interruptSynchronousConnection.cpp:20:5 (libxul.so+0x3e7d507)
    #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+0x429321d)
    #9 testing::Test::Run() /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:2683:3 (libxul.so+0x4293013)
    #10 testing::TestInfo::Run() /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:2837:11 (libxul.so+0x4294a98)
    #11 testing::TestSuite::Run() /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:3016:30 (libxul.so+0x4296094)
    #12 testing::internal::UnitTestImpl::RunAllTests() /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:5922:44 (libxul.so+0x42b3b29)
    #13 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+0x42b32cd)
    #14 testing::UnitTest::Run() /checkouts/gecko/third_party/googletest/googletest/src/gtest.cc:5486:10 (libxul.so+0x42b3070)
    #15 RUN_ALL_TESTS /workspace/obj-build/dist/include/gtest/gtest.h:2319:73 (libxul.so+0x42689ff)
    #16 mozilla::RunGTestFunc(int*, char**) /checkouts/gecko/testing/gtest/mozilla/GTestRunner.cpp:167:10 (libxul.so+0x42689ff)
    #17 XREMain::XRE_mainStartup(bool*) /checkouts/gecko/toolkit/xre/nsAppRunner.cpp:4686:16 (libxul.so+0xc20d469)
    #18 XREMain::XRE_main(int, char**, mozilla::BootstrapConfig const&) /checkouts/gecko/toolkit/xre/nsAppRunner.cpp:5946:12 (libxul.so+0xc215192)
    #19 XRE_main(int, char**, mozilla::BootstrapConfig const&) /checkouts/gecko/toolkit/xre/nsAppRunner.cpp:6015:21 (libxul.so+0xc2158d1)
    #20 mozilla::BootstrapImpl::XRE_main(int, char**, mozilla::BootstrapConfig const&) /checkouts/gecko/toolkit/xre/Bootstrap.cpp:45:12 (libxul.so+0xc2247c2)
    #21 do_main /checkouts/gecko/browser/app/nsBrowserApp.cpp:227:22 (firefox-bin+0x14ea00) (BuildId: 799a9f5cef2c79b155e93e0bf470dbcb802ebda9)
    #22 main /checkouts/gecko/browser/app/nsBrowserApp.cpp:445:16 (firefox-bin+0x14ea00)
SUMMARY: ThreadSanitizer: data race /workspace/obj-build/dist/include/gtest/gtest-assertion-result.h:161:18 in AssertionResult<bool>
Flags: needinfo?(jjalkanen)
Blocks: 1806946
No longer depends on: 1806946

FYI, this test was disabled on TSAN for now but can be re-enabled by reverting the below change:
https://hg.mozilla.org/integration/autoland/diff/8ceeacec0dfd1398a7cc01d1b5a08ae5be835435/storage/test/gtest/moz.build

Assignee: nobody → jjalkanen
Attachment #9399801 - Attachment description: WIP: Bug 1894261 - Guard storage connection in interrupt test with mutex. r=#dom-storage → Bug 1894261 - Guard storage connection in interrupt test with mutex. r=#dom-storage
Status: NEW → ASSIGNED
Attachment #9399801 - Attachment description: Bug 1894261 - Guard storage connection in interrupt test with mutex. r=#dom-storage → WIP: Bug 1894261 - Guard storage connection in interrupt test with mutex. r=#dom-storage
Attachment #9399801 - Attachment description: WIP: Bug 1894261 - Guard storage connection in interrupt test with mutex. r=#dom-storage → Bug 1894261 - Protect concurrent access to connection interrupt test variables. r=#dom-storage
Attachment #9399990 - Attachment description: WIP: Bug 1894261 - Enable SynchronousConnectionInterruptionTest for tsan. → WIP: Bug 1894261 - Enable SynchronousConnectionInterruptionTest for TSAN. r=jmaher
Attachment #9399990 - Attachment description: WIP: Bug 1894261 - Enable SynchronousConnectionInterruptionTest for TSAN. r=jmaher → Bug 1894261 - Enable SynchronousConnectionInterruptionTest for TSAN. r=jmaher
Attachment #9399990 - Attachment description: Bug 1894261 - Enable SynchronousConnectionInterruptionTest for TSAN. r=jmaher → WIP: Bug 1894261 - Enable SynchronousConnectionInterruptionTest for tsan.
Attachment #9399990 - Attachment description: WIP: Bug 1894261 - Enable SynchronousConnectionInterruptionTest for tsan. → Bug 1894261 - Enable SynchronousConnectionInterruptionTest for TSAN. r=jmaher
Attachment #9399990 - Attachment description: Bug 1894261 - Enable SynchronousConnectionInterruptionTest for TSAN. r=jmaher → Bug 1894261 - Enable SynchronousConnectionInterruptionTest for TSAN. r=RyanVM
Pushed by jjalkanen@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/0f1b36ed2546 Enable SynchronousConnectionInterruptionTest for TSAN. r=RyanVM https://hg.mozilla.org/integration/autoland/rev/8502d0abf4b4 Protect concurrent access to connection interrupt test variables. r=dom-storage-reviewers,janv

Let's see if it sticks

Flags: needinfo?(jjalkanen)
Status: ASSIGNED → RESOLVED
Closed: 8 months ago
Resolution: --- → FIXED
Target Milestone: --- → 127 Branch
Product: Toolkit → Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: