Skip to content

cosmic-session: heap memory leak — RSS grows to 1.5 GB+ after ~36 hours #201

@vichugofsl

Description

@vichugofsl

Summary

cosmic-session steadily consumes memory over time. After approximately 36 hours of uptime, the process heap grew to 1.53 GB (RSS 1.54 GB), with a recorded peak of 4.05 GB. Expected memory usage for a session manager should be in the tens of MB range.

Environment

  • OS: Pop!_OS 24.04 LTS
  • Kernel: 6.18.7-76061807-generic
  • CPU: 12th Gen Intel Core i7-1255U
  • GPU: Intel Alder Lake-UP3 GT2 (Iris Xe Graphics)
  • RAM: 40 GB

Steps to reproduce

  1. Log in to a COSMIC session normally.
  2. Use the desktop as usual (no unusual workloads required).
  3. Observe cosmic-session memory after ~24–36 hours of uptime.

Observed behavior

After ~36 hours of uptime, cosmic-session (PID 2697) shows:

VmRSS:    1,573,224 kB  (~1.54 GB)
VmHWM:    4,247,312 kB  (~4.05 GB peak)
VmData:   1,574,712 kB
Heap:     1,567,956 kB  (~1.53 GB — 99.7% of RSS)
VmSwap:         604 kB
Threads:          2
Open FDs:        68

Additional context

  • The peak RSS of 4.05 GB suggests the leak may be intermittent or accelerated under certain conditions, then partially reclaimed before settling at ~1.5 GB.
  • Restarting the session (logging out/in) temporarily resolves the issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions