Public bug reported:
[ Impact ]
* gnome-shell's memory grows unboundedly while tiling assistant extension is
enabled.
Every window that is ever opened leaves a SignalTracker entry alive in
gnome-shell's
global SignalManager, so tens of thousands of leaked GObject wrappers
are re-scanned on every GC cycle and stall the shell (hundreds of ms),
progressively worse with uptime. No user-side workaround besides
logging out.
* Cause: TilingWindowManager connects 'unmanaging' on every Meta.Window
through connectObject() and never calls disconnectObject()
(src/extension/tilingWindowManager.js). `Meta.Window` is not a
registered destroyable type, so nothing clears the per-window tracker
entry when the window is closed.
[ Test Plan ]
* Baseline the shell's memory:
grep VmRSS /proc/$(pgrep -x gnome-shell)/status
* Open and close a few hundred windows, then let the shell settle:
for i in $(seq 1 200); do gnome-terminal --wait & sleep 0.2; done
wait; sleep 5
grep VmRSS /proc/$(pgrep -x gnome-shell)/status
* Repeat the loop and compare VmRSS between iterations.
* Expected (fixed): VmRSS returns to roughly the baseline and stays flat
across iterations. Actual (bug): VmRSS grows monotonically, roughly in
proportion to the number of windows ever opened, even after they are
closed.
[ Where problems could occur ]
* disconnectObject(this) disconnects *all* handlers that `this` (the
TilingWindowManager class) registered on that window, not just
'unmanaging'. Verify we don't rely also on 'unmanaged' signals (happening)
later to do different operations.
* Removing the per-window signal bookkeeping before the handlers are
actually disconnected (or while the window is still alive) would orphan
the stored handler ids and leak the real signal handlers - it must
happen only once the window is gone.
[ Other Info ]
* Upstream: https://github.com/ubuntu/Tiling-Assistant/issues/479
* Upstream fix: https://github.com/ubuntu/Tiling-Assistant/pull/480
** Affects: gnome-shell-ubuntu-extensions (Ubuntu)
Importance: High
Assignee: Marco Trevisan (Treviño) (3v1n0)
Status: In Progress
** Affects: gnome-shell-ubuntu-extensions (Ubuntu Resolute)
Importance: High
Assignee: Marco Trevisan (Treviño) (3v1n0)
Status: In Progress
** Also affects: gnome-shell-ubuntu-extensions (Ubuntu Resolute)
Importance: Undecided
Status: New
** Changed in: gnome-shell-ubuntu-extensions (Ubuntu Resolute)
Importance: Undecided => High
** Changed in: gnome-shell-ubuntu-extensions (Ubuntu Resolute)
Status: New => In Progress
** Changed in: gnome-shell-ubuntu-extensions (Ubuntu Resolute)
Assignee: (unassigned) => Marco Trevisan (Treviño) (3v1n0)
** Summary changed:
- Tiling assistant wastes memory for each connected window
+ Tiling assistant wastes memory for each managed window
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2170241
Title:
Tiling assistant wastes memory for each managed window
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gnome-shell-ubuntu-extensions/+bug/2170241/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs