Sunshine icon indicating copy to clipboard operation
Sunshine copied to clipboard

Memory leak using KMS capture

Open skaface opened this issue 6 months ago • 0 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Is your issue described in the documentation?

  • [X] I have read the documentation

Is your issue present in the latest beta/pre-release?

This issue is present in the latest pre-release

Describe the Bug

I am running sunshine on a headless VPS server using software encoding. When using X11 for desktop capture it works fine, however the other day I switched to using KMS which also works, however my machines memory usage creeps up over the course of a day. Using htop I see that when I first start sunshine I am using around 1gb total of memory, and by the end of the day the entire 8gb is full and my server is almost unresponsive. Interestingly htop reports that the sunshine process is still only using 3% of my systems memory which makes me wonder if there is actually a bug in the modesetting/kms drivers rather than sunshine. I can restart the sunshine process and memory usage drops back to around 1gb. I am sorry that I cannot offer any more details right now, hopefully I can receive some help on how to provide some more useful feedback regarding this issue.

Expected Behavior

Expecting that memory usage should remain constant

Additional Context

No response

Host Operating System

Linux

Operating System Version

arch linux

Architecture

64 bit

Sunshine commit or version

0.23.1

Package

other (self built)

GPU Type

none (software encoding)

GPU Model

Red Hat, Inc. Virtio 1.0 GPU

GPU Driver/Mesa Version

virtio-pci

Capture Method

KMX (Linux)

Config

av1_mode = 1
min_threads = 1
encoder = software
hevc_mode = 1
fec_percentage = 15
capture = kms

Apps

No response

Relevant log output

.

skaface avatar Aug 23 '24 05:08 skaface