GNOME Bugzilla – Bug 741881
F21 Wayland Mode Change Crashes desktop
Last modified: 2015-01-30 15:22:28 UTC
Steps to Reproduce: 1. Log into Wayland version of desktop 2. Right click on desktop -> Settings 3. Pick a resolution and select Apply 4. gnome crashes FYI, my F21 is running inside of a VM (VMWare Fusion 7). I had to rebuild Xwayland to not use glamor otherwise some of the rendering will be incorrect, but this doesn't impact the crash. The crash happens in libgbm: mesa/src/gbm/backends/dri/gbm_dri.c In "image_get_buffers()", gbm_dri_device(surf->base.gbm) returns NULL. This causes "dri" to be NULL, and thus the crash in the subsequent line "if (dri->image_get_buffers == NULL)" The key sequence of events is this: cogl_kms_display_set_layout() ... gbm_surface_destroy(); // destroys current gbm_dri_surface, let's call it SF ... _clutter_stage_do_pick() cogl_framebuffer_clear4f() .... image_get_buffers(); <------- crash The reason why image_get_buffers() crashes is because gbm_dri_device(surf->base.gbm) still points to the same SF that has been freed earlier. Some times it's garbage, and we get away with it, but most of the time the relevant field is NULL, and we crash. I think somehow the new on-screen surface is not bound before _clutter_stage_do_pick() is called. ---------------------------------------------------------------------------
+ Trace 234442
I reported a similar trace in mesa's bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=85093
Thanks for the confirmation. FYI, adding a check for "dri == NULL" in image_get_buffers() fixes the problem for me, but I don't think that's the right approach. I think the problem started above MESA, probably in mutter.
Created attachment 295130 [details] [review] kms-winsys: Mark the framebuffer to be bound when setting a new layout -- This patch fixes it for me.
Verified the fix works.
The patch isn't pushed yet .. so leave that bug open until this happens.
Review of attachment 295130 [details] [review]: Tested-by: Sinclair Yeh <syeh@vmware.com>
Review of attachment 295130 [details] [review]: This looks good to me. Sorry I haven't tested it myself, but if you're happy that it's been tested, please feel free to land the patch.
Review: http://lists.freedesktop.org/archives/cogl/2015-January/001707.html Attachment 295130 [details] pushed as b9d6cf4 - kms-winsys: Mark the framebuffer to be bound when setting a new layout