Closed Bug 1730537 Opened 3 years ago Closed 10 months ago

Frequent assertion failure related to MPRIS when running tests

Categories

(Core :: Audio/Video: Playback, defect, P3)

defect

Tracking

()

RESOLVED FIXED

People

(Reporter: padenot, Assigned: alwu)

References

Details

Attachments

(3 files)

Stack:

    0:45.34 GECKO(460964) Assertion failure: mInitialized, at /home/padenot/src/trees/mozilla-unified/widget/gtk/MPRISServiceHandler.cpp:378
    Initializing stack-fixing for the first stack frame, this may take a while...
     0:59.77 GECKO(460964) #01: mozilla::widget::MPRISServiceHandler::Identity() const [/home/padenot/src/trees/mozilla-unified/widget/gtk/MPRISServiceHandler.cpp:378]
     0:59.77 GECKO(460964) #02: mozilla::widget::HandleGetProperty(_GDBusConnection*, char const*, char const*, char const*, char const*, _GError**, void*) [/home/padenot/src/trees/mozilla-unified/widget/gtk/MPRISServiceHandler.cpp:166]
     0:59.77 GECKO(460964) #03: ??? [/usr/lib/x86_64-linux-gnu/libgio-2.0.so.0 + 0x10efd6]
     0:59.77 GECKO(460964) #04: g_main_context_dispatch [/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0 + 0x5204e]
     0:59.77 GECKO(460964) #05: ??? [/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0 + 0x52400]
     0:59.77 GECKO(460964) #06: g_main_context_iteration [/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0 + 0x524a3]
     0:59.77 GECKO(460964) #07: nsAppShell::ProcessNextNativeEvent(bool) [/home/padenot/src/trees/mozilla-unified/widget/gtk/nsAppShell.cpp:247]
     0:59.77 GECKO(460964) #08: nsBaseAppShell::DoProcessNextNativeEvent(bool) [/home/padenot/src/trees/mozilla-unified/widget/nsBaseAppShell.cpp:120]
     0:59.77 GECKO(460964) #09: nsBaseAppShell::OnProcessNextEvent(nsIThreadInternal*, bool) [/home/padenot/src/trees/mozilla-unified/widget/nsBaseAppShell.cpp:242]
     0:59.77 GECKO(460964) #10: nsThread::ProcessNextEvent(bool, bool*) [/home/padenot/src/trees/mozilla-unified/xpcom/threads/nsThread.cpp:1067]
     0:59.77 GECKO(460964) #11: NS_ProcessNextEvent(nsIThread*, bool) [/home/padenot/src/trees/mozilla-unified/xpcom/threads/nsThreadUtils.cpp:466]
     0:59.77 GECKO(460964) #12: mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*) [/home/padenot/src/trees/mozilla-unified/ipc/glue/MessagePump.cpp:85]
     0:59.77 GECKO(460964) #13: MessageLoop::RunInternal() [/home/padenot/src/trees/mozilla-unified/ipc/chromium/src/base/message_loop.cc:331]
     0:59.77 GECKO(460964) #14: MessageLoop::RunHandler() [/home/padenot/src/trees/mozilla-unified/ipc/chromium/src/base/message_loop.cc:325]
     0:59.77 GECKO(460964) #15: MessageLoop::Run() [/home/padenot/src/trees/mozilla-unified/ipc/chromium/src/base/message_loop.cc:306]
     0:59.77 GECKO(460964) #16: nsBaseAppShell::Run() [/home/padenot/src/trees/mozilla-unified/widget/nsBaseAppShell.cpp:139]
     0:59.77 GECKO(460964) #17: nsAppStartup::Run() [/home/padenot/src/trees/mozilla-unified/toolkit/components/startup/nsAppStartup.cpp:284]
     0:59.77 GECKO(460964) #18: XREMain::XRE_mainRun() [/home/padenot/src/trees/mozilla-unified/toolkit/xre/nsAppRunner.cpp:5287]
     0:59.77 GECKO(460964) #19: XREMain::XRE_main(int, char**, mozilla::BootstrapConfig const&) [/home/padenot/src/trees/mozilla-unified/toolkit/xre/nsAppRunner.cpp:5479]
     0:59.77 GECKO(460964) #20: XRE_main(int, char**, mozilla::BootstrapConfig const&) [/home/padenot/src/trees/mozilla-unified/toolkit/xre/nsAppRunner.cpp:5538]
     0:59.77 GECKO(460964) #21: mozilla::BootstrapImpl::XRE_main(int, char**, mozilla::BootstrapConfig const&) [/home/padenot/src/trees/mozilla-unified/toolkit/xre/Bootstrap.cpp:45]
     0:59.86 GECKO(460964) #22: do_main(int, char**, char**) [/home/padenot/src/trees/mozilla-unified/browser/app/nsBrowserApp.cpp:225]
     0:59.86 GECKO(460964) #23: main [/home/padenot/src/trees/mozilla-unified/browser/app/nsBrowserApp.cpp:378]
     0:59.86 GECKO(460964) #24: __libc_start_main [/lib/x86_64-linux-gnu/libc.so.6 + 0x270b3]
     0:59.86 GECKO(460964) #25: ??? [/home/padenot/src/trees/mozilla-unified/objdir-debug/dist/bin/firefox + 0x84d79]
     0:59.86 GECKO(460964) #26: ??? (???:???)

Changing severity to S4 because it's a rare seen assertion failure.

Severity: -- → S4
Priority: -- → P3

I hit it frequently when running tests sometimes. It seems like the code is not robust against DBUS connection error.

Would you mind to help me capture the log by using MOZ_LOG=MediaControl:5? Thanks!

Flags: needinfo?(padenot)

I managed to reproduce, but not in rr unfortunately.

I'm running Ubuntu 20.04.2 LTS with the gnome-shell desktop fwiw, and nothing weird on this machine (pretty standard installation and everything). This seem to work well otherwise, see the screenshot.

I can reproduce very easily, let me know if you need anything.

Flags: needinfo?(padenot) → needinfo?(alwu)

From the log, GLib-GIO-CRITICAL **: 13:56:50.079: g_dbus_connection_unregister_object: assertion 'G_IS_DBUS_CONNECTION (connection)' failed it seems we failed to unlink the callback when closing MPRIS handler, so the callback is still possible be triggered later, which hits the assertion of non-initialized because we already reset the flag when closing MPRIS handler.

Assignee: nobody → alwu
Flags: needinfo?(alwu)

The weird thing is that OnNameAcquired never got called before, by checking the documentation the situation we encountered seems the second one (bus_acquired_handler then name_lost_handler (if the name can't be obtained))

Summary: Rare assertion failure related to MPRIS when running `test_accumulated_play_time.html` → Frequent assertion failure related to MPRIS when running tests

This still happens on Ubuntu 22.04, which is recent (I used to be on an old OS). I'm downgrading this to a non-fatal assert.

Keywords: leave-open
Pushed by padenot@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c8724f18160d
Downgrade a debug assertion in MRPIS code to non-fatal because it's too frequent locally. r=alwu

The leave-open keyword is there and there is no activity for 6 months.
:alwu, maybe it's time to close this bug?
For more information, please visit auto_nag documentation.

Flags: needinfo?(alwu)

We should file a new bug if this warning still shows a lot.

Status: NEW → RESOLVED
Closed: 10 months ago
Flags: needinfo?(alwu)
Keywords: leave-open
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: