[regression] Much higher CPU during some gnome-shell operations

Bug #1803271 reported by Daniel van Vugt
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gjs (Ubuntu)
Fix Released
Medium
Unassigned
Bionic
Fix Released
Medium
Marco Trevisan (Treviño)
Cosmic
Fix Released
Medium
Unassigned

Bug Description

[Impact]

Since fixing bug 1672297 in release 18.04 we experience much higher (almost double) CPU usage during gnome-shell JavaScript operations, such as the icon spring animation [1]. Even just moving the mouse is a little more expensive now [2].
[1] https://gitlab.gnome.org/GNOME/gnome-shell/issues/349
[2] https://gitlab.gnome.org/GNOME/mutter/issues/283

[Test Case]

Use 'top' to measure the CPU usage of the gnome-shell process while tapping Super+A repeatedly. It should be much lower with the fix than without.

[Regression Potential]

Low. This particular fix is tiny (https://gitlab.gnome.org/GNOME/gjs/merge_requests/236) and has been released and used in a couple of upstream gjs versions already without issue.

[Other Info]

The fix is already released to 19.04 as part of gjs version 1.54.2-1. And already released to 18.10 as part of gjs version 1.54.3-1~ubuntu18.10.1.

Related branches

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Also, the fix is already in 19.04 here:
https://launchpad.net/ubuntu/+source/gjs/1.54.2-1

Changed in gjs (Ubuntu):
status: New → Fix Released
tags: added: bionic cosmic disco
Changed in gjs (Ubuntu):
assignee: Daniel van Vugt (vanvugt) → nobody
description: updated
Changed in gjs (Ubuntu):
importance: High → Medium
description: updated
description: updated
description: updated
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Fix for cosmic attached.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Also the fix for bionic is coming, eventually:

https://gitlab.gnome.org/GNOME/gjs/merge_requests/256

Changed in gjs (Ubuntu Cosmic):
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Daniel van Vugt (vanvugt)
Changed in gjs (Ubuntu Bionic):
status: New → Confirmed
status: Confirmed → Triaged
importance: Undecided → Medium
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

This will include the fix and likely land sooner:

https://launchpad.net/ubuntu/+source/gjs/1.54.3-1~ubuntu18.10.1

Unsubscribing sponsors.

Changed in gjs (Ubuntu Cosmic):
assignee: Daniel van Vugt (vanvugt) → nobody
status: In Progress → Fix Committed
description: updated
Revision history for this message
Daniel van Vugt (vanvugt) wrote :
Changed in gjs (Ubuntu Bionic):
assignee: nobody → Daniel van Vugt (vanvugt)
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

gjs (1.54.3-1~ubuntu18.10.1) cosmic; urgency=medium

  * No-change SRU backport from unstable / disco to cosmic (LP: #1804641)
  * Also fixes crash on `gnome-shell --replace' (LP: #1796238)

gjs (1.54.3-1) unstable; urgency=medium

  * Team upload
  * New upstream release
  * Force time zone to UTC when running tests.
    This hopefully fixes FTBFS in the pathological time zone used to test
    reproducible builds.

gjs (1.54.2-1) unstable; urgency=medium

  * Team upload
  * Upload to unstable (starts transition: #906016)
  * d/watch: Only watch for versions from a stable branch
  * New upstream release
  * Bump Standards-Version to 4.2.1 (no changes required)
  * Use dpkg's default.mk to get upstream version number for dependencies.
    This avoids relying on the differently-named variables in
    gnome-get-source.mk, and also does the right thing if gjs ever gains
    an epoch.
  * d/rules: Remove gnome-get-source.mk (please use uscan instead)

 -- Iain Lane <email address hidden> Thu, 22 Nov 2018 12:21:13 +0000

Changed in gjs (Ubuntu Cosmic):
status: Fix Committed → Fix Released
description: updated
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Unassigned myself. The fix for bionic will arrive via upstream release 1.52.5, but we probably want that to go into Debian testing first which is something I don't have the power to do.

It also looks like 1.52.5 will allow us to drop all patches \o/

Changed in gjs (Ubuntu Bionic):
assignee: Daniel van Vugt (vanvugt) → nobody
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

Not need to go through debian actually, we can just release this for Ubuntu.
Or in any case you can contribute to salsa's version to get this in testing so that it can be copied to ubuntu with version change later.

Changed in gjs (Ubuntu Bionic):
assignee: nobody → Marco Trevisan (Treviño) (3v1n0)
Jeremy Bícha (jbicha)
Changed in gjs (Ubuntu Bionic):
status: Triaged → In Progress
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Daniel, or anyone else affected,

Accepted gjs into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/gjs/1.52.5-0ubuntu18.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in gjs (Ubuntu Bionic):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-bionic
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

The new version 1.52.5-0ubuntu18.04.1 seems to work well on bionic.

Strange I was unable to reproduce the original bug before installing it. But after installing it, there is still no problem either.

tags: added: verification-done verification-done-bionic
removed: verification-needed verification-needed-bionic
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

To clarify, when the original problem was discovered in cosmic the CPU usage was around 80%, and the fix made it less than 50% [1].

But now even without the fix (although in bionic, still using the same hardware), CPU usage for the same test case is around 50%. So indeed the main issue seems to be gone.

What I can't figure out is why the problem isn't reproducible in bionic even when the root cause was introduced in bionic version 1.52.1-1ubuntu1. The bug and the effect of the fix was much more obvious in cosmic and disco...

Still, gjs version 1.52.5-0ubuntu18.04.1 eliminates even the theoretical possibility of the CPU problem and it allows us to drop all patches \o/

[1] https://gitlab.gnome.org/GNOME/gjs/merge_requests/236

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gjs - 1.52.5-0ubuntu18.04.1

---------------
gjs (1.52.5-0ubuntu18.04.1) bionic; urgency=medium

  * New upstream release (LP: #1809181, LP: #1803271)
  * d/p/fix-crashes-lp1763878-revert-575f1e2e077.patch,
    d/p/fix-leaks-lp1672297-1-context-Add-API-to-force-GC-schedule.patch,
    d/p/fix-leaks-lp1672297-2-object-Queue-a-forced-GC-when-toggling-down.patch:
    - Drop patches included in new release
  * debian/gbp.conf:
    - Point branches and tag rules to ubuntu

 -- Marco Trevisan (Treviño) <email address hidden> Wed, 19 Dec 2018 19:32:06 +0100

Changed in gjs (Ubuntu Bionic):
status: Fix Committed → Fix Released
Revision history for this message
Chris Halse Rogers (raof) wrote : Update Released

The verification of the Stable Release Update for gjs has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Changed in gjs (Ubuntu Bionic):
milestone: none → ubuntu-18.04.2
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.