Kodi "skipping" playing movies and music (after being on for a few days)

  • Scenerio

    I have been using various incarnations of Kodi for over a decade - most of that time with Intel and Linux o/s of some kind. In the last couple years I have faced “skipping” (e.g., periodic sound gaps) with both music (I use FLAC and some 320 kbps) and movies (usually mkv with 1080p x265, sometimes 4K) after the box has been on for a few days. When I reboot, it works fine for a while and then will get to the same state. Keeping in mind that I have had linux boxes on for years at a time with no memory leaks, etc, the current incarnation of kodi appears to be grabbing up resources over time…

    It does not appear to be a buffering or data issue as this is all Ethernet wired with a proper 1 GB switch and the local server is fast and only serving up files via NFS shares. Using the Speed Test program I was able to see over 350 Mbps reads from the Internet from Kodi box, testing the network connection, router, etc. The server’s disk themselves serve up 108MB/s via Black Magic Disk Test (that’s bytes not bits) Making it perfectly fine for 8K movies and beyond. Put another way, a 6 GB mkv file reads from the server in just over a minute.

    The culprit here seems to be the kodi program itself (vs. OS/hardware) from the last couple years. I have tried a few skins with same results. This even happened with the prior hardware (a smaller NUC) I had, so literally the entire NUC has been replaced over time to combat this issue thinking there was some hardware/driver glitch. About two months ago I did a completely new install with wiped disk etc. via LibreELEC. I recreated the library, minimized any add ons and basically made it as clean as possible - same result.

    When we are at the stage that the skipping will start - the CPU fan might be audible, debug info on the screen shows 110% CPU (one thread at 100% some of the others used) and memory usage at 85% of 16 GB. That is for idle when nothing is cataloging or playing. At that point if I start a movie it just plays with no affect to the stats being displayed… In contrast, when I restart the box we are are at 10% CPU and 5% memory usage on idle. Memory and CPU will grow over time after that.

    Since it is tough for me to interpret log files, I am asking for some help to determine root cause. There appears to be some cataloging going on in the log while movie is playing, but I know nothing was started by me manually…

    I have uploaded some log files (during problem, after restart, crash log from prior day). I purposely played a stereo 720p movie at x264, just to keep things as low-fi as possible with the issue happening. The issues happens when the movie called "phantom.of.the.paradise.1974.mkv" plays. I also uploaded the top screen shot at idle after being up for a few days.

    Thanks for any help!

    Kodi Install

    Kodi 19.4 (19.4.0) Git: 19.4-Matrix

    Installed from scratch with LibreELEC 10.0.2 distribution via USB drive, drive wiped a few months ago

    No updates have been applied as that is latest for LibreELEC

    Was using Confluence Skin, now using Arctic Zephyr 2 with same results

    Hardware

    Intel NUC 7 mini PC kit NUC7i7BNH Core i7

    Integrated GPU Mesa Intel Iris Plus Graphics 650 (Kaby Lake GT3e) (KBL GT3)

    Product Specifications
    quick reference guide including specifications, features, pricing, compatibility, design documentation, ordering codes, spec codes and more.
    ark.intel.com

    Screen Resolution [email protected] - Full screen

    OpenGL vendor: Intel

    OpenGL version: 4.6 (Core Profile) Mesa 21.03

    Windowing system x11

    Samsung 960 EVO Series - 250GB PCIe NVMe - M.2 Internal SSD (MZ-V6E250BW)

    Crucial 16GB Kit (8GBx2) DDR4 2400 MT/s (PC4-19200) DR x8 Unbuffered SODIMM 260-Pin Memory - CT2K8G4SFD824A

    Only HDMI out and Ethernet In - No USB keyboards or other interfaces installed

    Networking

    Hardwired Ethernet Gbit connection

    Wireless is not enabled

    All files (movies, music, pictures etc) are accessed via NFS Share on Internal Server