Closed Bug 1616342 Opened 2 years ago Closed 2 years ago

ThreadSanitizer: unlock of an unlocked mutex (or by a wrong thread) in [@ unity_gtk_action_group_get_type]

Categories

(Toolkit :: Startup and Profile System, defect)

Unspecified
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla75
Tracking Status
firefox75 --- fixed

People

(Reporter: tsmith, Assigned: decoder)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

This is hit at start up when running m-c 20200218-a5e2eb343af7. This is seen on Ubuntu 16.04.

WARNING: ThreadSanitizer: unlock of an unlocked mutex (or by a wrong thread) (pid=68570)
    #0 pthread_mutex_unlock /builds/worker/fetches/llvm-project/llvm/projects/compiler-rt/lib/tsan/../sanitizer_common/sanitizer_common_interceptors.inc:4153:3 (firefox+0x79886)
    #1 unity_gtk_action_group_get_type <null> (libunity-gtk3-parser.so.0+0x91f5)
    #2 nsIWidget::Create(nsIWidget*, void*, mozilla::gfx::IntRectTyped<mozilla::DesktopPixel> const&, nsWidgetInitData*) src/obj-firefox/dist/include/nsIWidget.h:458:12 (libxul.so+0x456bfa2)
    #3 mozilla::AppWindow::Initialize(nsIAppWindow*, nsIAppWindow*, nsIURI*, int, int, bool, nsIRemoteTab*, mozIDOMWindowProxy*, nsWidgetInitData&) src/xpfe/appshell/AppWindow.cpp:223:17 (libxul.so+0x5c74e19)
    #4 nsAppShellService::JustCreateTopWindow(nsIAppWindow*, nsIURI*, unsigned int, int, int, bool, nsIRemoteTab*, mozIDOMWindowProxy*, mozilla::AppWindow**) src/xpfe/appshell/nsAppShellService.cpp:679:25 (libxul.so+0x5c84218)
    #5 nsAppShellService::CreateTopLevelWindow(nsIAppWindow*, nsIURI*, unsigned int, int, int, nsIRemoteTab*, mozIDOMWindowProxy*, nsIAppWindow**) src/xpfe/appshell/nsAppShellService.cpp:172:8 (libxul.so+0x5c84877)
    #6 nsAppStartup::CreateChromeWindow(nsIWebBrowserChrome*, unsigned int, nsIRemoteTab*, mozIDOMWindowProxy*, unsigned long, bool*, nsIWebBrowserChrome**) src/toolkit/components/startup/nsAppStartup.cpp:635:15 (libxul.so+0x604da53)
    #7 non-virtual thunk to nsAppStartup::CreateChromeWindow(nsIWebBrowserChrome*, unsigned int, nsIRemoteTab*, mozIDOMWindowProxy*, unsigned long, bool*, nsIWebBrowserChrome**) src/toolkit/components/startup/nsAppStartup.cpp (libxul.so+0x604dafd)
    #8 CreateChromeWindow src/toolkit/components/windowwatcher/nsWindowWatcher.cpp:419:33 (libxul.so+0x6113d56)
    #9 nsWindowWatcher::OpenWindowInternal(mozIDOMWindowProxy*, char const*, char const*, char const*, bool, bool, bool, nsIArray*, bool, bool, bool, nsDocShellLoadState*, mozilla::dom::BrowsingContext**) src/toolkit/components/windowwatcher/nsWindowWatcher.cpp:904:12 (libxul.so+0x6113d56)
    #10 nsWindowWatcher::OpenWindow(mozIDOMWindowProxy*, char const*, char const*, char const*, nsISupports*, mozIDOMWindowProxy**) src/toolkit/components/windowwatcher/nsWindowWatcher.cpp:292:3 (libxul.so+0x6110ff7)
    #11 NS_InvokeByIndex src/xpcom/reflect/xptcall/md/unix/xptcinvoke_asm_x86_64_unix.S:106 (libxul.so+0xa8d875)
    #12 XPC_WN_CallMethod(JSContext*, unsigned int, JS::Value*) src/js/xpconnect/src/XPCWrappedNativeJSOps.cpp:947:10 (libxul.so+0x186cd81)
    #13 CallJSNative src/js/src/vm/Interpreter.cpp:477:13 (libxul.so+0x628c968)
    #14 js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason) src/js/src/vm/Interpreter.cpp:569:12 (libxul.so+0x628c968)
    #15 InternalCall(JSContext*, js::AnyInvokeArgs const&, js::CallReason) src/js/src/vm/Interpreter.cpp:632:10 (libxul.so+0x628d97b)
    #16 CallFromStack src/js/src/vm/Interpreter.cpp:636:10 (libxul.so+0x627f828)
    #17 Interpret(JSContext*, js::RunState&) src/js/src/vm/Interpreter.cpp:3049:16 (libxul.so+0x627f828)
    #18 js::RunScript(JSContext*, js::RunState&) src/js/src/vm/Interpreter.cpp:449:10 (libxul.so+0x626fa7b)
    #19 js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason) src/js/src/vm/Interpreter.cpp:604:13 (libxul.so+0x628cdce)
    #20 InternalCall(JSContext*, js::AnyInvokeArgs const&, js::CallReason) src/js/src/vm/Interpreter.cpp:632:10 (libxul.so+0x628d97b)
    #21 js::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, js::AnyInvokeArgs const&, JS::MutableHandle<JS::Value>, js::CallReason) src/js/src/vm/Interpreter.cpp:649:8 (libxul.so+0x628da2a)
    #22 JS_CallFunctionValue(JSContext*, JS::Handle<JSObject*>, JS::Handle<JS::Value>, JS::HandleValueArray const&, JS::MutableHandle<JS::Value>) src/js/src/jsapi.cpp:2734:10 (libxul.so+0x635503d)
    #23 nsXPCWrappedJS::CallMethod(unsigned short, nsXPTMethodInfo const*, nsXPTCMiniVariant*) src/js/xpconnect/src/XPCWrappedJSClass.cpp:959:17 (libxul.so+0x1863ef8)
    #24 PrepareAndDispatch src/xpcom/reflect/xptcall/md/unix/xptcstubs_x86_64_linux.cpp:125:37 (libxul.so+0xa8e8c4)
    #25 SharedStub <null> (libxul.so+0xa8db72)
    #26 nsCommandLine::EnumerateHandlers(nsresult (*)(nsICommandLineHandler*, nsICommandLine*, void*), void*) src/toolkit/components/commandlines/nsCommandLine.cpp:448:10 (libxul.so+0x5ef45ab)
    #27 nsCommandLine::Run() src/toolkit/components/commandlines/nsCommandLine.cpp:503:8 (libxul.so+0x5ef4b11)
    #28 XREMain::XRE_mainRun() src/toolkit/xre/nsAppRunner.cpp:4494:19 (libxul.so+0x6154946)
    #29 XREMain::XRE_main(int, char**, mozilla::BootstrapConfig const&) src/toolkit/xre/nsAppRunner.cpp:4701:8 (libxul.so+0x615580d)
    #30 XRE_main(int, char**, mozilla::BootstrapConfig const&) src/toolkit/xre/nsAppRunner.cpp:4752:21 (libxul.so+0x6155bd4)
    #31 mozilla::BootstrapImpl::XRE_main(int, char**, mozilla::BootstrapConfig const&) src/toolkit/xre/Bootstrap.cpp:45:12 (libxul.so+0x615e892)
    #32 do_main src/browser/app/nsBrowserApp.cpp:217:22 (firefox+0xc738f)
    #33 main src/browser/app/nsBrowserApp.cpp:331:16 (firefox+0xc738f)

  Location is heap block of size 40 at 0x7b0c00002490 allocated by main thread:
    #0 malloc /builds/worker/fetches/llvm-project/llvm/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:650:5 (firefox+0x59c24)
    #1 <null> <null> (libglib-2.0.so.0+0x8e32f)
    #2 XREMain::XRE_main(int, char**, mozilla::BootstrapConfig const&) src/toolkit/xre/nsAppRunner.cpp:4688:12 (libxul.so+0x6155728)
    #3 XRE_main(int, char**, mozilla::BootstrapConfig const&) src/toolkit/xre/nsAppRunner.cpp:4752:21 (libxul.so+0x6155bd4)
    #4 mozilla::BootstrapImpl::XRE_main(int, char**, mozilla::BootstrapConfig const&) src/toolkit/xre/Bootstrap.cpp:45:12 (libxul.so+0x615e892)
    #5 do_main src/browser/app/nsBrowserApp.cpp:217:22 (firefox+0xc738f)
    #6 main src/browser/app/nsBrowserApp.cpp:331:16 (firefox+0xc738f)

  Mutex M117271 (0x7b0c00002490) created at:
    #0 pthread_mutex_unlock /builds/worker/fetches/llvm-project/llvm/projects/compiler-rt/lib/tsan/../sanitizer_common/sanitizer_common_interceptors.inc:4153:3 (firefox+0x79886)
    #1 unity_gtk_action_group_get_type <null> (libunity-gtk3-parser.so.0+0x91f5)
    #2 nsIWidget::Create(nsIWidget*, void*, mozilla::gfx::IntRectTyped<mozilla::DesktopPixel> const&, nsWidgetInitData*) src/obj-firefox/dist/include/nsIWidget.h:458:12 (libxul.so+0x456bfa2)
    #3 mozilla::AppWindow::Initialize(nsIAppWindow*, nsIAppWindow*, nsIURI*, int, int, bool, nsIRemoteTab*, mozIDOMWindowProxy*, nsWidgetInitData&) src/xpfe/appshell/AppWindow.cpp:223:17 (libxul.so+0x5c74e19)
    #4 nsAppShellService::JustCreateTopWindow(nsIAppWindow*, nsIURI*, unsigned int, int, int, bool, nsIRemoteTab*, mozIDOMWindowProxy*, mozilla::AppWindow**) src/xpfe/appshell/nsAppShellService.cpp:679:25 (libxul.so+0x5c84218)
    #5 nsAppShellService::CreateTopLevelWindow(nsIAppWindow*, nsIURI*, unsigned int, int, int, nsIRemoteTab*, mozIDOMWindowProxy*, nsIAppWindow**) src/xpfe/appshell/nsAppShellService.cpp:172:8 (libxul.so+0x5c84877)
    #6 nsAppStartup::CreateChromeWindow(nsIWebBrowserChrome*, unsigned int, nsIRemoteTab*, mozIDOMWindowProxy*, unsigned long, bool*, nsIWebBrowserChrome**) src/toolkit/components/startup/nsAppStartup.cpp:635:15 (libxul.so+0x604da53)
    #7 non-virtual thunk to nsAppStartup::CreateChromeWindow(nsIWebBrowserChrome*, unsigned int, nsIRemoteTab*, mozIDOMWindowProxy*, unsigned long, bool*, nsIWebBrowserChrome**) src/toolkit/components/startup/nsAppStartup.cpp (libxul.so+0x604dafd)
    #8 CreateChromeWindow src/toolkit/components/windowwatcher/nsWindowWatcher.cpp:419:33 (libxul.so+0x6113d56)
    #9 nsWindowWatcher::OpenWindowInternal(mozIDOMWindowProxy*, char const*, char const*, char const*, bool, bool, bool, nsIArray*, bool, bool, bool, nsDocShellLoadState*, mozilla::dom::BrowsingContext**) src/toolkit/components/windowwatcher/nsWindowWatcher.cpp:904:12 (libxul.so+0x6113d56)
    #10 nsWindowWatcher::OpenWindow(mozIDOMWindowProxy*, char const*, char const*, char const*, nsISupports*, mozIDOMWindowProxy**) src/toolkit/components/windowwatcher/nsWindowWatcher.cpp:292:3 (libxul.so+0x6110ff7)
    #11 NS_InvokeByIndex src/xpcom/reflect/xptcall/md/unix/xptcinvoke_asm_x86_64_unix.S:106 (libxul.so+0xa8d875)
    #12 XPC_WN_CallMethod(JSContext*, unsigned int, JS::Value*) src/js/xpconnect/src/XPCWrappedNativeJSOps.cpp:947:10 (libxul.so+0x186cd81)
    #13 CallJSNative src/js/src/vm/Interpreter.cpp:477:13 (libxul.so+0x628c968)
    #14 js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason) src/js/src/vm/Interpreter.cpp:569:12 (libxul.so+0x628c968)
    #15 InternalCall(JSContext*, js::AnyInvokeArgs const&, js::CallReason) src/js/src/vm/Interpreter.cpp:632:10 (libxul.so+0x628d97b)
    #16 CallFromStack src/js/src/vm/Interpreter.cpp:636:10 (libxul.so+0x627f828)
    #17 Interpret(JSContext*, js::RunState&) src/js/src/vm/Interpreter.cpp:3049:16 (libxul.so+0x627f828)
    #18 js::RunScript(JSContext*, js::RunState&) src/js/src/vm/Interpreter.cpp:449:10 (libxul.so+0x626fa7b)
    #19 js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason) src/js/src/vm/Interpreter.cpp:604:13 (libxul.so+0x628cdce)
    #20 InternalCall(JSContext*, js::AnyInvokeArgs const&, js::CallReason) src/js/src/vm/Interpreter.cpp:632:10 (libxul.so+0x628d97b)
    #21 js::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, js::AnyInvokeArgs const&, JS::MutableHandle<JS::Value>, js::CallReason) src/js/src/vm/Interpreter.cpp:649:8 (libxul.so+0x628da2a)
    #22 JS_CallFunctionValue(JSContext*, JS::Handle<JSObject*>, JS::Handle<JS::Value>, JS::HandleValueArray const&, JS::MutableHandle<JS::Value>) src/js/src/jsapi.cpp:2734:10 (libxul.so+0x635503d)
    #23 nsXPCWrappedJS::CallMethod(unsigned short, nsXPTMethodInfo const*, nsXPTCMiniVariant*) src/js/xpconnect/src/XPCWrappedJSClass.cpp:959:17 (libxul.so+0x1863ef8)
    #24 PrepareAndDispatch src/xpcom/reflect/xptcall/md/unix/xptcstubs_x86_64_linux.cpp:125:37 (libxul.so+0xa8e8c4)
    #25 SharedStub <null> (libxul.so+0xa8db72)
    #26 nsCommandLine::EnumerateHandlers(nsresult (*)(nsICommandLineHandler*, nsICommandLine*, void*), void*) src/toolkit/components/commandlines/nsCommandLine.cpp:448:10 (libxul.so+0x5ef45ab)
    #27 nsCommandLine::Run() src/toolkit/components/commandlines/nsCommandLine.cpp:503:8 (libxul.so+0x5ef4b11)
    #28 XREMain::XRE_mainRun() src/toolkit/xre/nsAppRunner.cpp:4494:19 (libxul.so+0x6154946)
    #29 XREMain::XRE_main(int, char**, mozilla::BootstrapConfig const&) src/toolkit/xre/nsAppRunner.cpp:4701:8 (libxul.so+0x615580d)
    #30 XRE_main(int, char**, mozilla::BootstrapConfig const&) src/toolkit/xre/nsAppRunner.cpp:4752:21 (libxul.so+0x6155bd4)
    #31 mozilla::BootstrapImpl::XRE_main(int, char**, mozilla::BootstrapConfig const&) src/toolkit/xre/Bootstrap.cpp:45:12 (libxul.so+0x615e892)
    #32 do_main src/browser/app/nsBrowserApp.cpp:217:22 (firefox+0xc738f)
    #33 main src/browser/app/nsBrowserApp.cpp:331:16 (firefox+0xc738f)
Assignee: nobody → choller
Status: NEW → ASSIGNED
Pushed by choller@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/79382a659397
Add Unity-related library to TSan suppression list. r=froydnj
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla75
You need to log in before you can comment on or make changes to this bug.