-
Notifications
You must be signed in to change notification settings - Fork 273
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Memory leak on loading and playing clips #1214
Comments
Thank @saltomodules for reporting this. Armin |
On linux On a freshly started casparcg instance this block list is nicely clean. However when you start playing clips a long and ever growing list of
This goes on for many hundreds and eventually thousands of lines. The more (not played before) clips you play, the longer the list gets. Maybe this helps in pinpointing the source of the memory leak. |
Here you can see / hear whats happening when we keep this going on for some time: https://www.youtube.com/watch?v=f0H6BtmHFuM |
Hi. |
Server 2.2.0 66a9e3e Stable, windows 10 version 1903 And then server crashed. [2019-10-16 23:50:18.909] [error] 0# 0x00007FF79F6598AE in casparcg Now Will test 2.3 |
Does this affect everybody or just select people? I was thinking of upgrading, but now I am not sure if that's a good idea. (We are running 2.1 on Ubuntu 18.04.) |
ping... |
Hi We need more information such as producers and consumers you're using when this issue occurs. It would be beneficial if you also could post your configuration (format it as code please). @dimitry-ishenko, this affects more people. Can you see a pattern such as some specific files or something you do? As much information as possible is good so @Julusian can try find the issue. Thanks |
In our case on linux 18.04: We've tested without any consumers at all or with a decklink consumer enabled with no obvious difference in build up of memory load. The simplest config possible with one 1080i50 channel and no extra producers or consumers showed the same issue To re-emphasise, in our case memory only goes up when a file is played for the first time. For instance, we've tested with a script that plays an entire folder of five hundred h264 files. During the first run of the script memory load shoots up to 10 gigs in no time. However during the second run almost no extra memory load occurs. Maybe this is a hint in which direction to look? File pointers that stay open or perhaps an internal data structure with keys based on filepath that is not properly cleared after a clip ends? |
Also memory load on the gpu and utilization goes up fast after each new clip.
When gpu memory is full and/or utilization becomes too large the output from CasparCG starts stuttering, as mentioned earlier here Perhaps this helps with isolating the issue. |
Duplicate of #1356? |
Expected behaviour
When a clip is removed (when it's done playing or it's channel or layer is cleared, etc) all the memory the clip was using is released back to the system.
Current behaviour
On the Ubuntu build of CasparCG 2.2.2 (and earlier) every clip you load takes up memory which never gets released again until CasparCG is restarted.
Executing a
CLEAR
on the respective layer or channel has no (or little) effect.Often, when you load or play a file that has been used before memory usage does not significantly increase again. However, sometimes it does but it isn't exactly clear why.
It looks a bit as if files are being cached in memory somehow until restart (or crash when system memory ultimately is exhausted).
The Windows version of 2.2.2 does not exhibit this behavior. On
CLEAR
of a channel or layer the memory a clip was using is clearly (mostly) free'd.Steps to reproduce
LOADBG
,LOAD
and orPLAY
a set of clipshtop
to monitor memory usage of the CasparCG processEnvironment
The text was updated successfully, but these errors were encountered: