Solved Memory leak with Krypton beta1?
#1
Still relatively new to linux, so please be kind. After doing a fresh install of Lubuntu 16.04.1 (previously on 14.04 with Kodi 16), I installed Krypton beta1 . When playing any MPEG2 recorded TV show (720p or 1080i, from a Mythtv backend), any attempt at skipping ahead/back results in Kodi freezing and crashing out. With the debug window turned on, free memory goes from 3GB out of 4 down to about 200k within a few seconds. At the end of kodi.log, there is a warning of low memory as well. CPU usage is very low, all video settings set per Fritsch's EGL thread, going to software decoding doesn't change anything. H264 encoded movies seem to play fine with no significant decrease in free memory. Hardware is an i3 Chromebox with 4GB of system memory. apt-get update/upgrade hasn't changed anything. Downgrading to Jarvis, no playback problems. What did I screw up?

Before Fritsch yells through his keyboard:
$ dpkg -l |grep mesa | pastebinit
http://paste.ubuntu.com/23109396/
$ DISPLAY=:0 vainfo | pastebinit
libva info: VA-API version 0.39.2
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_0_39
libva info: va_openDriver() returns 0
http://paste.ubuntu.com/23109397/
$ cat ~/.kodi/temp/kodi.log | pastebinit
http://paste.ubuntu.com/23109417/
$ dmesg | pastebinit
http://paste.ubuntu.com/23109421/
$ amixer | pastebinit
http://paste.ubuntu.com/23109424/

Does that vainfo section (returns 0) point to something missiing? I went back to the EGL thread and checked to make sure the appropriate packages were installed and didn't seem to be missing anythhing. Thanks for any help.
Reply
#2
Nothing to yell. Congrats you found a bug.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#3
Same with the same recording, but played via files and not the myth pvr Addon?
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#4
@fritsch: It's this: http://forum.kodi.tv/showthread.php?tid=...pid2402265
Texture Cache Maintenance Utility: Preload your texture cache for optimal UI performance. Remotely manage media libraries. Purge unused artwork to free up space. Find missing media. Configurable QA check to highlight metadata issues. Aid in diagnosis of library and cache related problems.
Reply
#5
Wondering as for PVR passthrough should not be in use ... Don't forget to report in the original PR.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#6
Can you verify the issues is gone with reverting that commit?
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#7
(2016-08-30, 09:13)fritsch Wrote: Can you verify the issues is gone with reverting that commit?

Yes, I (and one other) have verified that reverting PR10247 fixes the OOM while seeking with passthrough enabled.

I've posted details to the PR, there's a sample video available to reproduce the issue.
Texture Cache Maintenance Utility: Preload your texture cache for optimal UI performance. Remotely manage media libraries. Purge unused artwork to free up space. Find missing media. Configurable QA check to highlight metadata issues. Aid in diagnosis of library and cache related problems.
Reply
#8
wrong PR linked?
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#9
Sorry fat fingers. Post updated.
Texture Cache Maintenance Utility: Preload your texture cache for optimal UI performance. Remotely manage media libraries. Purge unused artwork to free up space. Find missing media. Configurable QA check to highlight metadata issues. Aid in diagnosis of library and cache related problems.
Reply
#10
I don't see an immediate issue in that change :-( thought it was the split_data but the unref later also removes the alloced side_data, let's wait until fernet comes back from holidays.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#11
Unfortunately I'm not able to confirm behaviour on my Ubuntu x86_64 box as my Radeon video card doesn't support passthrough, but reproducing in LE is easy enough, and without PR10247 the problem is gone. I've also tested a "plain" version of LibreELEC master (based on Kodi 17 beta1) and that has the same OOM behaviour so it's not introduced by any other patch I'm using in my builds.

I guess if @lovemachine can repeat his test with passthrough disabled, this might help confirm we are on the right track.
Texture Cache Maintenance Utility: Preload your texture cache for optimal UI performance. Remotely manage media libraries. Purge unused artwork to free up space. Find missing media. Configurable QA check to highlight metadata issues. Aid in diagnosis of library and cache related problems.
Reply
#12
Hooray! I'm useful!

Playing the file directly, not through PVR service, still results in the same problem (not in the log posted below). Disabling passthrough DOES solve the problem, with no drop in free memory with skipping. Below is a new kodi log with passthrough disabled if it helps.

http://paste.ubuntu.com/23112048/
Reply
#13
Here a video:
https://www.youtube.com/watch?v=fUspLVStPbk

With the text (ignore the other propaganda, just the refrain):
Because

Every log is useful.
Every log is great.
If a log is missing,
fritsch is goin' to yell.

CHILDREN:
Every log is useful.
Every log is great.
If a log is missing,
fritsch is goin' to yell.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#14
Fixed it in master.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#15
(2016-08-31, 16:18)fritsch Wrote: Fixed it in master.

Danke, Fritsch. I'll add the nightly repo tonight (US Pacific time) and check it out.
Reply

Logout Mark Read Team Forum Stats Members Help
Memory leak with Krypton beta1?0