Bug 355402

Summary: Memory Leak in DVB EPG grabber
Product: [Applications] kaffeine Reporter: lev.cohan
Component: generalAssignee: Mauro Carvalho Chehab <mchehab>
Status: RESOLVED FIXED    
Severity: critical CC: claus.priisholm, mchehab, xkennyx
Priority: NOR    
Version First Reported In: 1.x   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Kaffeine system log
Kaffeine log of a 15 minutes test run with 1 GiB memory usage.

Description lev.cohan 2015-11-16 02:14:57 UTC
Since version 1.3 kaffeine has a memory leak. 
Version 1.3.1 hasn't fixed this issue.

I use kaffeine mainly for watching live TV with my two DVB-C TV cards.
As soon as I let kaffeine idle the memory usage rises quickly.
While watching live TV the memory usage also rises but at a 
much slower pace. 

The reason is probably the DVB EPG grabber, see attached kaffeine log.

To this bug report attached is also a excerpt of my system log where kaffeine is killed because its memory usage grows to 10GiB-15GiB. When a out of memory exception happens a data loss is very probable. A few times my window manager was unresponsive and had to be killed too and with it all running programs.

Reproducible: Always

Steps to Reproduce:
1. Start kaffeine (memory usage: 34.1 MiB )
2.  Start live TV playback of a channel. (memory usage: 188.2MiB )
3.  Stop live TV playback (memory usage: 48.6MiB )
4.  See the memory usage of kaffeine rise about 1 MiB every second.

Actual Results:  
Memory usage rises quickly to 1 GiB after 15 Minutes of idle time. 

Expected Results:  
Memory usage stays more or less predictable depending on the usage scenario.
Comment 1 lev.cohan 2015-11-16 02:16:34 UTC
Created attachment 95524 [details]
Kaffeine system log
Comment 2 lev.cohan 2015-11-16 02:39:58 UTC
Created attachment 95525 [details]
Kaffeine log of a 15 minutes test run with 1 GiB memory usage.
Comment 3 C. Priisholm 2016-01-19 09:32:35 UTC
I am seeing a similar behaviour - when DVB-T playback runs memory consumption seems reasonably stable. As soon as the it is paused or stopped memory usage grows at about 1/2MByte extra per second.

Version 1.3-git
KDE platform 4.14.10
OpenSuse LEAP 42.1 64bit
Comment 4 Mauro Carvalho Chehab 2016-06-07 12:02:52 UTC
I'm doing some tests here with Kaffeine 2.0.1, but I'm not seeing any memory increase. Could you please re-test with Kaffeine 2.0.1?
Comment 5 lev.cohan 2016-06-14 06:36:53 UTC
This seems to be fixed with 2.01 to 2.03.

I have only encountered a small increase in memory usage of about 6 MiB by changing channels which are on different transponders. This way I easily managed  to increase memory usage from 48 MiB to 108 MiB and the memory isn't free by stopping playback.
Comment 6 Mauro Carvalho Chehab 2016-06-14 09:40:08 UTC
(In reply to lev.cohan from comment #5)
> This seems to be fixed with 2.01 to 2.03.
> 
> I have only encountered a small increase in memory usage of about 6 MiB by
> changing channels which are on different transponders. This way I easily
> managed  to increase memory usage from 48 MiB to 108 MiB and the memory
> isn't free by stopping playback.

An increase as new EPG data is feed is expected. So, it seems that this issue was fixed. So, I'm closing the bug.