Memory leak in Kodi 17 on Ubuntu

Added by Jonathan Holvey 14 days ago

Hi,

Since upgrading Tvheadend from version 4.0 to 4.2 I've been experiencing a crash in Kodi after an hour or so of live TV through Tvheadend. It took me a while, but I've traced this to a memory leak in Kodi when running on Ubuntu.

I've posted to the Kodi PVR forum section, but so far I haven't been able to resolve the issue.

What steps can I take to determine if this is an issue with my system, or a Kodi bug?

This is what I know so far:
  • My Tvheadend server is running version 4.2.3 on Ubuntu 16.04.3 with kernel 4.4.0, as is my main Kodi install
  • All Kodi instances are version 17.6, and the HTS client Kodi addon is version 3.4.27
  • Kodi running on another Ubuntu 16.04.3 computer (but with kernel 4.10.0) also leaks memory in the same way, at about 40 MB per minute
  • Kodi running on Windows 7 is fine, even when the server runs out of memory
  • Both Kodi on Ubuntu and Tvheadend report dropped packets in their log files just before the memory is exhausted
  • A clean Kodi install/config on Ubuntu doesn't help
  • A clean Tvheadend config doesn't help
  • My tuner is a BGT3620 using drivers built from here. I've ordered a TBS6281SE to replace it, but it hasn't arrived yet
  • I only have one TVB-T2 tuner enabled in Tvheadend

Here's a log from Kodi on Ubuntu https://pastebin.com/YA5BUuFX
Here's part of a log from Tvheadend https://pastebin.com/k8pkL12L
Here's my thread on the Kodi forum. Sorry it's a bit long-winded https://forum.kodi.tv/showthread.php?tid=322181
Attached is a copy of my Tvheadend config

What should I do next?

tvheadend.zip - Tvheadend config (785 KB)


Replies (3)

RE: Memory leak in Kodi 17 on Ubuntu - Added by Mark Clarkstone 14 days ago

Have you tried turning off hardware decoding in Kodi?

RE: Memory leak in Kodi 17 on Ubuntu - Added by Jonathan Holvey 14 days ago

Thanks Mark! Disabling hardware decoding in Kodi stops the memory leak. However, my CPU isn't up to the task of decoding HD streams.

What could be the cause? Maybe a graphics driver issue? I'm just using the generic Radeon driver that comes bundled with Ubuntu.

RE: Memory leak in Kodi 17 on Ubuntu - Added by Mark Clarkstone 14 days ago

Jonathan Holvey wrote:

Thanks Mark! Disabling hardware decoding in Kodi stops the memory leak. However, my CPU isn't up to the task of decoding HD streams.

What could be the cause? Maybe a graphics driver issue? I'm just using the generic Radeon driver that comes bundled with Ubuntu.

Quite possibly. You could give this ppa a try to see if that helps.

Let us know how to get on.

(1-3/3)