After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 777691 - Be more resilient around inconsistent effect_completed calls
Be more resilient around inconsistent effect_completed calls
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks:
 
 
Reported: 2017-01-24 10:54 UTC by Carlos Garnacho
Modified: 2017-01-26 11:34 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
compositor: Avoid thaw on inconsistent effect_completed calls (2.84 KB, patch)
2017-01-24 10:54 UTC, Carlos Garnacho
committed Details | Review

Description Carlos Garnacho 2017-01-24 10:54:00 UTC
I'll try to do a reproducer, but I have a steam game here making gnome-shell abort on app startup most of the times, but not always. It looked like the fullscreening effect had some interaction with a real size change (?), which results on gnome-shell triggering effect completion twice. The gnome-shell side is still pending investigation, I however think mutter should avoid abort()s here.

In this case, I see meta_window_actor_effect_completed() checks for unpaired calls, and warn on the ongoing effect, I see this warning being hit:

g_warning ("Error in size change accounting.");

But right afterwards, the effect_completed() call will still try to thaw the window actor, whose accounting will be also off, and that leads to the more disruptive:

g_error ("Error in freeze/thaw accounting");

I think we should avoid at least the thaw() call if the effect_completed() call itself turned out inconsistent, a warning will already be issued hinting there's something off, so IMO there's no need to go head first to something we know will probably terminate the process.

I'm attaching a patch adding a boolean that is checked before the thaw() call, although perhaps we should just return and avoid the after_effects() call as well?
Comment 1 Carlos Garnacho 2017-01-24 10:54:33 UTC
Created attachment 344108 [details] [review]
compositor: Avoid thaw on inconsistent effect_completed calls

If the meta_window_actor_effect_completed() triggers inconsistent
accounting, there's also high chances that the thaw call will be
unexpected at this time too, which will lead to a g_error().

This makes mutter more lenient to effect_completed() calls of the
right type (i.e. those triggering freeze/thaw) being performed more
times than necessary in the upper parts. A warning will be issued,
but the process won't abort.
Comment 2 Rui Matos 2017-01-24 15:48:41 UTC
This is probably fallout from bug 770345, can you file a new bug to track that?
Comment 3 Rui Matos 2017-01-24 15:48:57 UTC
Review of attachment 344108 [details] [review]:

This seems sensible in any case
Comment 4 Carlos Garnacho 2017-01-26 11:29:56 UTC
Just filed bug #777784 for the gnome-shell side.
Comment 5 Carlos Garnacho 2017-01-26 11:34:19 UTC
Attachment 344108 [details] pushed as 2cd78bf - compositor: Avoid thaw on inconsistent effect_completed calls