GNOME Bugzilla – Bug 745785
Crash in meta_window_ungrab_all_keys()
Last modified: 2021-07-05 13:47:05 UTC
Several users have reported this crash on Fedora 21. It looks like it can be reproduced by doing Alt+Tab while in a VM in virt-manager. The common factor between several users may well be the high load, which may be triggering a race condition. https://bugzilla.redhat.com/show_bug.cgi?id=1144416
+ Trace 234797
Thread 1 (Thread 0x7fe8ef13fa40 (LWP 1730))
Created attachment 312785 [details] [review] Don't end the grab on a _NET_WM_MOVERESIZE_CANCEL unless there's a grab for the window This prevents crashes when _NET_WM_MOVERESIZE_CANCEL is received, but the grab in effect is a plugin grab with display->grab_window == NULL.
Created attachment 312786 [details] [review] Protect against stray calls to meta_display_end_grab_op() If end_grab_op() is called when no grab is in effect, just print a warning and return.
The problem is pretty clearly a window sending _NET_MOVERESIZE_CANCEL when a plugin grab (so display->grab_window == NULL) is in effect. Both of these patches should fix the crasher individually, I include both: - Because the first also avoids one window ending the grab op on another window - Because the second could avoid other crashes in the future I made the patches silent because meta_display_end_grab_op() has been silent on a stray end_grab_op since forever - but started crashing when a *plugin* grab is in effect when plugin grabs were introduced.
Great! Out of curiosity, what typically creates a plugin grab when using gnome-shell?
(In reply to Milan Bouchet-Valat from comment #4) > Great! Out of curiosity, what typically creates a plugin grab when using > gnome-shell? * The alt-Tab switcher (I think, we've done different things) * The activities overview * The screen lock * Modal dialogs etc.
Review of attachment 312786 [details] [review]: I like this one better.
Comment on attachment 312786 [details] [review] Protect against stray calls to meta_display_end_grab_op() I pushed the one patch (with a fixed up comment), but I think the other patch is correct as well, though it protects only against a rare misbehavior. Attachment 312786 [details] pushed as ae7aabd - Protect against stray calls to meta_display_end_grab_op()
Review of attachment 312785 [details] [review]: Well, we won't crash anymore, but it does make sense to double-check, just in case an app fires a stray end_grab_op while the user is grabbing another window.
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org. As part of that, we are mass-closing older open tickets in bugzilla.gnome.org which have not seen updates for a longer time (resources are unfortunately quite limited so not every ticket can get handled). If you can still reproduce the situation described in this ticket in a recent and supported software version, then please follow https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines and create a new ticket at https://gitlab.gnome.org/GNOME/mutter/-/issues/ Thank you for your understanding and your help.