gnome-shell memory leak (when Ubuntu AppIndicators is enabled)

Bug #1991709 reported by Sergiu
44
This bug affects 7 people
Affects Status Importance Assigned to Milestone
GNOME Shell
New
Unknown
GNOME Software
New
Undecided
Unassigned
Open Weather Map
New
Undecided
Unassigned
Ubuntu AppIndicators
New
Undecided
Unassigned
gjs (Ubuntu)
Fix Released
Undecided
Marco Trevisan (Treviño)
Jammy
Fix Released
Undecided
Unassigned
gnome-shell (Ubuntu)
Won't Fix
High
Marco Trevisan (Treviño)
Jammy
Won't Fix
Undecided
Unassigned
gnome-shell-extension-appindicator (Ubuntu)
Fix Released
High
Marco Trevisan (Treviño)
Jammy
Confirmed
Undecided
Unassigned

Bug Description

over day gnome-shell memory usage increase to 1GB and more. I have 2 enabled extensions:
gnome-extensions list --enabled
<email address hidden>
<email address hidden>

other info:
lsb_release -rd
Description: Ubuntu 22.04.1 LTS
Release: 22.04

ProblemType: Bug
DistroRelease: Ubuntu 22.04
Package: gnome-shell 42.4-0ubuntu0.22.04.1
ProcVersionSignature: Ubuntu 5.15.0-48.54-generic 5.15.53
Uname: Linux 5.15.0-48-generic x86_64
ApportVersion: 2.20.11-0ubuntu82.1
Architecture: amd64
CasperMD5CheckResult: pass
CurrentDesktop: ubuntu:GNOME
Date: Tue Oct 4 22:35:24 2022
DisplayManager: gdm3
InstallationDate: Installed on 2022-07-03 (93 days ago)
InstallationMedia: Ubuntu 22.04 LTS "Jammy Jellyfish" - Release amd64 (20220419)
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
RelatedPackageVersions: mutter-common 42.2-0ubuntu1
SourcePackage: gnome-shell
UpgradeStatus: No upgrade log present (probably fresh install)

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

It appears you also have extension '<email address hidden>' enabled. Please start by deleting all local extensions:

  cd ~/.local/share/gnome-shell
  rm -rf extensions

and then log in again and tell us if the leak still happens. If you find the leak is still happening then please run:

  ps auxw | grep gnome-shell > psout.txt

and attach the resulting text file here.

Please also note there is still a major leak in 22.04 known to be caused by screenshots: bug 1973638

tags: added: gnome-shell-leak
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Moving to private to avoid "me too" comments from other users. Everyone should log their own separate bugs.

information type: Public → Private
Changed in gnome-shell (Ubuntu):
status: New → Incomplete
Revision history for this message
Sergiu (sgumanea) wrote :

Leak is still there. No screenshots taken

ls -lah ~/.local/share/gnome-shell
total 12K
drwx------ 2 sergiu sergiu 4.0K Oct 5 16:21 .
drwx------ 28 sergiu sergiu 4.0K Oct 5 16:25 ..
-rw-rw-r-- 1 sergiu sergiu 2.2K Oct 5 16:21 application_state
-rw-rw-r-- 1 sergiu sergiu 0 Jul 3 14:27 gnome-overrides-migrated

Thanks

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

As soon as you notice the leak next time, please run:

  journalctl -b0 > journal.txt

and attach the resulting text file here.

Revision history for this message
Sergiu (sgumanea) wrote :

journalctl file +
fresh psout:

sergiu 4082 8.7 5.1 6195276 823344 ? Rsl 09:28 10:07 /usr/bin/gnome-shell
sergiu 4211 0.0 0.1 796300 21860 ? Sl 09:28 0:00 /usr/libexec/gnome-shell-calendar-server
sergiu 4329 0.0 0.2 2932900 39876 ? Sl 09:28 0:00 /usr/bin/gjs /usr/share/gnome-shell/org.gnome.Shell.Notifications
sergiu 4835 0.0 0.1 2939516 27940 ? Sl 09:28 0:00 /usr/bin/gjs /usr/share/gnome-shell/org.gnome.ScreenSaver
sergiu 26996 0.0 0.0 9208 2324 pts/1 S+ 11:24 0:00 grep --color=auto gnome-shell

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

Thanks. Please try disabling <email address hidden> and log in again. Does that stop the leak?

Revision history for this message
Sergiu (sgumanea) wrote :

Thanks. Looks like that's it, after 1.5 hours the memory usage is still around 110MB

