Skip to content

Memory leak: RSS grows unboundedly over multi-day runs #2040

@schickling-assistant

Description

@schickling-assistant

Description

btm 0.12.3 on Linux x86_64 accumulates RSS unboundedly when left running for multiple days. A process started on Apr 13 reached 28 GB RSS by Apr 16 (~3 days), exhausting the host's 15 GB swap and causing OOM pressure on other processes.

Environment

  • btm --version: bottom 0.12.3
  • OS: NixOS, Linux 6.18.13, x86_64
  • Session: started in a fish login shell (-fish with PID as direct child of init), ran unattended for ~3 days

Observed

From /proc/<pid>/status shortly before the process was killed:

VmPeak:  37641600 kB  (~36 GB virtual)
VmRSS:   28244936 kB  (~28 GB resident)
RssAnon: 28242120 kB  (~28 GB anonymous pages)
VmSwap:   1361788 kB  (~1.3 GB in swap)
Threads: 5

The process had been running since Apr 13 (started Apr 13, observed Apr 16 = ~72 hours). Normal RSS for a fresh btm instance on the same machine is in the MB range.

Expected

RSS should remain roughly constant over time regardless of how long btm runs.

Notes

  • The memory growth is almost entirely anonymous pages (RssAnon), suggesting heap growth rather than a mapped-file leak
  • The process had 5 threads at time of observation
  • I don't have a memory profile or heap dump — killed the process to recover the machine

Reported on behalf of @schickling

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions