Bug 351062 - Git master 2015-08-07 - Massive memory leak on file loading.
Summary: Git master 2015-08-07 - Massive memory leak on file loading.
Status: RESOLVED FIXED
Alias: None
Product: kdenlive
Classification: Applications
Component: User Interface (show other bugs)
Version: unspecified
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Jean-Baptiste Mardelle
URL:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2015-08-07 14:55 UTC by Evert Vorster
Modified: 2018-09-26 04:27 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Evert Vorster 2015-08-07 14:55:08 UTC
When loading large amounts of files, my system quickly runs out of RAM and starts swapping to disk. 
Previously I was able to load much larger projects on the same machine without running out of RAM. 

Reproducible: Always

Steps to Reproduce:
1. Open 10 - 20 GB worth of files. 
2. Watch system run out of memory.
3. Delete clips from Job Monitor
4. Memory is not returned to the system

Actual Results:  
Memory is quickly depleted.

Expected Results:  
Memory to be managed well, or at least released once a clip has had it's thumbnail made. 

It looks like each clip is loaded into memory to have it's thumbnails made, etc. 
Unfortuanately, it does not look like that memory is ever released, as the memory remains in use, even when the clips are deleted from the Project Monitor. 
The memory is only released when kdenlive is shut down.
Previously I was able to edit projects up to 100GB, and there was no problem.
Comment 1 Jean-Baptiste Mardelle 2015-08-07 22:17:32 UTC
Confirmed, will try to work on it on sunday..
Comment 2 Evert Vorster 2015-10-05 06:54:33 UTC
I am still able to crash my system reliably with large file loads. 

I have a directory with about 300 clips, totalling 71Gb.
When I load this directory into Kdenlive, the memory seems to be much better managed now, with none of my swap being consumed. 
I am actually able to save this kdenlive file as well. 
However, if I select "File" then "New" something completely strange happens: 

In the console I can see thousands of new threads being spawned, and the system quickly chews through 32Gb of swap. (I have my swap on an SSD, it's pretty slick) Then the OOM killer comes around, and it's the end of that kdenlive session.
Comment 3 Evert Vorster 2015-12-17 12:10:03 UTC
I still hit this bug. 
It's a little worse for me now, as I run Kdenlive in a virtual machine on a laptop, so I run out of memory a lot quicker. 

However, I was playing on a monster of a machine a little while ago that has 64Gb of RAM. I still managed to make Kdenlive crash because it ran out of memory. 

I have a lot of 4K footage, and because it was taken with a GoPro, I end up with several 3.7Gb files that I normally load sequentially. 

Unfortunately, Kdenlive does not release the memory of a loaded file, even when the file is removed from the Project Bin. The only way to reclaim that memory is to close the running instance of Kdenlive.
Comment 4 Evert Vorster 2016-02-03 12:33:13 UTC
Using proxy clips seems to ease the memory pressure, but adds a new wrinkle. 
If adding a huge number of clips at the same time, it looks like kdenlive loads all the clips into memory with no regard of how much memory is left on the machine. 

As each proxy clip is produced, the required memory is lessened, so kdenlive is on the right track...

Kdenlive also does not return the memory of clips that are removed from the project bin. Doing that would already be a huge step towards proper memory management
Comment 5 Andrew Crouthamel 2018-09-25 21:42:45 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days, the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information.

For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please set the bug status as REPORTED so that the KDE team knows that the bug is ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 6 Evert Vorster 2018-09-26 04:27:09 UTC
I have not seen this issue in a while.