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 780254 - Fix typo in update_context_styles which may result in an infinite loop
Fix typo in update_context_styles which may result in an infinite loop
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: general
3.20.x
Other Linux
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks:
 
 
Reported: 2017-03-19 00:58 UTC by Shantanu Goel
Modified: 2017-04-10 09:12 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix for loop assignment in update_style_contexts (553 bytes, patch)
2017-03-19 00:58 UTC, Shantanu Goel
accepted-commit_after_freeze Details | Review
gnome-shell stack trace (8.20 KB, text/plain)
2017-03-19 01:00 UTC, Shantanu Goel
  Details
Git formatted version of patch (1.36 KB, patch)
2017-03-19 01:20 UTC, Shantanu Goel
committed Details | Review

Description Shantanu Goel 2017-03-19 00:58:55 UTC
Created attachment 348241 [details] [review]
Fix for loop assignment in update_style_contexts

Recently I have had several instances where gnome-shell becomes completely unresponsive while consuming 100% cpu due to an infinite loop.  Examining the attached stack trace suggests it might be hitting the bug documented here:

https://github.com/linuxmint/Cinnamon/issues/5254

The thread above points to the following patch which seems not to have been reported upstream and still applies to Gnome 3.20.3 which I am using on Fedora 24.

https://github.com/linuxmint/muffin/commit/6120bddefd709d3f1611aa2af706fb3c43b5ae22

I have attached a shorter version of the patch that simply fixes the offending assignment in the for loop without changing the variable name as the Mint patch does.

The patched Mutter has been running on my machine for less than a day so I can't say for sure if it is the sole cause of my gnome-shell problem but the current code looks broken so please consider including the Mint version of the patch or mine in a future release.

Thanks
Comment 1 Shantanu Goel 2017-03-19 01:00:21 UTC
Created attachment 348242 [details]
gnome-shell stack trace
Comment 2 Florian Müllner 2017-03-19 01:05:26 UTC
Review of attachment 348241 [details] [review]:

Whoops, thanks!

Please use git-format-patch to include a commit message and proper attribution, otherwise LGTM
Comment 3 Shantanu Goel 2017-03-19 01:20:16 UTC
Created attachment 348243 [details] [review]
Git formatted version of patch
Comment 4 Shantanu Goel 2017-03-19 01:21:03 UTC
Hi Florian, I have resubmitted the patch generated with git format-patch.  Let me know if it looks acceptable now.
Comment 5 Florian Müllner 2017-03-19 01:43:59 UTC
Review of attachment 348243 [details] [review]:

Style nit:
"frames: Use ..."

No need to attach another version of the patch, but note that we are currently in hard-code freeze. So unless you want to ask the release team for an exception, this patch will have to wait until 3.24.0 is released next week.
Comment 6 Shantanu Goel 2017-03-19 01:50:35 UTC
I will only know after a few days of uptime if this bug is the sole cause of gnome-shell going into an infinite loop so I do not think an exception is necessary if the release is scheduled for next week.
Comment 7 Shantanu Goel 2017-03-26 15:13:34 UTC
I have not a recurrence of gnome-shell going into an infinite loop since I applied the patch 8 days ago.
Comment 8 Florian Müllner 2017-03-26 16:07:33 UTC
We are no longer in hard code freeze, so please push!
Comment 9 Florian Müllner 2017-04-04 18:11:15 UTC
Pushing the patch to make sure it gets into 3.24.1.
Comment 10 Jonas Ådahl 2017-04-10 09:12:03 UTC
*** Bug 769090 has been marked as a duplicate of this bug. ***