Before installing the update:
$ grep RSS /proc/`pidof gnome-shell`/status
VmRSS:    323100 kB
after running the 20 screenshots
$ grep RSS /proc/`pidof gnome-shell`/status
VmRSS:    605112 kB

and the size didn't really go down.


After installing gjs 1.72.0-3~ubuntu22.04.2,

$ grep RSS /proc/`pidof gnome-shell`/status
VmRSS:    325388 kB

After the 20 screenshots
$ grep RSS /proc/`pidof gnome-shell`/status
VmRSS:    559232 kB

After waiting a few moments
$ grep RSS /proc/`pidof gnome-shell`/status
VmRSS:    340772 kB

That verifies this bug fix.

** Changed in: gnome-shell (Ubuntu)
     Assignee: Jeremy Bicha (jbicha) => (unassigned)

** Changed in: gnome-shell (Ubuntu Jammy)
     Assignee: Jeremy Bicha (jbicha) => (unassigned)

** Tags removed: verification-needed verification-needed-jammy
** Tags added: verification-done verification-done-jammy

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to gjs in Ubuntu.
https://bugs.launchpad.net/bugs/1973638

Title:
  gnome-shell 42 leaks tens of megabytes with every screenshot

Status in GNOME Shell:
  Unknown
Status in gjs package in Ubuntu:
  Fix Released
Status in gnome-shell package in Ubuntu:
  Triaged
Status in gjs source package in Jammy:
  Fix Committed
Status in gnome-shell source package in Jammy:
  Triaged

Bug description:
  [Impact]

  gnome-shell's memory usage grows by tens of megabytes with every
  screenshot. A few screenshots make it 100MB larger and a few dozen
  screenshots make it 1GB larger.

  [Test Plan]

  1. Log into gnome-shell.

  2. Measure its real memory usage:

     grep RSS /proc/`pidof gnome-shell`/status

  3. Take 20 full screen screenshots by pressing PrtScn each time. No
  need to save them anywhere.

  4. Measure the memory usage again.

  Expected: Memory usage grows a little but growth does not exceed a few
  hundred megabytes. It should level off after a while and sometimes
  even shrink due to garbage collection.

  Observed: Memory usage grows without bounds, easily exceeding 1GB
  after about 20 screenshots (depending on screen resolution). It never
  shrinks significantly.

  [Where problems could occur]

  Since the fix affects GJS, problems could occur in any part of gnome-
  shell.

  [Other Info]

  This leak requires multiple fixes to minimize the memory usage. For
  the moment we are only aiming to fix the main GJS portion of the bug
  that allows memory usage to exceed 1GB.

To manage notifications about this bug go to:
https://bugs.launchpad.net/gnome-shell/+bug/1973638/+subscriptions


-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to     : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to