Skip to content

Cosmic-Session Memory Leak #216

Description

@p-sims

System:

OS: Fedora Linux 43.20260809.0 (COSMIC Atomic) x86_64
Host: Laptop 13 (AMD Ryzen 7040Series) (A7)
Kernel: Linux 7.1.7-100.fc43.x86_64
Uptime: 7 mins
Packages: 217 (brew), 10 (flatpak-system), 116 (flatpak-user), 1713 (rpm)
Shell: sh
Display (DP-11): 1920x1200 in 24", 60 Hz [External] *
Display (DP-12): 2560x1440 in 27", 60 Hz [External]
DE: COSMIC 1.0.0
WM: Smithay X WM (X11)
Cursor: Adwaita
Terminal: cosmic-term 1.5.0
Terminal Font: Noto Sans Mono (14px)
CPU: AMD Ryzen 7 7840U (16) @ 5.13 GHz
GPU: AMD Radeon 780M Graphics [Integrated]
Memory: 6.40 GiB / 30.64 GiB (21%)
Swap: 0 B / 8.00 GiB (0%)
Disk (/): 27.93 MiB / 27.93 MiB (100%) - overlay [Read-only]
Disk (/etc): 530.25 GiB / 1.82 TiB (29%) - btrfs

Under normal conditions COSMIC Session uses less than MB of ram.... and this is very stable...
Image

What happened...

I've had two instances recently of system locking up due to a process using ever more memory indefinitely. The first time system completely locked up but I took this photo of screen before I forced restart using power button:
Image

If you look at the partly obscured row 3 of system monitor you can see that something (using 1.8% CPU) is using 26GB of ram!

I've just had a similar series of events (Firefox Crashing while installing & Opening App followed by full CPU usage and fan working hard) and noticed that COSMIC-Session was using 1.6GB of ram, and then 1.7GB, then 1.8GB....by the time I Force terminated it using System Monitor (which basically trigger restart rather than dropping to login screen as I'd been expecting) it was using 2.6GB of ram... Annoyingly I took a screenshot, before force terminating, but that clearly didn't get saved before computer shutdown.

The App I was installing was FFaudioConverter (flatpak) via COSMIC Store, but I've just uninstalled it, and then reinstalled and reopened it and it didn't trigger Firefox to Crash or issue to repeat, so that may have been entirely coincidental....

Logs

Attached are full logs from 11:41:51 until I reboot around 11:56...
log messages-2nd crash run up 2.txt

Notes:

  • I've replaced my username with 'username'
  • ignore all the podman/borgitory stuff

This I believe is the moment I noticed a problem, and I prosume firefox crashed.

10 Aug 11:55:11 systemctl: inactive
10 Aug 11:55:11 systemd: Started app-flatpak-org.gnome.Evolution-3270921142.scope.
10 Aug 11:55:14 systemctl: inactive
10 Aug 11:55:14 xdg-desktop-por: A backend call failed: Inhibiting other than idle not supported
10 Aug 11:55:14 systemd: app-flatpak-org.gnome.Evolution-3725466989.scope: Consumed 34.753s CPU time, 196.4M memory peak.
10 Aug 11:55:22 systemctl: inactive
10 Aug 11:55:22 cosmic-panel: com.system76.CosmicAppletPower: [2026-08-10T10:55:22Z ERROR cosmic::theme] error loading system dark theme error=GetKey("list_button", Os { code: 2, kind: NotFound, message: "No such file or directory" })
10 Aug 11:55:24 systemctl: inactive
10 Aug 11:55:24 systemd-logind: Lid opened.
10 Aug 11:55:24 cosmic-comp: Failed to set xwayland primary output: The provided output wasn't known to Xwayland
10 Aug 11:55:24 firefox: Couldn't map window 0x7f2d693d6c80 as subsurface because its parent is not mapped.
10 Aug 11:55:24 cosmic-session: 
10 Aug 11:55:24 firefox: Couldn't map window 0x7f2d693d6c80 as subsurface because its parent is not mapped.

Context

  • Firefox has been occasionally crashing for me (on Fedora Atomic COSMIC) for months before this memory issue started which I'd been assumed is a firefox thing (and I assume firefox has automatically been sending logs to Mozilla about...)
  • The 2nd instance was today, and first instance was in last week or so, so both have defiantly been under COSMIC 1.5, but I couldn't be 100% sure whether I've done minor update between the two.
  • Whilst there is some similarity with cosmic-session: heap memory leak — RSS grows to 1.5 GB+ after ~36 hours #201 I wasn't experiancing this issue on COSMIC version back in April, and cosmic-session: heap memory leak — RSS grows to 1.5 GB+ after ~36 hours #201 describes reaching 4GB COSMIC-Session memory usage in 36hour, where what I watch happen this morning was COSMIC Session using extra 100MB every second, which I believe in the first instance when I wasn't aware of what was going on, led to 26GB being used and total lockup in minutes not hours.... This makes me think it maybe a different issue...

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions