Memory leak in gnome-shell after lock and unlock the screen

Bug #1946970 reported by Balazs Pere

This bug report will be marked for expiration in 46 days if no further activity occurs. (find out why)

This bug affects 1 person
Affects Status Importance Assigned to Milestone
gnome-shell (Ubuntu)

Bug Description

When the screen is locked and unlocked extra ~100MB memory remains in use and never freed up. After each lock/unlock action additional 10-20MB will be used, and the memory consumption of gnome-shell grows and grows.

ProblemType: Bug
DistroRelease: Ubuntu 21.10
Package: gnome-shell 40.5-1ubuntu2
ProcVersionSignature: Ubuntu 5.13.0-18.18-generic 5.13.14
Uname: Linux 5.13.0-18-generic x86_64
NonfreeKernelModules: nvidia_modeset nvidia
ApportVersion: 2.20.11-0ubuntu70
Architecture: amd64
CasperMD5CheckResult: pass
CurrentDesktop: ubuntu:GNOME
Date: Wed Oct 13 14:06:17 2021
DisplayManager: gdm3
EcryptfsInUse: Yes
InstallationDate: Installed on 2021-10-06 (7 days ago)
InstallationMedia: Ubuntu 21.04 "Hirsute Hippo" - Release amd64 (20210420)
 PATH=(custom, no user)
RelatedPackageVersions: mutter-common 40.5-1ubuntu2
SourcePackage: gnome-shell
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Balazs Pere (perebal-sze) wrote :
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Thanks for the bug report.

The cause of most gnome-shell memory leaks is extensions. So please go to the Extensions app and disable all the non-Ubuntu ones, then log in again and retest.

tags: added: gnome-shell-leak
Changed in gnome-shell (Ubuntu):
status: New → Incomplete
Revision history for this message
Balazs Pere (perebal-sze) wrote :

I switch off all the extensions except for Ubuntu ones. Every lock/unlock action raises the memory usage by ~10MB until it reaches ~280MB. Super-A (app overview) raised further the usage.

After a while something happend (Not lock/unlock or Super-A) and now the memory usage of gnome-shell is 302MB and is not changing.

What is the normal memory usage of gnome-shell? Is it normal (what I have described) or it should stay at the beginning level?

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

Memory in gnome-shell does not get freed quickly because of JavaScript garbage collection. Memory usage will tend to grow slowly and plateau. Significant drops are rare, but I would not consider it a leak unless you see growth continuing above 500MB. Starting at 200MB is normal.

If you are still concerned about the memory use then please also check to see if you get the same behaviour with no extensions at all.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers