Kodi restarts when idle for some time

  • Long time user, first time caller. If my issue is not unique and there are resolved threads, feel free to point me to those. Or if my issue is better suited for the Kodi forums, I can post there too.

    I have Kodi 18.4 installed through LibreElec 9.1.501 on an RPi3. Synology Nas with SMBv3 (forced) hosting media. MariaDB 10 for library. TVHeadend (4.3 latest) in Docker for PVR. Everything is wired LAN through a UniFi managed switch. RPi to Denon AVR to TV via HDMI. Everything works, however, I have a nagging issue. After I turn off my TV, or if I switch sources on my TV to another source, after a period of time Kodi will crash and restart. If I enter my PVR through the main menu (TV > Guide, or TV > Recordings) I can leave it there for a long period of time and it will not crash and restart. If I leave it anywhere else (main screen, TV Shows, or Movies, or even within Settings) when I come back even sometimes as little as 2 hours later, Kodi has restarted.

    Attached are logs and crashlogs from two different RPi setup virtually identical. Hoping someone can point me in a direction to troubleshoot.

    callisto_kodi_crashlog_20191011031313.log

    callisto_kodi.log

    callisto_kodi.old.log

    europa_kodi_crashlog_20191014031818.log

    europa_kodi.log

    europa_kodi.old.log

    Edited once, last by squirtbrnr (October 16, 2019 at 12:12 AM).

  • Interesting. I haven’t installed anything. My steps were:

    - download LE and write to SD card

    - put SD card in RPi and boot

    - configure Kodi to access network media and SQL library on NAS

    - reboot and enjoy

    I get it that memory is tight on the RPi 3, but I haven’t changed anything from the stock image I downloaded. Other than a swap file (which I don’t know is terribly necessary) what would you suggest to start removing any of these “heavy” programs? Additionally, what “heavy” programs are there in the stock LE image?

    EDIT: According to System Information under Kodi > Settings the CPU sits mostly idle at 2%-4% and memory is roughly only 1/4 -1/3 in use.

    Edited once, last by squirtbrnr (October 18, 2019 at 12:16 PM).

  • Ok I see how my post may have been confusing. The RPi 3 runs Kodi on LE. That's it. Everything else runs on my NAS with plenty of memory, storage, and processing power. The RPi is pretty much just a local streaming media player. TVHeadend and MariaDB run in Docker on my NAS. My NAS serves all of the media files over SMB. So unless Kodi is using way too much memory at idle, I don't see what's causing it to restart on LE. That's why I posted logs. It took about 6 or so days, but both Kodi players restarted again, for no apparent reason. Attached are more, but probably the same logs.

    callisto_kodi_crashlog_20191018114512.log

    callisto_kodi.log

    callisto_kodi.old.log

    europa_kodi_crashlog_20191019111455.log

    europa_kodi.log

    europa_kodi.old.log

  • Yes I've had issues with the SMB implementation in Kodi in the past. However, I finally figured out how to get it working through using the sources.xml and mediasources.xml files. I don't have issues actually playing files. A couple times my PVR has frozen and Kodi locked up while playing a live channel but I could still SSH into the RPi and issue a reboot command. That's happened very rarely though and I think it was an issue with the TVH backend.

    I can possibly setup a temporary database, but the problem with changing the paths of all the media in my library is I have other Kodi installs on computers that would then not be able to access the files because the path saved in the library would be invalid for those computers.

    Here's the output of dmesg | paste

    Europa: http://ix.io/1zkk

    Callisto: http://ix.io/1zkm

    EDIT: I should mention Europa is hardwired ethernet via 10/100M, 5V/2.5A PoE injector (Issue still occurs using a stable CanaKit 5V/2.5A power supply and separate ethernet). Callisto is wireless and using a CanaKit 5V/2.5A power supply.

    Edited once, last by squirtbrnr (October 20, 2019 at 7:44 PM).

  • That’s an interesting find. I have experienced situations where while watching a channel through the TVH plugin it freezes video but I still have audio for about a minute then it stops all together and I have to cycle power or issue a reboot command over SSH. But this is rare, though it could be related. Now that I think about it, the times it has rebooted are somewhat synchronized but not exactly in line with when I have updated the Docker container for TVH on my server. I’d have to do some more testing. Can anyone show me in the logs I posted anything that might lead to making this a valid conclusion?

  • My issue doesn't appear related to TVH. I used Kodi about 2-2.5 hours prior to the crash. The TV and AVR the Pi is connected to was on at the time of the crash, but not set to the Kodi input. I only knew it rebooted because I have LEDs behind my TV controlled by Boblight and they turned on at the restart. I was not doing anything on my NAS nor my network at the time. UniFi doesn't report any network interruptions and it shows everything up and online. No Docker containers were restarted either manually or automatically. Here's some more logs from the Kodi crash about 10 minutes ago. I really don't know what I'm looking at or for in the logs. Also the output of dmesg | paste again.

    http://ix.io/202i

    europa_kodi_crashlog_20191027205520.log

    europa_kodi.log

    europa_kodi.old.log

  • LE only crashes while idling in my case. Usually never when under "load".

    Did you get a resolution to this? I'm experiencing a similar problem with LE9.2.1 running on a Raspberry Pi 4 with 4GB memory.

    The system is fine while it's involved with some sort of playback, but has a tendency to restart if it's left idle about once every 12-24hours.

    It's not a major problem, because it's only happening when the system is already idle. But I feel that there's an underlying issue somewhere that I haven't been able to identify.

    I don't think it's power related, because I can run the system under a load without an issue.

    I don't think it's memory; typically there's over 3GB memory available.

    Similarly, it's not running short on storage.