summary: - gnome-shell memory leak
+ gnome-shell memory leak (when Ubuntu AppIndicators is enabled)
Changed in gnome-shell (Ubuntu):
status: Incomplete → New
information type: Private → Public
affects: gnome-shell (Ubuntu) → gnome-shell-extension-appindicator (Ubuntu)
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Please try to identify the smallest set of indicators that will trigger the leak.

Changed in gnome-shell-extension-appindicator (Ubuntu):
importance: Undecided → High
status: New → Incomplete
Revision history for this message
Sergiu (sgumanea) wrote :

After closed this app https://github.com/ThePBone/GalaxyBudsClient , it took about 2 days to increase memory usage to 400MB

Changed in gnome-shell-extension-appindicator (Ubuntu):
status: Incomplete → New
Changed in gnome-shell (Ubuntu):
assignee: nobody → Marco Trevisan (Treviño) (3v1n0)
Changed in gnome-shell-extension-appindicator (Ubuntu):
assignee: nobody → Marco Trevisan (Treviño) (3v1n0)
Changed in gnome-shell (Ubuntu):
importance: Undecided → High
Changed in gnome-shell:
status: Unknown → New
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gnome-shell (Ubuntu):
status: New → Confirmed
Changed in gnome-shell-extension-appindicator (Ubuntu):
status: New → Confirmed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gnome-shell-extension-appindicator - 49-1

---------------
gnome-shell-extension-appindicator (49-1) unstable; urgency=medium

  * New upstream release
  * appIndicator: Make sure AppIndicatorProxy init_async is a wrapper
  * dbusMenu: Unset shellItem icon property on destruction
  * dbusMenu: cleanup StIcon initialization
  * appIndicator: Keep retrying till MAX retries to get needed properies
  * promiseUtils: Update promisify polyfill to last gjs version
  * util: Add utility function to refresh all properties on proxy
  * appIndicator: Move proxy specific methods to AppIndicatorProxy
  * appIndicator: Avoid dynamically initialized proxy parameters
  * util: Add CancellableChild
  * appIndicator: Use CancellableChild for property operations
  * appIndicator: Set properties we depend on
  * appIndicator: Use cancellable child to handle icons loading cancellation
  * appIndicator: Simplify argbToRgba code to use less promises
  * appIndicator: Consider Resource scale to pick right icon size
  * appIndicator: Log error for overlay icons loading error too
  * iconCache: Actually perform Garbage Collection
  * iconCache: Ensure GC is repeated if there are items to clear
  * iconCache: Keep track of active icons inside the cache
  * appIndicator: Avoid creating prototypes for simple objects
  * appIndicator: Manually load the file icons as GdkPixbuf (LP: #1991709)
  * appIndicator: Disable caching of Gio.FileIcons textures
  * iconCache: Increase GC interval and icon lifetime
  * iconCache, appIndicator: Update active state for any icon cached
  * appIndicator: Add more class elements for repeated data
  * appIndicator: Use better naming for function refreshing proxy properties
  * appIndicator: Use an object to hold returned icon parameters
  * appIndicator: Never deep unpack pixmaps properties
  * appIndicator: Move pixmap-related functions to a custom file
  * appIndicator: Unset cached properties on proxy destruction
  * appIndicator: Freeze objects used as enums
  * appIndicator: Free the cached pixmaps variants when not needed
  * appIndicator: Load icons as pixbufs using the required height only
  * appIndicator: Avoid getting icon scaling multiple times

 -- Marco Trevisan (Treviño) <email address hidden> Fri, 03 Mar 2023 03:39:23 +0100

Changed in gnome-shell-extension-appindicator (Ubuntu):
status: Confirmed → Fix Released
Changed in gjs (Ubuntu):
status: New → Fix Committed
assignee: nobody → Marco Trevisan (Treviño) (3v1n0)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gjs - 1.76.0-3

---------------
gjs (1.76.0-3) experimental; urgency=medium

  * debian/patches: Drop patch causing GNOME Characters not to show emojis
    (LP: #2015948)

gjs (1.76.0-2) experimental; urgency=medium

  [ Daniel van Vugt ]
  * Add context-Clear-all-vectors-of-JS-Heap-on-dispose.patch (LP: #1974293)

  [ Marco Trevisan (Treviño) ]
  * debian/patches: Do not leak GVariants and other handled objects
    (LP: #1991709, #2012978)

 -- Marco Trevisan (Treviño) <email address hidden> Wed, 12 Apr 2023 05:40:15 +0200

Changed in gjs (Ubuntu):
status: Fix Committed → Fix Released
tags: added: rls-jj-tracking
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gjs (Ubuntu Jammy):
status: New → Confirmed
Changed in gnome-shell (Ubuntu Jammy):
status: New → Confirmed
Changed in gnome-shell-extension-appindicator (Ubuntu Jammy):
status: New → Confirmed
Revision history for this message
John Magdy Lotfy (zorono) wrote (last edit ):
Download full text (6.1 KiB)

**free --giga --human**:
```
               total used free shared buff/cache available
Mem: 7.6G 4.0G 374M 351M 3.3G 3.0G
Swap: 23G 117M 23G
```
**gnome-extensions list --enabled**:
```
<email address hidden>@gmail.com
<email address hidden>@gmail.com
<email address hidden>
<email address hidden>
<email address hidden>
fq@megh
<email address hidden>
no-overview@fthx
<email address hidden>
<email address hidden>
<email address hidden>
<email address hidden>
<email address hidden>
<email address hidden>
<email address hidden>
<email address hidden>
<email address hidden>
<email address hidden>
<email address hidden>
<email address hidden>
<email address hidden>
NotificationCounter@coolllsk
<email address hidden>
<email address hidden>
<email address hidden>
<email address hidden>
<email address hidden>
<email address hidden>
<email address hidden>
```
**ps auxw | grep gnome**:
```
USER PR NI VIRT RES SHR %CPU %MEM TIME+ COMMAND
johnm 5474 0.0 0.0 242108 7204 ? SLl 03:15 0:00 /usr/bin/gnome-keyring-daemon --daemonize --login
johnm 5478 0.0 0.0 163440 6112 tty2 Ssl+ 03:15 0:00 /usr/libexec/gdm-wayland-session env GNOME_SHELL_SESSION_MODE=ubuntu /usr/bin/gnome-session --session=ubuntu
johnm 5485 0.0 0.1 224196 15580 tty2 Sl+ 03:15 0:00 /usr/libexec/gnome-session-binary --session=ubuntu
johnm 5546 0.0 0.0 92960 5104 ? Ssl 03:15 0:00 /usr/libexec/gnome-session-ctl --monitor
johnm 5569 0.0 0.2 521284 17692 ? Ssl 03:15 0:00 /usr/libexec/gnome-session-binary --systemd-service --session=ubuntu
johnm 5774 11.2 4.5 5446336 359844 ? Ssl 03:15 3:01 /usr/bin/gnome-shell
johnm 5807 0.0 0.2 1059236 20344 ? Sl 03:15 0:00 /usr/libexec/gnome-shell-calendar-server
johnm 5948 0.0 0.3 2670180 27068 ? Sl 03:15 0:00 /usr/bin/gjs /usr/share/gnome-shell/org.gnome.Shell.Notifications
johnm 5950 0.0 0.0 162676 7332 ? Sl 03:15 0:00 /usr/libexec/at-spi2-registryd --use-gnome-session
johnm 6014 0.5 2.6 868404 210992 ? Sl 03:15 0:08 /usr/bin/gnome-software --gapplication-service
johnm 6216 0.0 0.3 2670180 26836 ? Sl 03:15 0:00 /usr/bin/gjs /usr/share/gnome-shell/org.gnome.ScreenSaver
johnm 6283 0.0 0.4 670000 33288 ? Ssl 03:16 0:00 /usr/libexec/xdg-desktop-portal-gnome
johnm 6286 0.1 1.0 3020104 78652 ? Sl 03:16 0:02 gjs /<email address hidden>/ding.js -E -P /<email address hidden> -M 0 -D 1280:0:1366:768:1:27:56:0:0:0 -D 0:0:1280:1024:1:0:56:0:0:1
johnm 7274 0.0 0.2 37388 ...

Read more...

summary: - gnome-shell memory leak (when Ubuntu AppIndicators is enabled)
+ gnome-shell memory leak
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

John, please:

1. Remove all those extensions from your system.

2. If you still experience leaks after that then please open a new bug.

summary: - gnome-shell memory leak
+ gnome-shell memory leak (when Ubuntu AppIndicators is enabled)
Changed in gnome-shell (Ubuntu):
status: Confirmed → Won't Fix
Changed in gnome-shell (Ubuntu Jammy):
status: Confirmed → Won't Fix
Changed in gjs (Ubuntu Jammy):
status: Confirmed → Fix Released
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.