gnome-shell 42 leaks tens of megabytes with every screenshot
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
GNOME Shell |
Fix Released
|
Unknown
|
|||
gjs (Ubuntu) |
Fix Released
|
High
|
Jeremy Bícha | ||
Jammy |
Fix Released
|
High
|
Jeremy Bícha | ||
gnome-shell (Ubuntu) |
Fix Released
|
High
|
Unassigned | ||
Jammy |
Fix Released
|
High
|
Unassigned |
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 for GNOME Shell Fix]
TODO
[Test Plan for GJS Fix]
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.
affects: | ubuntu → gnome-shell (Ubuntu) |
Changed in gnome-shell (Ubuntu): | |
status: | Incomplete → Confirmed |
summary: |
- System very laggy + gnome-shell leaks tens of megabytes with every screenshot |
summary: |
- gnome-shell leaks tens of megabytes with every screenshot + gnome-shell 42 leaks tens of megabytes with every screenshot |
tags: | added: gnome-shell-leak |
Changed in gnome-shell (Ubuntu): | |
importance: | Undecided → High |
status: | Confirmed → Triaged |
tags: | added: rls-jj-incoming |
Changed in gnome-shell (Ubuntu): | |
status: | Triaged → Invalid |
Changed in gnome-shell (Ubuntu Jammy): | |
status: | New → Invalid |
Changed in gjs (Ubuntu Jammy): | |
status: | New → Triaged |
importance: | Undecided → High |
tags: | removed: rls-jj-incoming |
Changed in gjs (Ubuntu): | |
assignee: | nobody → Jeremy Bicha (jbicha) |
Changed in gjs (Ubuntu Jammy): | |
assignee: | nobody → Jeremy Bicha (jbicha) |
tags: | added: dt-405 |
description: | updated |
description: | updated |
Changed in gnome-shell (Ubuntu): | |
status: | Triaged → Fix Committed |
status: | Fix Committed → Triaged |
Changed in gjs (Ubuntu): | |
status: | In Progress → Fix Committed |
Changed in gjs (Ubuntu Jammy): | |
status: | Triaged → Fix Committed |
tags: | added: rjs-jj-incoming |
tags: |
added: rls-jj-incoming removed: rjs-jj-incoming |
description: | updated |
description: | updated |
tags: |
added: fixed-in-43.rc removed: fixed-in-43 |
Changed in gnome-shell (Ubuntu Jammy): | |
status: | Triaged → Fix Committed |
tags: | added: fixed-in-42.5 |
Changed in gnome-shell (Ubuntu): | |
status: | Fix Committed → Fix Released |
Changed in gnome-shell: | |
status: | Unknown → Fix Released |
Changed in gnome-shell (Ubuntu Jammy): | |
status: | Fix Committed → Fix Released |
The screenshot in comment #1 shows gnome-shell is only 168MB resident. So no leak there.
Please run:
ps auxw > psoutput.txt
free -h > free.txt
lspci -k > lspci.txt
journalctl -b0 > journal.txt
and attach the resulting text files here.
I suspect there is no leak here and we should instead investigate "system very laggy".