Bug 460625 - Firefox Nightly 107.0a1 crash in mozilla::widget::nsWaylandDisplay::nsWaylandDisplay in Plasma on Wayland with a failed assertion GetSubcompositor()) (We're missing subcompositor interface!)
Summary: Firefox Nightly 107.0a1 crash in mozilla::widget::nsWaylandDisplay::nsWayland...
Status: RESOLVED DOWNSTREAM
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (other bugs)
Version First Reported In: 5.25.5
Platform: Other Linux
: NOR crash
Target Milestone: ---
Assignee: KWin default assignee
URL: https://bugzilla.mozilla.org/show_bug...
Keywords:
Depends on:
Blocks:
 
Reported: 2022-10-17 21:03 UTC by Matt Fagnani
Modified: 2022-10-18 07:29 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
Wayland debug log for crash of Firefox Nightly 107.0a1 20221017035343 on Wayland (277.99 KB, text/plain)
2022-10-17 23:32 UTC, Matt Fagnani
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Fagnani 2022-10-17 21:03:58 UTC
SUMMARY

I started Firefox 107.0a1 20221014215500 to 20221017035343 on Wayland with WebRender compositing in Plasma 5.25.5 in a Fedora 37 KDE Plasma installation. I had previously enabled the menu bar. I clicked on Help in the menu bar right after Firefox appeared. Firefox crashed before the Help menu appeared. The crash reason was MOZ_DIAGNOSTIC_ASSERT(GetSubcompositor()) (We're missing subcompositor interface!) which was added for https://bugzilla.mozilla.org/show_bug.cgi?id=1794284 in the patch https://hg.mozilla.org/integration/autoland/rev/42708fc2f7e5 

I've seen three crashes with this failed assertion. Two crashes were when I clicked on Help in the menu bar right after Firefox started, and one was when I clicked on Bookmarks the menu bar right after it started. This problem is infrequent. Reproducing it would require clicking on the menu bar right after Firefox was started many times.

Crash report: https://crash-stats.mozilla.org/report/index/a61b3d39-cc6c-4ab4-bc24-ed98b0221015

MOZ_CRASH Reason: MOZ_DIAGNOSTIC_ASSERT(GetSubcompositor()) (We're missing subcompositor interface!)

Top 10 frames of crashing thread:

0 libxul.so mozilla::widget::nsWaylandDisplay::nsWaylandDisplay widget/gtk/nsWaylandDisplay.cpp:303
1 libxul.so mozilla::widget::WaylandDisplayGet widget/gtk/nsWaylandDisplay.cpp:71
2 libxul.so mozilla::widget::WaylandBufferSHM::Create widget/gtk/WaylandBuffer.cpp:196
3 libxul.so mozilla::widget::WindowSurfaceWaylandMB::ObtainBufferFromPool widget/gtk/WindowSurfaceWaylandMultiBuffer.cpp:331
4 libxul.so mozilla::widget::WindowSurfaceWaylandMB::Lock widget/gtk/WindowSurfaceWaylandMultiBuffer.cpp:199
5 libxul.so mozilla::widget::WindowSurfaceProvider::StartRemoteDrawingInRegion widget/gtk/WindowSurfaceProvider.cpp:147
6 libxul.so mozilla::wr::RenderCompositorSWGL::AllocateMappedBuffer gfx/webrender_bindings/RenderCompositorSWGL.cpp:73
7 libxul.so mozilla::wr::RenderCompositorSWGL::StartCompositing gfx/webrender_bindings/RenderCompositorSWGL.cpp:186
8 libxul.so <webrender::compositor::sw_compositor::SwCompositor as webrender::composite::Compositor>::start_compositing gfx/wr/webrender/src/compositor/sw_compositor.rs:1430
9 libxul.so webrender::renderer::<impl webrender::composite::CompositeState>::composite_native gfx/wr/webrender/src/renderer/mod.rs:5721

STEPS TO REPRODUCE
1. Boot a Fedora 37 KDE Plasma installation updated to 2022-10-17 with the updates-testing repo enabled
2. Log in to Plasma 5.25.5 on Wayland from sddm
3. Download Firefox Nightly 107.0a1 20221017035343 https://www.mozilla.org/en-US/firefox/all/#product-desktop-nightly
4. Extract the Firefox Nightly file
5. Run Firefox Nightly 107.0a1 20221017035343 on Wayland
6. Right click to the right of the address bar
7. Enable the menu bar.
8. Close Firefox
9 Run Firefox Nightly 107.0a1 20221017035343 on Wayland
10. Click on Help in the menu bar right after Firefox appears
11. If Firefox didn't crash, close Firefox
12. Repeat 9 to 10 until the crash happens.

OBSERVED RESULT
Firefox Nightly 107.0a1 crash in mozilla::widget::nsWaylandDisplay::nsWaylandDisplay in Plasma on Wayland with a failed assertion GetSubcompositor()) (We're missing subcompositor interface!)

EXPECTED RESULT
Firefox wouldn't crash

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Fedora 37
(available in About System)
KDE Plasma Version: 5.25.5
KDE Frameworks Version: 5.98.0
Qt Version: 5.15.6

ADDITIONAL INFORMATION

Martin Stránský wrote "This looks like a bug in KDE Wayland compositor. " at https://bugzilla.mozilla.org/show_bug.cgi?id=1795561#c2 where I first reported this crash so I'm reporting the problem against kwin.
Comment 1 David Edmundson 2022-10-17 21:34:45 UTC
Can you get a WAYLAND_DEBUG=1 firefox log.

We definitely should be advertising subcompositor immediately.
Comment 2 Bug Janitor Service 2022-10-17 21:34:51 UTC
Thank you for the bug report!

Please note that Plasma 5.25.5 is not supported for much longer by KDE; supported versions are 5.24, and 5.26 or newer.

If at all possible please upgrade to a supported version and verify that the bug is still happening there.
Comment 3 Matt Fagnani 2022-10-17 23:32:10 UTC
Created attachment 152977 [details]
Wayland debug log for crash of Firefox Nightly 107.0a1 20221017035343 on Wayland

I ran Firefox Nightly 107.0a1 20221017035343 on Wayland repeatedly with WAYLAND_DEBUG=1 ~/programs/firefox/firefox & in Konsole in Plasma 5.25.5. Firefox crashed on the 13th run when I clicked on Help in the menu bar right after it started. I'm attaching the Wayland debug log from the run with the crash which contains lines at its end from when the Firefox Crash Reporter was shown. I'm unsure exactly where in the log the crash happened.
Comment 4 Matt Fagnani 2022-10-17 23:56:30 UTC
The steps to reproduce should have had 12. Repeat 9 to 11 until the crash happens. I guess the crash happened around the following lines in Wayland debug log I attached due to the error messages at the end.

[ 859676.772] wl_registry@80.global(1, "wl_compositor", 5)
[ 859676.855]  -> wl_registry@80.bind(1, "wl_compositor", 4, new id [unknown]@79)
[ 859676.880] wl_registry@80.global(2, "zwp_tablet_manager_v2", 1)
[ 859676.900] wl_registry@80.global(3, "zwp_keyboard_shortcuts_inhibit_manager_v1", 1)
[ 859676.919] wl_registry@80.global(5, "xdg_wm_base", 4)
[ 859676.937] wl_registry@80.global(6, "zwlr_layer_shell_v1", 3)
[ 859676.955] wl_registry@80.global(7, "zxdg_decoration_manager_v1", 1)
[ 859676.972] wl_registry@80.global(8, "wp_viewporter", 1)
[ 859676.990]  -> wl_registry@80.bind(8, "wp_viewporter", 1, new id [unknown]@78)
[ 859677.008] wl_registry@80.global(9, "wl_shm", 1)
[ 859677.128]  -> wl_registry@80.bind(9, "wl_shm", 1, new id [unknown]@72)
[ 859677.149] wl_registry@80.global(10, "wl_seat", 7)
[ 859677.161] wl_registry@80.global(11, "zwp_pointer_gestures_v1", 3)
[ 859677.172] wl_registry@80.global(12, "zwp_pointer_constraints_v1", 1)
[ 859677.184]  -> wl_registry@80.bind(12, "zwp_pointer_constraints_v1", 1, new id [unknown]@82)
[ 859677.197] wl_registry@80.global(13, "zwp_relative_pointer_manager_v1", 1)
[ 859677.208]  -> wl_registry@80.bind(13, "zwp_relative_pointer_manager_v1", 1, new id [unknown]@83)
[ 859677.226] wl_registry@80.global(14, "wl_data_device_manager", 3)
[ 859677.245] wl_registry@80.global(15, "zwlr_data_control_manager_v1", 2)
[ 859677.275] wl_registry@80.global(16, "zwp_primary_selection_device_manager_v1", 1)
[ 859677.341]  -> wl_display@1.sync(new id wl_callback@84)
[ 859677.555] wl_display@1.delete_id(84)
[ 859677.598] wl_callback@84.done(1442)
[ 859677.626]  -> wl_display@1.sync(new id wl_callback@84)
[ 859677.718] wl_display@1.delete_id(84)
[ 859677.743] wl_callback@84.done(1442)
[ 859677.293] wl_registry@80.global(17, "org_kde_kwin_idle", 1)
[ 859678.102] discarded wl_registry@80.global(18, "zwp_idle_inhibit_manager_v1", 1)
[ 859678.126] discarded wl_registry@80.global(19, "org_kde_plasma_shell", 7)
[ 859678.141] discarded wl_registry@80.global(20, "org_kde_kwin_appmenu_manager", 1)
[ 859678.154] discarded wl_registry@80.global(21, "org_kde_kwin_server_decoration_palette_manager", 1)
[ 859678.167] discarded wl_registry@80.global(23, "org_kde_plasma_virtual_desktop_management", 2)
[ 859678.180] discarded wl_registry@80.global(25, "org_kde_kwin_shadow_manager", 2)
[ 859678.192] discarded wl_registry@80.global(26, "org_kde_kwin_dpms_manager", 1)
[ 859678.204] discarded wl_registry@80.global(27, "org_kde_kwin_server_decoration_manager", 1)
[ 859678.214] discarded wl_registry@80.global(28, "kde_output_management_v2", 2)
[ 859678.225] discarded wl_registry@80.global(29, "kde_primary_output_v1", 2)
[ 859678.235] discarded wl_registry@80.global(30, "zxdg_output_manager_v1", 3)
[ 859678.247] discarded wl_registry@80.global(31, "wl_subcompositor", 1)
[ 859678.258] discarded wl_registry@80.global(32, "zxdg_exporter_v2", 1)
[ 859678.268] discarded wl_registry@80.global(33, "zxdg_importer_v2", 1)
[ 859678.279] discarded wl_registry@80.global(35, "xdg_activation_v1", 1)
[ 859678.285] discarded wl_registry@80.global(36, "wp_drm_lease_device_v1", 1)
[ 859678.295] discarded wl_registry@80.global(39, "wl_drm", 2)
[ 859678.308] discarded wl_registry@80.global(40, "zwp_linux_dmabuf_v1", 4)
[ 859678.320] discarded wl_registry@80.global(41, "kde_output_device_v2", 2)
[ 859678.330] discarded wl_registry@80.global(42, "wl_output", 3)
[ 859678.340] discarded wl_registry@80.global(44, "zwp_text_input_manager_v2", 1)
[ 859678.352] discarded wl_registry@80.global(45, "zwp_text_input_manager_v3", 1)
[ 859678.363] discarded wl_registry@80.global(46, "org_kde_kwin_contrast_manager", 2)
[ 859678.374] discarded wl_registry@80.global(47, "org_kde_kwin_blur_manager", 1)
[ 859678.385] discarded wl_registry@80.global(48, "org_kde_kwin_slide_manager", 1)
ExceptionHandler::GenerateDump cloned child 10289
ExceptionHandler::SendContinueSignalToChild sent continue signal to child
ExceptionHandler::WaitForContinueSignal waiting for continue signal...
Comment 5 Vlad Zahorodnii 2022-10-18 07:29:21 UTC
Marking as a downstream bug https://bugzilla.mozilla.org/show_bug.cgi?id=1795561#c7 until it's proven that it's a server-side bug