Closed Bug 1652046 Opened 5 years ago Closed 5 years ago

ThreadSanitizer: data race [@ mozilla::TaskController::DoExecuteNextTaskOnlyMainThreadInternal] vs [@ nsThreadPool::Run]

Categories

(Core :: XPCOM, defect)

defect

Tracking

()

RESOLVED INVALID

People

(Reporter: bwc, Unassigned)

References

(Blocks 1 open bug)

Details

Happens on local builds for me.

2:07.48 GECKO(288733) ==================
2:07.48 GECKO(288733) WARNING: ThreadSanitizer: data race (pid=288733)
2:07.48 GECKO(288733) Write of size 8 at 0x7b1400067610 by main thread:
2:07.48 GECKO(288733) #0 free /builds/worker/fetches/llvm-project/llvm/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:706:3 (firefox+0x9e898)
2:07.48 GECKO(288733) #1 moz_task::TaskRunnable::Release::h47acc81fef5f52e2 /home/bcampen/checkouts/mozilla-central/xpcom/rust/moz_task/src/lib.rs:163:14 (libxul.so+0xf10fff2)
2:07.48 GECKO(288733) #2 mozilla::TaskController::DoExecuteNextTaskOnlyMainThreadInternal(mozilla::detail::BaseAutoLock<mozilla::Mutex&> const&) /home/bcampen/checkouts/mozilla-central/xpcom/threads/TaskController.cpp:495:24 (libxul.so+0x5e1297e)
2:07.48 GECKO(288733) #3 mozilla::TaskController::ExecuteNextTaskOnlyMainThreadInternal(mozilla::detail::BaseAutoLock<mozilla::Mutex&> const&) /home/bcampen/checkouts/mozilla-central/xpcom/threads/TaskController.cpp:371:15 (libxul.so+0x5e11557)
2:07.48 GECKO(288733) #4 mozilla::TaskController::ProcessPendingMTTask(bool) /home/bcampen/checkouts/mozilla-central/xpcom/threads/TaskController.cpp:162:36 (libxul.so+0x5e117f4)
2:07.48 GECKO(288733) #5 operator() /home/bcampen/checkouts/mozilla-central/xpcom/threads/TaskController.cpp:86:37 (libxul.so+0x5e133f9)
2:07.48 GECKO(288733) #6 mozilla::detail::RunnableFunction<mozilla::TaskController::InitializeInternal()::$_5>::Run() /home/bcampen/checkouts/mozilla-central/objdir-ff-tsan/dist/include/nsThreadUtils.h:577:5 (libxul.so+0x5e133f9)
2:07.48 GECKO(288733) #7 nsThread::ProcessNextEvent(bool, bool*) /home/bcampen/checkouts/mozilla-central/xpcom/threads/nsThread.cpp:1234:14 (libxul.so+0x5e2bb9d)
2:07.48 GECKO(288733) #8 NS_ProcessNextEvent(nsIThread*, bool) /home/bcampen/checkouts/mozilla-central/xpcom/threads/nsThreadUtils.cpp:513:10 (libxul.so+0x5e309e5)
2:07.48 GECKO(288733) #9 SpinEventLoopUntil<mozilla::ProcessFailureBehavior::ReportToCaller, (lambda at /home/bcampen/checkouts/mozilla-central/xpcom/threads/nsThreadManager.cpp:696:36)> /home/bcampen/checkouts/mozilla-central/objdir-ff-tsan/dist/include/nsThreadUtils.h:362:25 (libxul.so+0x5e3049c)
2:07.48 GECKO(288733) #10 nsThreadManager::SpinEventLoopUntilInternal(nsINestedEventLoopCondition*, bool) /home/bcampen/checkouts/mozilla-central/xpcom/threads/nsThreadManager.cpp:696:8 (libxul.so+0x5e3049c)
2:07.48 GECKO(288733) #11 nsThreadManager::SpinEventLoopUntil(nsINestedEventLoopCondition*) /home/bcampen/checkouts/mozilla-central/xpcom/threads/nsThreadManager.cpp:675:10 (libxul.so+0x5e3030b)
2:07.48 GECKO(288733) #12 NS_InvokeByIndex /home/bcampen/checkouts/mozilla-central/xpcom/reflect/xptcall/md/unix/xptcinvoke_asm_x86_64_unix.S:106 (libxul.so+0x5e549b5)
2:07.48 GECKO(288733) #13 XPC_WN_CallMethod(JSContext*, unsigned int, JS::Value*) /home/bcampen/checkouts/mozilla-central/js/xpconnect/src/XPCWrappedNativeJSOps.cpp:946:10 (libxul.so+0x706383a)
2:07.48 GECKO(288733) #14 CallJSNative /home/bcampen/checkouts/mozilla-central/js/src/vm/Interpreter.cpp:484:13 (libxul.so+0xc88f720)
2:07.48 GECKO(288733) #15 js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason) /home/bcampen/checkouts/mozilla-central/js/src/vm/Interpreter.cpp:576:12 (libxul.so+0xc88f720)
2:07.48 GECKO(288733) #16 InternalCall /home/bcampen/checkouts/mozilla-central/js/src/vm/Interpreter.cpp:639:10 (libxul.so+0xc88488b)
2:07.48 GECKO(288733) #17 CallFromStack /home/bcampen/checkouts/mozilla-central/js/src/vm/Interpreter.cpp:643:10 (libxul.so+0xc88488b)
2:07.48 GECKO(288733) #18 Interpret(JSContext*, js::RunState&) /home/bcampen/checkouts/mozilla-central/js/src/vm/Interpreter.cpp:3332:16 (libxul.so+0xc88488b)
2:07.48 GECKO(288733) #19 js::RunScript(JSContext*, js::RunState&) /home/bcampen/checkouts/mozilla-central/js/src/vm/Interpreter.cpp:456:10 (libxul.so+0xc877346)
2:07.48 GECKO(288733) #20 js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason) /home/bcampen/checkouts/mozilla-central/js/src/vm/Interpreter.cpp:611:13 (libxul.so+0xc890111)
2:07.48 GECKO(288733) #21 InternalCall /home/bcampen/checkouts/mozilla-central/js/src/vm/Interpreter.cpp:639:10 (libxul.so+0xc890a76)
2:07.48 GECKO(288733) #22 js::CallFromStack(JSContext*, JS::CallArgs const&) /home/bcampen/checkouts/mozilla-central/js/src/vm/Interpreter.cpp:643:10 (libxul.so+0xc890a76)
2:07.48 GECKO(288733) #23 js::jit::DoCallFallback(JSContext*, js::jit::BaselineFrame*, js::jit::ICCall_Fallback*, unsigned int, JS::Value*, JS::MutableHandle<JS::Value>) /home/bcampen/checkouts/mozilla-central/js/src/jit/BaselineIC.cpp:3100:10 (libxul.so+0xd1b86cf)
2:07.48 GECKO(288733) #24 <null> <null> (0x7f6324332bc8)
2:07.48 GECKO(288733) #25 Interpret(JSContext*, js::RunState&) /home/bcampen/checkouts/mozilla-central/js/src/vm/Interpreter.cpp:2213:17 (libxul.so+0xc878395)
2:07.48 GECKO(288733) #26 js::RunScript(JSContext*, js::RunState&) /home/bcampen/checkouts/mozilla-central/js/src/vm/Interpreter.cpp:456:10 (libxul.so+0xc877346)
2:07.48 GECKO(288733) #27 js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason) /home/bcampen/checkouts/mozilla-central/js/src/vm/Interpreter.cpp:611:13 (libxul.so+0xc890111)
2:07.48 GECKO(288733) #28 InternalCall /home/bcampen/checkouts/mozilla-central/js/src/vm/Interpreter.cpp:639:10 (libxul.so+0xc890c00)
2:07.48 GECKO(288733) #29 js::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, js::AnyInvokeArgs const&, JS::MutableHandle<JS::Value>, js::CallReason) /home/bcampen/checkouts/mozilla-central/js/src/vm/Interpreter.cpp:656:8 (libxul.so+0xc890c00)
2:07.48 GECKO(288733) #30 js::fun_apply(JSContext*, unsigned int, JS::Value*) /home/bcampen/checkouts/mozilla-central/js/src/vm/JSFunction.cpp:1208:10 (libxul.so+0xcb2979c)
2:07.48 GECKO(288733) #31 CallJSNative /home/bcampen/checkouts/mozilla-central/js/src/vm/Interpreter.cpp:484:13 (libxul.so+0xc88f720)
2:07.48 GECKO(288733) #32 js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason) /home/bcampen/checkouts/mozilla-central/js/src/vm/Interpreter.cpp:576:12 (libxul.so+0xc88f720)
2:07.48 GECKO(288733) #33 InternalCall /home/bcampen/checkouts/mozilla-central/js/src/vm/Interpreter.cpp:639:10 (libxul.so+0xc88488b)
2:07.48 GECKO(288733) #34 CallFromStack /home/bcampen/checkouts/mozilla-central/js/src/vm/Interpreter.cpp:643:10 (libxul.so+0xc88488b)
2:07.48 GECKO(288733) #35 Interpret(JSContext*, js::RunState&) /home/bcampen/checkouts/mozilla-central/js/src/vm/Interpreter.cpp:3332:16 (libxul.so+0xc88488b)
2:07.48 GECKO(288733) #36 js::RunScript(JSContext*, js::RunState&) /home/bcampen/checkouts/mozilla-central/js/src/vm/Interpreter.cpp:456:10 (libxul.so+0xc877346)
2:07.49 GECKO(288733) #37 js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason) /home/bcampen/checkouts/mozilla-central/js/src/vm/Interpreter.cpp:611:13 (libxul.so+0xc890111)
2:07.49 GECKO(288733) #38 InternalCall /home/bcampen/checkouts/mozilla-central/js/src/vm/Interpreter.cpp:639:10 (libxul.so+0xc890c00)
2:07.49 GECKO(288733) #39 js::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, js::AnyInvokeArgs const&, JS::MutableHandle<JS::Value>, js::CallReason) /home/bcampen/checkouts/mozilla-central/js/src/vm/Interpreter.cpp:656:8 (libxul.so+0xc890c00)
2:07.49 GECKO(288733) #40 JS_CallFunctionValue(JSContext*, JS::Handle<JSObject*>, JS::Handle<JS::Value>, JS::HandleValueArray const&, JS::MutableHandle<JS::Value>) /home/bcampen/checkouts/mozilla-central/js/src/jsapi.cpp:2783:10 (libxul.so+0xc96b1bf)
2:07.49 GECKO(288733) #41 nsXPCWrappedJS::CallMethod(unsigned short, nsXPTMethodInfo const*, nsXPTCMiniVariant*) /home/bcampen/checkouts/mozilla-central/js/xpconnect/src/XPCWrappedJSClass.cpp:963:17 (libxul.so+0x705a37e)
2:07.49 GECKO(288733) #42 PrepareAndDispatch /home/bcampen/checkouts/mozilla-central/xpcom/reflect/xptcall/md/unix/xptcstubs_x86_64_linux.cpp:125:37 (libxul.so+0x5e55ab2)
2:07.49 GECKO(288733) #43 SharedStub <null> (libxul.so+0x5e54cca)
2:07.49 GECKO(288733) #44 XREMain::XRE_mainRun() /home/bcampen/checkouts/mozilla-central/toolkit/xre/nsAppRunner.cpp:4505:16 (libxul.so+0xc6ea58f)
2:07.49 GECKO(288733) #45 XREMain::XRE_main(int, char**, mozilla::BootstrapConfig const&) /home/bcampen/checkouts/mozilla-central/toolkit/xre/nsAppRunner.cpp:4868:8 (libxul.so+0xc6eb773)
2:07.49 GECKO(288733) #46 XRE_main(int, char**, mozilla::BootstrapConfig const&) /home/bcampen/checkouts/mozilla-central/toolkit/xre/nsAppRunner.cpp:4922:21 (libxul.so+0xc6ebb0a)
2:07.49 GECKO(288733) #47 mozilla::BootstrapImpl::XRE_main(int, char**, mozilla::BootstrapConfig const&) /home/bcampen/checkouts/mozilla-central/toolkit/xre/Bootstrap.cpp:45:12 (libxul.so+0xc6f7bc7)
2:07.49 GECKO(288733) #48 do_main /home/bcampen/checkouts/mozilla-central/browser/app/nsBrowserApp.cpp:217:22 (firefox+0x111af3)
2:07.49 GECKO(288733) #49 main /home/bcampen/checkouts/mozilla-central/browser/app/nsBrowserApp.cpp:331:16 (firefox+0x111af3)
2:07.49 GECKO(288733) Previous read of size 8 at 0x7b1400067610 by thread T28:
2:07.49 GECKO(288733) #0 assign_assuming_AddRef /home/bcampen/checkouts/mozilla-central/objdir-ff-tsan/dist/include/nsCOMPtr.h:365:7 (libxul.so+0x5e32ea6)
2:07.49 GECKO(288733) #1 assign_assuming_AddRef /home/bcampen/checkouts/mozilla-central/objdir-ff-tsan/dist/include/nsCOMPtr.h:388:20 (libxul.so+0x5e32ea6)
2:07.49 GECKO(288733) #2 operator= /home/bcampen/checkouts/mozilla-central/objdir-ff-tsan/dist/include/nsCOMPtr.h:684:5 (libxul.so+0x5e32ea6)
2:07.49 GECKO(288733) #3 nsThreadPool::Run() /home/bcampen/checkouts/mozilla-central/xpcom/threads/nsThreadPool.cpp:301:13 (libxul.so+0x5e32ea6)
2:07.49 GECKO(288733) #4 nsThread::ProcessNextEvent(bool, bool*) /home/bcampen/checkouts/mozilla-central/xpcom/threads/nsThread.cpp:1234:14 (libxul.so+0x5e2be30)
2:07.49 GECKO(288733) #5 NS_ProcessNextEvent(nsIThread*, bool) /home/bcampen/checkouts/mozilla-central/xpcom/threads/nsThreadUtils.cpp:513:10 (libxul.so+0x5e309e5)
2:07.49 GECKO(288733) #6 mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*) /home/bcampen/checkouts/mozilla-central/ipc/glue/MessagePump.cpp:302:20 (libxul.so+0x690a10e)
2:07.49 GECKO(288733) #7 RunInternal /home/bcampen/checkouts/mozilla-central/ipc/chromium/src/base/message_loop.cc:334:10 (libxul.so+0x683daac)
2:07.49 GECKO(288733) #8 RunHandler /home/bcampen/checkouts/mozilla-central/ipc/chromium/src/base/message_loop.cc:327:3 (libxul.so+0x683daac)
2:07.49 GECKO(288733) #9 MessageLoop::Run() /home/bcampen/checkouts/mozilla-central/ipc/chromium/src/base/message_loop.cc:309:3 (libxul.so+0x683daac)
2:07.49 GECKO(288733) #10 nsThread::ThreadFunc(void*) /home/bcampen/checkouts/mozilla-central/xpcom/threads/nsThread.cpp:447:10 (libxul.so+0x5e27a78)
2:07.49 GECKO(288733) #11 _pt_root /home/bcampen/checkouts/mozilla-central/nsprpub/pr/src/pthreads/ptthread.c:201:5 (libnspr4.so+0x50be0)

Likely invalid, because the build used for this missed rust code instrumentation.

Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.