** Description changed: - i running wine program and i want doing a lot screenshot. after did it - and close program. my system very laggy. i see at htop program my ram - and swap full. + [Impact] - my system info. + 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. - Host: mantari Kernel: 5.17.7-xanmod1 x86_64 bits: 64 compiler: gcc - v: 11.2.0 parameters: BOOT_IMAGE=/boot/vmlinuz-5.17.7-xanmod1 - root=UUID=1dd447f7-2ae1-47c5-81cc-8584b22766d3 ro mitigations=off quiet - splash vt.handoff=7 - Desktop: GNOME 42.0 tk: GTK 3.24.33 wm: gnome-shell dm: GDM3 42.0 - Distro: Ubuntu 22.04 LTS (Jammy Jellyfish) - Machine: - Type: Portable System: Dell product: Inspiron 3442 v: N/A - Mobo: Dell model: 0T57PC v: A16 serial: <superuser required> UEFI: Dell - v: A16 date: 09/02/2020 - Battery: - ID-1: BAT0 charge: 14.9 Wh (100.0%) condition: 14.9/41.4 Wh (36.0%) - volts: 16.8 min: 14.8 model: SMP-SDI2.8 DELL FW1MN31 type: Li-ion - serial: 4862 status: Full - Memory: - RAM: total: 3.75 GiB - Display: wayland server: X.org v: 1.21.1.3 with: Xwayland v: 22.1.1 - compositor: gnome-shell driver: X: loaded: modesetting unloaded: fbdev,vesa - gpu: i915 display-ID: 0 - Monitor-1: eDP-1 model: AU Optronics built: 2013 res: 1366x768 dpi: 112 - gamma: 1.2 size: 309x173mm (12.2x6.8") diag: 354mm (13.9") ratio: 16:9 - modes: 1366x768 - OpenGL: renderer: Mesa Intel HD Graphics (HSW GT1) v: 4.6 Mesa 22.0.1 - compat-v: 3.1 direct render: Yes - Drives: - Local Storage: total: 1.14 TiB used: 916.19 GiB (78.7%) - ID-1: /dev/sda maj-min: 8:0 vendor: Western Digital - model: WD7500BPVX-75JC3T0 size: 698.64 GiB block-size: physical: 4096 B - logical: 512 B speed: 6.0 Gb/s type: HDD rpm: 5400 serial: WXA1A33W6463 - rev: 1A01 scheme: GPT - ID-2: /dev/sdb maj-min: 8:16 vendor: Seagate model: ST500LM012 HN-M500MBB - size: 465.76 GiB block-size: physical: 4096 B logical: 512 B - speed: 3.0 Gb/s type: HDD rpm: 5400 serial: S2S7J9DC911744 rev: 0001 - scheme: GPT - Swap: - Kernel: swappiness: 30 (default 60) cache-pressure: 50 (default 100) - ID-1: swap-1 type: zram size: 2.79 GiB used: 0 KiB (0.0%) priority: 5 - dev: /dev/zram0 - ID-2: swap-2 type: zram size: 2.79 GiB used: 0 KiB (0.0%) priority: 5 - dev: /dev/zram1 + [Test Plan] - $ apt-cache policy gnome-shell - gnome-shell: - Installed: 42.0-2ubuntu1 - Candidate: 42.0-2ubuntu1 - Version table: - *** 42.0-2ubuntu1 500 - 500 https://mirror.internet.asn.au/pub/ubuntu/archive jammy/main amd64 Packages - 100 /var/lib/dpkg/status - --- - ProblemType: Bug - ApportVersion: 2.20.11-0ubuntu82.1 - Architecture: amd64 - CasperMD5CheckResult: pass - CurrentDesktop: ubuntu:GNOME - DisplayManager: gdm3 - DistroRelease: Ubuntu 22.04 - InstallationDate: Installed on 2022-04-10 (38 days ago) - InstallationMedia: Ubuntu 22.04 LTS "Jammy Jellyfish" - Daily amd64 (20220409) - NonfreeKernelModules: wl - Package: gnome-shell 42.0-2ubuntu1 - PackageArchitecture: amd64 - RelatedPackageVersions: mutter-common 42.0-3ubuntu2 - Tags: third-party-packages jammy - Uname: Linux 5.17.8-xanmod1 x86_64 - UpgradeStatus: No upgrade log present (probably fresh install) - UserGroups: adm cdrom dip lpadmin lxd plugdev sambashare sudo video - _MarkForUpload: True + 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 GJS portion of the bug that allows + memory usage to exceed 1GB. + + Later a fix for gnome-shell should be attempted to prevent spikes of + even 100MB.
** Description changed: [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 + 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 GJS portion of the bug that allows - memory usage to exceed 1GB. - - Later a fix for gnome-shell should be attempted to prevent spikes of - even 100MB. + moment we are only aiming to fix the main GJS portion of the bug that + allows memory usage to exceed 1GB. -- You received this bug notification because you are a member of Ubuntu Desktop Bugs, which is subscribed to gnome-shell in Ubuntu. https://bugs.launchpad.net/bugs/1973638 Title: gnome-shell 42 leaks tens of megabytes with every screenshot To manage notifications about this bug go to: https://bugs.launchpad.net/gnome-shell/+bug/1973638/+subscriptions -- desktop-bugs mailing list desktop-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/desktop-bugs