Crash exiting fullscreen in Firefox under Wayland

See this Firefox bug report for details - investigation is still ongoing but multiple Firefox devs have suggested that this might be a bug in the Nvidia drivers:

[@ wlEglDestroyFormatSet] - Firefox 116.0.2 Crash Report - Report ID: fc09b7fc-8296-481b-85f4-6c0450230829
Martin, it looks like something is getting double-freed inside a wayland resize

To me this clearly looks like a bug in the Nvidia driver, a race condition.
If I read the stack right, the driver crashes because it handles updated linux dmabuf feedback tranches in the resize callback. The new tranch (without scanout tranch) is expected to get send when exiting fullscreen on Gnome, so that’s not a surprise.
The fact that it’s only observed so far with gfx.canvas.accelerated enabled is likely due to timing differences, as reallocating/resizing buffers on the GPU takes time.

Just a guess, but the driver calls function create_surface_context, indicating that it destroyed the old surface context - which may contained a reference to the format list to be destroyed in wlEglDestroyFormatSet, given that tranche data is surface related.

Not sure if any FF devs have reached out to the Nvidia Linux driver team about this yet, but as the person who filed and is experiencing this bug I thought I’d start a thread here in case other folks have been seeing it or have additional information.

I should mention that this continues to happen after upgrading from the 535.98 drivers to 535.104.05 drivers.

2 Likes

@jpleb
I have filed a bug 4289416 internally for tracking purpose.
I tried to duplicate issue on below setup but no luck so far.
Precision T7610 + Ubuntu 22.04 + Driver 535.104.05 + NVIDIA GeForce RTX 2070 + Wayland Protocol + firefox 116.0

Could you please share nvidia bug report so that I can try to match hardware and reattempt for local repro.

nvidia-bug-report.log.gz (459.8 KB)

Ah yes, sorry I hadn’t done that before with a report here. Let me know if that doesn’t work or you need any additional info. Thanks!

Just a “me too” report from Debian 13/Trixie, official binary 535.104.05, KDE Plasma, Wayland. Firefox randomly crashes when exiting full screen.

Happy to report that egl-wayland 1.1.13 fixes this for me. Anyone who’s upgraded to that still seeing this crash?