I am 99% certain this is caused by disabling Hardware Acceleration on
Firefox.

To recreate:
1/ On Firefox, Under Settings/Performance, un-tick "Use recommended performance 
settings" and un-tick "Use hardware acceleration when available".
2/ Restart Firefox
3/ Browse the web, watch gnome-shell MEM% rise in htop. Even if tabs are 
closed, memory isn't freed.
4/ Close Firefox - gnome-shell MEM% returns to normal.

Firefox version is 137.0.2.

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

Title:
  gnome-shell memory leak, oom-killed

Status in gnome-shell package in Ubuntu:
  New

Bug description:
  gnome-shell slowly increases in memory usage over several hours, and
  is oom killed by the kernel.

  This has happened at least 3 times in the last two days since 15 Apr
  2025.

  I removed all extensions and restarted, but I can still see memory use
  increasing.

  jm@laptop:~$ lsb_release -rd
  Description:  Ubuntu 22.04.5 LTS
  Release:      22.04

  jm@laptop:~$ apt-cache policy gnome-shell
  gnome-shell:
    Installed: 42.9-0ubuntu2.2
    Candidate: 42.9-0ubuntu2.2
    Version table:
   *** 42.9-0ubuntu2.2 500
          500 http://nz.archive.ubuntu.com/ubuntu jammy-updates/main amd64 
Packages
          500 http://security.ubuntu.com/ubuntu jammy-security/main amd64 
Packages
          100 /var/lib/dpkg/status
       42.0-2ubuntu1 500
          500 http://nz.archive.ubuntu.com/ubuntu jammy/main amd64 Packages

  jm@laptop:~$ gnome-extensions list --enabled
  jm@laptop:~$

  
  [Wed Apr 16 14:57:28 2025]  <TASK>
  [Wed Apr 16 14:57:28 2025]  dump_stack_lvl+0x76/0xa0
  [Wed Apr 16 14:57:28 2025]  dump_stack+0x10/0x20
  [Wed Apr 16 14:57:28 2025]  dump_header+0x47/0x1f0
  [Wed Apr 16 14:57:28 2025]  oom_kill_process+0x118/0x280
  [Wed Apr 16 14:57:28 2025]  ? oom_evaluate_task+0x143/0x1e0
  [Wed Apr 16 14:57:28 2025]  out_of_memory+0x103/0x340
  [Wed Apr 16 14:57:28 2025]  __alloc_pages_may_oom+0x112/0x1e0
  [Wed Apr 16 14:57:28 2025]  __alloc_pages_slowpath.constprop.0+0x41f/0x9e0
  [Wed Apr 16 14:57:28 2025]  __alloc_pages+0x31d/0x350
  [Wed Apr 16 14:57:28 2025]  alloc_pages_mpol+0x91/0x210
  [Wed Apr 16 14:57:28 2025]  ? filemap_get_entry+0xf0/0x180
  [Wed Apr 16 14:57:28 2025]  folio_alloc+0x64/0x120
  [Wed Apr 16 14:57:28 2025]  filemap_alloc_folio+0x31/0x40
  [Wed Apr 16 14:57:28 2025]  __filemap_get_folio+0x14b/0x2f0
  [Wed Apr 16 14:57:28 2025]  filemap_fault+0x48c/0x8d0
  [Wed Apr 16 14:57:28 2025]  __do_fault+0x3a/0x190
  [Wed Apr 16 14:57:28 2025]  do_read_fault+0x133/0x200
  [Wed Apr 16 14:57:28 2025]  do_fault+0xf0/0x260
  [Wed Apr 16 14:57:28 2025]  handle_pte_fault+0x114/0x1d0
  [Wed Apr 16 14:57:28 2025]  __handle_mm_fault+0x64f/0x790
  [Wed Apr 16 14:57:28 2025]  handle_mm_fault+0x18d/0x380
  [Wed Apr 16 14:57:28 2025]  do_user_addr_fault+0x169/0x680
  [Wed Apr 16 14:57:28 2025]  exc_page_fault+0x83/0x1b0
  [Wed Apr 16 14:57:28 2025]  asm_exc_page_fault+0x27/0x30
  [Wed Apr 16 14:57:28 2025] RIP: 0033:0x75e89119d424
  [Wed Apr 16 14:57:28 2025] Code: 00 0f 1f 44 00 00 f3 0f 1e fa c5 f9 6e c6 89 
