Closed Bug 1852860 Opened 9 months ago Closed 9 months ago

Assertion failure: !mIdleServiceType, at /builds/worker/checkouts/gecko/widget/gtk/nsUserIdleServiceGTK.cpp:241

Categories

(Core :: Widget: Gtk, defect)

defect

Tracking

()

RESOLVED DUPLICATE of bug 1850968
Tracking Status
firefox119 --- affected

People

(Reporter: tsmith, Unassigned)

References

(Blocks 1 open bug)

Details

(Keywords: assertion, Whiteboard: [fuzzblocker])

Found while fuzzing m-c 20230912-fc9333c3b9f7 (--enable-debug --enable-fuzzing)

This issue just started pouring in. I am waiting for the reducer to complete before attaching a test case.

Assertion failure: !mIdleServiceType, at /builds/worker/checkouts/gecko/widget/gtk/nsUserIdleServiceGTK.cpp:241

#0 0x7f1226c1312a in nsUserIdleServiceGTK::ProbeService() /builds/worker/checkouts/gecko/widget/gtk/nsUserIdleServiceGTK.cpp:241:3
#1 0x7f1226c14c96 in operator() /builds/worker/checkouts/gecko/widget/gtk/nsUserIdleServiceGTK.cpp:217:24
#2 0x7f1226c14c96 in InvokeMethod<(lambda at /builds/worker/checkouts/gecko/widget/gtk/nsUserIdleServiceGTK.cpp:215:13), void ((lambda at /builds/worker/checkouts/gecko/widget/gtk/nsUserIdleServiceGTK.cpp:215:13)::*)(mozilla::UniquePtr<_GError, mozilla::GFreeDeleter> &&) const, mozilla::UniquePtr<_GError, mozilla::GFreeDeleter> > /builds/worker/workspace/obj-build/dist/include/mozilla/MozPromise.h:654:12
#3 0x7f1226c14c96 in InvokeCallbackMethod<false, (lambda at /builds/worker/checkouts/gecko/widget/gtk/nsUserIdleServiceGTK.cpp:215:13), void ((lambda at /builds/worker/checkouts/gecko/widget/gtk/nsUserIdleServiceGTK.cpp:215:13)::*)(mozilla::UniquePtr<_GError, mozilla::GFreeDeleter> &&) const, mozilla::UniquePtr<_GError, mozilla::GFreeDeleter>, RefPtr<mozilla::MozPromise<RefPtr<_GDBusProxy>, mozilla::UniquePtr<_GError, mozilla::GFreeDeleter>, true>::Private> > /builds/worker/workspace/obj-build/dist/include/mozilla/MozPromise.h:685:5
#4 0x7f1226c14c96 in mozilla::MozPromise<RefPtr<_GDBusProxy>, mozilla::UniquePtr<_GError, mozilla::GFreeDeleter>, true>::ThenValue<UserIdleServiceMutter::ProbeImplementation(RefPtr<nsUserIdleServiceGTK>)::'lambda'(RefPtr<_GDBusProxy>&&), UserIdleServiceMutter::ProbeImplementation(RefPtr<nsUserIdleServiceGTK>)::'lambda'(mozilla::UniquePtr<_GError, mozilla::GFreeDeleter>&&)>::DoResolveOrRejectInternal(mozilla::MozPromise<RefPtr<_GDBusProxy>, mozilla::UniquePtr<_GError, mozilla::GFreeDeleter>, true>::ResolveOrRejectValue&) /builds/worker/workspace/obj-build/dist/include/mozilla/MozPromise.h:874:9
#5 0x7f1226bc02b3 in mozilla::MozPromise<RefPtr<_GDBusProxy>, mozilla::UniquePtr<_GError, mozilla::GFreeDeleter>, true>::ThenValueBase::ResolveOrRejectRunnable::Run() /builds/worker/workspace/obj-build/dist/include/mozilla/MozPromise.h:490:21
#6 0x7f12214c0d07 in mozilla::RunnableTask::Run() /builds/worker/checkouts/gecko/xpcom/threads/TaskController.cpp:559:16
#7 0x7f12214b8883 in mozilla::TaskController::DoExecuteNextTaskOnlyMainThreadInternal(mozilla::detail::BaseAutoLock<mozilla::Mutex&> const&) /builds/worker/checkouts/gecko/xpcom/threads/TaskController.cpp:886:26
#8 0x7f12214b70d7 in mozilla::TaskController::ExecuteNextTaskOnlyMainThreadInternal(mozilla::detail::BaseAutoLock<mozilla::Mutex&> const&) /builds/worker/checkouts/gecko/xpcom/threads/TaskController.cpp:709:15
#9 0x7f12214b7535 in mozilla::TaskController::ProcessPendingMTTask(bool) /builds/worker/checkouts/gecko/xpcom/threads/TaskController.cpp:495:36
#10 0x7f12214c4a26 in operator() /builds/worker/checkouts/gecko/xpcom/threads/TaskController.cpp:218:37
#11 0x7f12214c4a26 in mozilla::detail::RunnableFunction<mozilla::TaskController::TaskController()::$_0>::Run() /builds/worker/checkouts/gecko/xpcom/threads/nsThreadUtils.h:548:5
#12 0x7f12214db24a in nsThread::ProcessNextEvent(bool, bool*) /builds/worker/checkouts/gecko/xpcom/threads/nsThread.cpp:1199:16
#13 0x7f12214e213d in NS_ProcessNextEvent(nsIThread*, bool) /builds/worker/checkouts/gecko/xpcom/threads/nsThreadUtils.cpp:480:10
#14 0x7f12221967a5 in mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*) /builds/worker/checkouts/gecko/ipc/glue/MessagePump.cpp:85:21
#15 0x7f12220b1781 in RunHandler /builds/worker/checkouts/gecko/ipc/chromium/src/base/message_loop.cc:363:3
#16 0x7f12220b1781 in MessageLoop::Run() /builds/worker/checkouts/gecko/ipc/chromium/src/base/message_loop.cc:345:3
#17 0x7f1226b28d48 in nsBaseAppShell::Run() /builds/worker/checkouts/gecko/widget/nsBaseAppShell.cpp:148:27
#18 0x7f1228be11d4 in nsAppStartup::Run() /builds/worker/checkouts/gecko/toolkit/components/startup/nsAppStartup.cpp:295:30
#19 0x7f1228d430d5 in XREMain::XRE_mainRun() /builds/worker/checkouts/gecko/toolkit/xre/nsAppRunner.cpp:5683:22
#20 0x7f1228d44842 in XREMain::XRE_main(int, char**, mozilla::BootstrapConfig const&) /builds/worker/checkouts/gecko/toolkit/xre/nsAppRunner.cpp:5884:8
#21 0x7f1228d45462 in XRE_main(int, char**, mozilla::BootstrapConfig const&) /builds/worker/checkouts/gecko/toolkit/xre/nsAppRunner.cpp:5940:21
#22 0x5576e9041837 in do_main /builds/worker/checkouts/gecko/browser/app/nsBrowserApp.cpp:227:22
#23 0x5576e9041837 in main /builds/worker/checkouts/gecko/browser/app/nsBrowserApp.cpp:445:16
#24 0x7f1235930d8f in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16
#25 0x7f1235930e3f in __libc_start_main csu/../csu/libc-start.c:392:3
#26 0x5576e9018bc8 in _start (/home/worker/builds/m-c-20230912211753-fuzzing-debug/firefox-bin+0x58bc8) (BuildId: 18ed6e2baa6cee46cc9e646f82160b960a61ce50)

