[x86-64] What to log to find the reason for hangs?

  • I installed LibreElec on a Wyse Thin Client some time ago and from the beginning on I had issues with zhe system. Usually I can watch one episode of a series, flawlessly, but most of the time I start getting issues when starting another one.

    I also have the feeling that it's not that I view something, but it seems to be related to the system itself hanging after, maybe an hour or two.

    I just upgraded to the newest 12.2 version and I'm wondering which files to constantly monitor in order to see what's the reason for the hangs.

    Currently I'm running this from my Laptop:

    Code
    while (true)
    do
        (date;ssh kodiwyse 'uptime;echo "-------";dmesg')>kodiwyse.txt
        head -2 kodiwyse.txt
        sleep 30
    done

    So just monitoring dmesg. Is there anything else you recommend to look out for?

  • Just log at log level 1...

    Please provide a full debug log.

    How to post a log (wiki)

    1. Enable debugging in Settings>System Settings>Logging
    2. Restart Kodi
    3. Replicate the problem
    4. Generate a log URL (do not post/upload logs to the forum)

    use "Settings > LibreELEC > System > Paste system logs" or run "pastekodi" over SSH, then post the URL link
  • But when the issue occurs, the system is unresponsive and I have to switch it off to get it to work again.

    For such cases use cat /storage/.kodi/temp/kodi.old.log | pastebinit from SSH, and post the resulting URL. kodi.old.log contains the data from the last session with the crash.

    Before you start logging, set the log level to 1 at advancedsettings.xml, and reboot.

  • Try this:

    Add

    vm.overcommit_memory=2
    vm.overcommit_ratio=100
    vm.vfs_cache_pressure=1000

    to /storage/.config/sysctl.d/sysctl.conf

    Also add

    MALLOC_ARENA_MAX=1

    to /storage/.config/kodi.conf (create the file if it's not there)

    Reboot.

  • Quote

    set the log level to 1 at advancedsettings.xml

    vm.overcommit_memory=2
    vm.overcommit_ratio=100
    vm.vfs_cache_pressure=1000

    to /storage/.config/sysctl.d/sysctl.conf

    MALLOC_ARENA_MAX=1

    to /storage/.config/kodi.conf (create the file if it's not there)

    Reboot.

    I did that now and will check tomorrow whether or not the system will hang again after about 1-1.5h of playback.

    Quote

    ATM it's unclear whether it's a crash or a hanger.

    Not a crash, I assume, because the system still displays the last frame of whatever I was watching. Also there is no crashlog after switching off and on again.