f8 25 ff 0f 00 00 c4 e2 7d 78 c0 c4 41 31 ef c9 3d e0 0f 00 00 0f 87 ac 01 00 
00 <c5> 7e 6f 07 c4 c1 7d 74 c8 c4 c1 35 74 d0 c5 ed eb c9 c5 fd d7 c1
  [Wed Apr 16 14:57:28 2025] RSP: 002b:000075e8899fe498 EFLAGS: 00010287
  [Wed Apr 16 14:57:28 2025] RAX: 0000000000000d91 RBX: 000075e88fe36d90 RCX: 
0000000000000001
  [Wed Apr 16 14:57:28 2025] RDX: 0000000000000000 RSI: 0000000000000025 RDI: 
000075e88fe36d91
  [Wed Apr 16 14:57:28 2025] RBP: 000075e8899fea20 R08: 0000000000000002 R09: 
000075e8899fe9c7
  [Wed Apr 16 14:57:28 2025] R10: 0000000000000000 R11: 0000000000000003 R12: 
0000000000000010
  [Wed Apr 16 14:57:28 2025] R13: 000075e891217300 R14: 0000000000000002 R15: 
000075e88fe36d91
  [Wed Apr 16 14:57:28 2025]  </TASK>
  [Wed Apr 16 14:57:28 2025] Mem-Info:
  [Wed Apr 16 14:57:28 2025] active_anon:1727135 inactive_anon:5709216 
isolated_anon:0
                              active_file:133 inactive_file:842 isolated_file:0
                              unevictable:338498 dirty:0 writeback:0
                              slab_reclaimable:75961 slab_unreclaimable:112307
                              mapped:4798007 shmem:5156980 pagetables:53092
                              sec_pagetables:0 bounce:0
                              kernel_misc_reclaimable:0
                              free:50979 free_pcp:662 free_cma:0
  ..
  ..
  ..
  [Wed Apr 16 14:57:28 2025] 
oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=user.slice,mems_allowed=0,global_oom,task_memcg=/user.slice/user-1000.slice/user@1000.service/session.slice/org.gnome.Shell@wayland.service,task=gnome-shell,pid=416170,uid=1000
  [Wed Apr 16 14:57:28 2025] Out of memory: Killed process 416170 (gnome-shell) 
total-vm:34544756kB, anon-rss:194548kB, file-rss:1600kB, shmem-rss:19134120kB, 
UID:1000 pgtables:43504kB oom_score_adj:0


  top - 09:12:45 up 3 days, 20 min,  1 user,  load average: 0.35, 0.46, 0.44
  Tasks: 436 total,   1 running, 435 sleeping,   0 stopped,   0 zombie
  %Cpu(s):  1.3 us,  0.6 sy,  0.0 ni, 97.8 id,  0.3 wa,  0.0 hi,  0.0 si,  0.0 
st
  MiB Mem :  31728.5 total,   4187.8 free,   9251.3 used,  18289.4 buff/cache
  MiB Swap:      0.0 total,      0.0 free,      0.0 used.   9724.1 avail Mem 

      PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
   251316 root      20   0 7103852 106912   7472 S  20.0   0.3 109:06.51 
DisplayLinkMana
   578055 jm03      20   0   25.5g  11.1g  11.0g S   6.7  35.9   5:45.49 
gnome-shell <<<<<===============
   578742 jm03      20   0   39.6g   6.6g   6.2g S   6.7  21.2  18:31.98 
firefox-bin
        1 root      20   0  168464  10380   5580 S   0.0   0.0   0:13.16 systemd
        2 root      20   0       0      0      0 S   0.0   0.0   0:00.23 
kthreadd
        3 root      20   0       0      0      0 S   0.0   0.0   0:00.00 
pool_workqueue_release
        4 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 
kworker/R-rcu_g
        5 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 
kworker/R-rcu_p
        6 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 
kworker/R-slub_
        7 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 
kworker/R-netns
        9 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 
kworker/0:0H-events_highpri

  ProblemType: Bug
  DistroRelease: Ubuntu 22.04
  Package: gnome-shell 42.9-0ubuntu2.2
  ProcVersionSignature: Ubuntu 6.8.0-57.59~22.04.1-generic 6.8.12
  Uname: Linux 6.8.0-57-generic x86_64
  ApportVersion: 2.20.11-0ubuntu82.6
  Architecture: amd64
  CasperMD5CheckResult: pass
  CurrentDesktop: ubuntu:GNOME
  Date: Thu Apr 17 08:53:21 2025
  DisplayManager: gdm3
  InstallationDate: Installed on 2024-05-13 (338 days ago)
  InstallationMedia: Ubuntu 22.04.4 LTS "Jammy Jellyfish" - Release amd64 
(20240220)
  RelatedPackageVersions: mutter-common 42.9-0ubuntu9
  SourcePackage: gnome-shell
  UpgradeStatus: No upgrade log present (probably fresh install)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gnome-shell/+bug/2107504/+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