I see very similar issue on Solaris:

Assertion failure: !mIdleServiceType, at /builds/psumbera/mozilla-central-build/widget/gtk/nsUserIdleServiceGTK.cpp:241
#01: nsUserIdleServiceGTK::ProbeService()[/builds/psumbera/mozilla-central-build/INSTALLED/lib/firefox/libxul.so +0x1ee0d7f0]
#02: nsUserIdleServiceGTK::RejectAndTryNextServiceCallback()[/builds/psumbera/mozilla-central-build/INSTALLED/lib/firefox/libxul.so +0x1ee0db1f]
#03: UserIdleServiceMutter::ProbeImplementation(RefPtr<nsUserIdleServiceGTK>)::{lambda(mozilla::UniquePtr<_GError, mozilla::GFreeDeleter>&&)#2}::operator()(mozilla::UniquePtr<_GError, mozilla::GFreeDeleter>&&) const[/builds/psumbera/mozilla-central-build/INSTALLED/lib/firefox/libxul.so +0x1ee136a8]
#04: std::enable_if<std::integral_constant<bool, mozilla::detail::MethodTrait<void (UserIdleServiceMutter::ProbeImplementation(RefPtr<nsUserIdleServiceGTK>)::{lambda(mozilla::UniquePtr<_GError, mozilla::GFreeDeleter>&&)#2}::*)(mozilla::UniquePtr<_GError, mozil[/builds/psumbera/mozilla-central-build/INSTALLED/lib/firefox/libxul.so +0x1ee1a04f]
#05: std::enable_if<!(false), void>::type mozilla::MozPromise<RefPtr<_GDBusProxy>, mozilla::UniquePtr<_GError, mozilla::GFreeDeleter>, true>::InvokeCallbackMethod<false, UserIdleServiceMutter::ProbeImplementation(RefPtr<nsUserIdleServiceGTK>)::{lambda(mozilla:[/builds/psumbera/mozilla-central-build/INSTALLED/lib/firefox/libxul.so +0x1ee19e20]
#06: mozilla::MozPromise<RefPtr<_GDBusProxy>, mozilla::UniquePtr<_GError, mozilla::GFreeDeleter>, true>::ThenValue<UserIdleServiceMutter::ProbeImplementation(RefPtr<nsUserIdleServiceGTK>)::{lambda(RefPtr<_GDBusProxy>&&)#1}, UserIdleServiceMutter::ProbeImplemen[/builds/psumbera/mozilla-central-build/INSTALLED/lib/firefox/libxul.so +0x1ee19a91]
#07: mozilla::MozPromise<RefPtr<_GDBusProxy>, mozilla::UniquePtr<_GError, mozilla::GFreeDeleter>, true>::ThenValueBase::DoResolveOrReject(mozilla::MozPromise<RefPtr<_GDBusProxy>, mozilla::UniquePtr<_GError, mozilla::GFreeDeleter>, true>::ResolveOrRejectValue&)[/builds/psumbera/mozilla-central-build/INSTALLED/lib/firefox/libxul.so +0x1edb8589]
#08: mozilla::MozPromise<RefPtr<_GDBusProxy>, mozilla::UniquePtr<_GError, mozilla::GFreeDeleter>, true>::ThenValueBase::ResolveOrRejectRunnable::Run()[/builds/psumbera/mozilla-central-build/INSTALLED/lib/firefox/libxul.so +0x1edb7e8a]
#09: mozilla::RunnableTask::Run()[/builds/psumbera/mozilla-central-build/INSTALLED/lib/firefox/libxul.so +0x18ebe7e7]
#10: mozilla::TaskController::DoExecuteNextTaskOnlyMainThreadInternal(mozilla::detail::BaseAutoLock<mozilla::Mutex&> const&)[/builds/psumbera/mozilla-central-build/INSTALLED/lib/firefox/libxul.so +0x18eb44e2]
#11: mozilla::TaskController::ExecuteNextTaskOnlyMainThreadInternal(mozilla::detail::BaseAutoLock<mozilla::Mutex&> const&)[/builds/psumbera/mozilla-central-build/INSTALLED/lib/firefox/libxul.so +0x18eb3909]
#12: mozilla::TaskController::ProcessPendingMTTask(bool)[/builds/psumbera/mozilla-central-build/INSTALLED/lib/firefox/libxul.so +0x18eb2d99]
#13: mozilla::TaskController::TaskController()::{lambda()#1}::operator()() const[/builds/psumbera/mozilla-central-build/INSTALLED/lib/firefox/libxul.so +0x18eb1a28]
#14: mozilla::detail::RunnableFunction<mozilla::TaskController::TaskController()::{lambda()#1}>::Run()[/builds/psumbera/mozilla-central-build/INSTALLED/lib/firefox/libxul.so +0x18eb98be]
#15: nsThread::ProcessNextEvent(bool, bool*)[/builds/psumbera/mozilla-central-build/INSTALLED/lib/firefox/libxul.so +0x18ee7f61]
#16: NS_ProcessNextEvent(nsIThread*, bool)[/builds/psumbera/mozilla-central-build/INSTALLED/lib/firefox/libxul.so +0x18ef1dfc]
#17: mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*)[/builds/psumbera/mozilla-central-build/INSTALLED/lib/firefox/libxul.so +0x19d55e16]
#18: MessageLoop::RunInternal()[/builds/psumbera/mozilla-central-build/INSTALLED/lib/firefox/libxul.so +0x19c8dd07]
#19: MessageLoop::RunHandler()[/builds/psumbera/mozilla-central-build/INSTALLED/lib/firefox/libxul.so +0x19c8dc8a]
#20: MessageLoop::Run()[/builds/psumbera/mozilla-central-build/INSTALLED/lib/firefox/libxul.so +0x19c8dc4f]
#21: nsBaseAppShell::Run()[/builds/psumbera/mozilla-central-build/INSTALLED/lib/firefox/libxul.so +0x1ecd8e50]
#22: nsAppStartup::Run()[/builds/psumbera/mozilla-central-build/INSTALLED/lib/firefox/libxul.so +0x21de1388]
#23: XREMain::XRE_mainRun()[/builds/psumbera/mozilla-central-build/INSTALLED/lib/firefox/libxul.so +0x21fc3d15]
#24: XREMain::XRE_main(int, char**, mozilla::BootstrapConfig const&)[/builds/psumbera/mozilla-central-build/INSTALLED/lib/firefox/libxul.so +0x21fc49f1]
#25: XRE_main(int, char**, mozilla::BootstrapConfig const&)[/builds/psumbera/mozilla-central-build/INSTALLED/lib/firefox/libxul.so +0x21fc4bea]
#26: mozilla::BootstrapImpl::XRE_main(int, char**, mozilla::BootstrapConfig const&)[/builds/psumbera/mozilla-central-build/INSTALLED/lib/firefox/libxul.so +0x21fdf7c4]
#27: do_main(int, char**, char**)[/builds/psumbera/mozilla-central-build/INSTALLED/lib/firefox/firefox +0xa2d7b]
#28: main[/builds/psumbera/mozilla-central-build/INSTALLED/lib/firefox/firefox +0xa3124]
#29: _start[/builds/psumbera/mozilla-central-build/INSTALLED/lib/firefox/firefox +0xa1f33]

The first bad revision is:
changeset: 677453:2e2360c55e7b
user: stransky <[email protected]>
date: Tue Sep 12 00:29:19 2023 -0700
description:
Bug 1850968 [Linux] Don't ref/unref nsUserIdleServiceGTK in its constructor r=emilio

Patch added to Bug 1850968.

Status: NEW → RESOLVED
Closed: 9 months ago
Duplicate of bug: 1850968
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.