ammen99 / wf-recorder

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Apparent Memory Leak

John-Paul-R opened this issue · comments

I'm back!

When recording with wf-recorder memory usage just keeps going up, at a fairly rapid pace. I believe this is a new issue. Haven't noticed it until the most recent update, at least (though wf-recorder was broken for me recently, until #251's last commits).

Of note, the output file does still increase in side on disk while the recording is happening.

This issue is reproducible on my machine with:

wf-recorder -f /tmp/$(date +'%Y-%m-%d_%H-%M-%S.mp4') -o DP-1

Here is a video (recorded with `wf-recorder!) of my memory ticking up until I hit my machine's limit (3x speed):

wf-recorder-memleak-vid-until-max.mp4.3x.mp4

And a snapshot shortly after killing wf-recorder:

wf-recorder-memleak-afterkill

here are some logs:

command

WAYLAND_DEBUG=1 wf-recorder -f /tmp/$(date +'%Y-%m-%d_%H-%M-%S.mp4') -o DP-1 &> /tmp/vid.log

logs: https://gist.github.com/John-Paul-R/f09f0904240c1cb9f24f0b6237f6d3e9


version info:

yay -Q wf-recorder
# latest `master` afaict
wf-recorder-git r209.060ddc5-1

You are aware that /tmp/ is likely to be tmpfs, and therefore you're recording to RAM, right?

I was not aware of that! However I also encounter the issue when recording to other directories. e.g.

wf-recorder -f ~/Videos/a-real-path.mp4 -o DP-1

yields similar memory graphs. (The original graph, in fact, was taken while recording to ~/Videos/somefile)

Hmm. I'll see if I can reproduce it to help out debugging it, in case the developer can't reproduce it.

Edit: Can't reproduce it after a minute of recording a 3840x2160 display to hard drive.

I restarted my PC, and suddenly can no longer reproduce the issue. I suspect I had some broken local state. Closing!