[Linux][Canary][Flatpak] Screen sharing continuously leaks module-rt threads, causing resource exhaustion

(#4160) Bug Open: Fix pending Priority: P1

Reproduction steps

  1. On Linux Mint 22.3 (X11/i3), launch Fluxer Canary through Flatpak (app.fluxer.FluxerCanary).
  2. Join a voice channel on a self-hosted Fluxer instance.
  3. Open a terminal and monitor the main fluxer-canary process's thread count.
  4. Start sharing a screen or application.
  5. Observe that the thread count increases continuously, approximately once per second.
  6. Monitor individual thread names and observe an increasing number of module-rt threads.
  7. Stop screen sharing.
  8. Observe that the accumulated threads remain active instead of returning to the original baseline.
  9. Repeat screen sharing to reproduce further accumulation.
The issue also reproduces when launching Fluxer with --disable-gpu.

Expected behaviour

Screen sharing should operate without continuously accumulating threads. Any capture-related threads and resources created during streaming should be released when streaming ends. Repeated screen-sharing sessions should not cause progressive resource consumption or require restarting the application.

Actual behaviour

Starting a screen share causes the main fluxer-canary process to create approximately one new thread per second, predominantly named module-rt. Observed measurements from the same process (PID 326937):
  • 81 total threads, including 22 module-rt threads.
  • 91 total threads, including 30 module-rt threads.
  • Over 100 total threads in a subsequent screenshot.
The additional threads persist after screen sharing stops. Extended or repeated screen-sharing sessions can eventually exhaust system resources and destabilize the desktop client. Fully terminating Fluxer releases the accumulated threads. The issue persists with GPU acceleration disabled. The separate PipeWire and WirePlumber services maintained normal, stable thread counts during the observations. The additional threads accumulated inside Fluxer's main process, not the standalone PipeWire services.

Build information

Canary Desktop 2026.1008.190209, Web 2026.1018.183012, Linux 7.0.0-34-generic (x64), Electron 44.4.1, Chrome 152.0.7977.78, Node 24.21.0, Locale en-US

Platform

Linux, Self-hosting

Evidence

Affected environment
  • OS: Linux Mint 22.3
  • Display server: X11 / Xorg
  • Window manager: i3
  • CPU: AMD Ryzen 7 7800X3D
  • GPU: AMD Radeon RX 7800 XT
  • Installation: Fluxer Canary Flatpak (app.fluxer.FluxerCanary)
  • Multimedia stack: PipeWire / WirePlumber
Diagnostic commands used:
ps -C fluxer-canary -o pid,nlwp,%cpu,%mem --sort=-nlwp
ps -L -p 326937 -o comm= | sort | uniq -c | sort -nr
PipeWire service thread counts:
pipewire         3
pipewire         3
wireplumber      6
pipewire-pulse   3
Disabling GPU acceleration using flatpak run app.fluxer.FluxerCanary --disable-gpu did not prevent thread growth. Screenshots demonstrate the increasing process thread count and accumulation of module-rt threads. The behavior suggests a possible screen-capture/PipeWire resource-lifecycle issue, but the precise root cause has not yet been established.
  1. Hampus changed the status from Needs triage to Fix pending
  1. Hampus linked the pull request fluxer#3529 Merged
  2. The pull request fluxer#3529 was merged Merged

Comments

Sign in with Fluxer to comment and vote.

No comments yet.