[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.

  • After installing 12.2.1, I had the system running for a day without using it. No issue at all.

    Then I watched an episode of a series for about an hour. After that, issues started.

    First when starting the next episode, I saw in the debug on screen that the cpu usage went up and the video was heavily distorted with artifacts. Even the on-screen log output wasn't refreshed.

    I stopped playback and waited a minute or so before starting it again. This time there were no artifacts, but I paused playback.

    Currently the system is completely unresponsive, but I haven't had the time yet to reboot and upload the log.

  • https://paste.libreelec.tv/full-ferret.log

    After an hour of playback the system started to act crazy, i.e. the next video started had artifacts and the system reacted slowly. After stopping and starting it seemed okay and I paused it. When I looked next time, the system was frozen. I had to powercycle it.


    Btw. Before I started the first video, the system ran for hours without issues.


    Also the video is streamed over nfs. Previously I streamed via UPNP and had the same issues.


    I installed the newest 12.2.1 from a fresh download on a Wyse 5010 thin client with about 2GB and a 16GB SSD.

    The frozen screen was this.

  • There is no need for multiple threads on the same issue so I have merged the latest post into here.

    Using the latest log we can see the following:

    So playback starts at 7:38p, is paused at 8:00pm, resumed at 8:03pm, then the state tracker goes schizoid at 8:43pm. There is nothing in the log to indicate why, but the most logical explanation is the connection to the media source being interrupted.

    Please run "pastekodi" or "journalctl | paste" and share the URL so we can see what the OS is doing around the same time.