Kodi Restarting several times a night

  • Hi

    I am a long time Kodi user now for 15yrs plus. I currently have 4 instances in my house on various hardware but I am more and more frequently getting resets. Kodi locks up, goes to a black screen and restarts kodi. The activity at the time can be anything but our most comon use is Live TV, streaming Catchup TV or playing a LAN file. Generally the crash is not caused by any input of the controls, just while watching.

    I keep thinking new versions will fix it but so far although some versions are more stable than others but I still get reboots.

    I really want to get to the bottom of it as 4-5 restarts an evening is not ideal for a primary tv source. I have completly wiped and started new builds a few times and still no luck. I am really at a dead end. I have also tried a RPi4 and although its a little more stable still get reboots.

    The only remaining cause could be network issues but the VM is the worst and its running on the Unraid server that hosts the files so althought I don't know the ins and outs of how a Bridged Network works on VM its the same machine as the files so shouldnt be.

    Below is a brief on the setup.


    Local Infrastructure:

    Unraid Server running dockers for TVHeadend and also NextPVR (tried both to see if one was the cause)

    TV Input from an HDHomerun

    Gigbit Network

    Unifi Internet Gateway Managing DHCP, DNS etc

    Local files played from Unraid Samba share


    Kodi Instance - VM:

    Undraid VM of LibreElec running Generic.x86_64-10.0.2

    Nvidia GT710 Card

    Default Skin

    Only addons are catchup tv style

    Log File: VM Log File


    Any help to try and poinpoint this would be great.

  • Code
    Thread 1 (Thread 0x7f201a7fc640 (LWP 46193)):
    #0  0x000000000099719a in ?? ()
    #1  0x00000000009993a0 in ?? ()
    #2  0x00000000009993a0 in ?? ()
    #3  0x0000000000999777 in CJSONVariantWriter::Write(CVariant const&, std::string&, bool) ()
    #4  0x0000000000d4bc90 in JSONRPC::CJSONRPC::MethodCall(std::string const&, JSONRPC::ITransportLayer*, JSONRPC::IClient*) ()
    #5  0x0000000000c97b6d in JSONRPC::CTCPServer::CTCPClient::PushBuffer(JSONRPC::CTCPServer*, char const*, int) ()
    #6  0x0000000000ca0d16 in JSONRPC::CTCPServer::Process() ()
    #7  0x00000000009ccb72 in CThread::Action() ()

    It is crashing in JSONRPC. Start by adding component logging.

  • My LE network is made up of a cheap x86_64 server and five CoreELEC clients, two at home, and three away from home in different locations and even in another country. All devices perform a daily backup on the server, a daily reboot, a playback stop when the remote is not used for three hours, two of them act as network gateways, and the possibility of shutdown is disabled so that I can do updates at any time. Everything works perfectly for me and my experience tells me that kodi restarts only with dodgy addons. Find them and uninstall them!

  • If you let me know what to cut out I can otherwise the log file is below

    You can delete lines with log spam matching DEBUG <CSettingsManager>: requested setting (.*) was not found. or trying to load setting definitions from old format.


    Code
    Thread 1 (Thread 0x7f7efc42e600 (LWP 7766)):#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:49#1  0x00007f7efdfc4526 in __GI_abort () at abort.c:79#2  0x00007f7efde6f80c in ?? () from /usr/lib/libstdc++.so.6#3  0x00007f7efde7a8e6 in ?? () from /usr/lib/libstdc++.so.6#4  0x00007f7efde7a951 in std::terminate() () from /usr/lib/libstdc++.so.6#5  0x00007f7efde7abe4 in __cxa_throw () from /usr/lib/libstdc++.so.6
    #7  0x00007f7efdeb91f1 in std::string::_Rep::_S_create(unsigned long, unsigned long, std::allocator<char> const&) () from /usr/lib/libstdc++.so.6

    Check with journalctl which exception is thrown.

  • Hi

    I have dumped this using the comand journalctl | paste

    There is a ton of one LE instance constantly querying the one that crashed as per below

    Code
    Sep 06 05:40:28 LibreELEC nmbd[824]: [2022/09/06 05:40:28.524455,  0] ../../source3/nmbd/nmbd_namequery.c:109(query_name_response)
    Sep 06 05:40:28 LibreELEC nmbd[824]:   query_name_response: Multiple (2) responses received for a query on subnet 192.168.XX.XX for name WORKGROUP<1d>.
    Sep 06 05:40:28 LibreELEC nmbd[824]:   This response was from IP 192.168.XX.XX, reporting an IP address of 192.168.XX.XX.

    Otherwise the lines that indicate the crash and restart of the Kodi instance is:

  • There are two times std::bad_alloc exception and the segmentation fault of OP.

    But I do not see a cause for this. Assuming kodi did not run out of memory there are only the dodgy addons mentioned in post 4 causing memory corruption.

  • Hi

    Its a VM with 8gig of memory so should be ok.

    The only add-ons I had were Australian catch up TV and netflix

    Tonight I disabled all add-ons except tvheadend pvr but it crashed about 1min after pausing the TV.

    I can attach the logs again if needed.