Solved frequent crashes on shutdown
#1
Hi,

I'm running the nightly build. Since about a month ago, attempting to shutdown kodi from the gui generally (not always, though) results in a crash which always results in a similar stack trace. Here's the latest example:

http://paste.ubuntu.com/p/cBh839tzJM/

Other than that, everything is fine during playback, except all the subtitles addons seem to have stopped working around the same time, and the log also indicates a python issue, but I figured I'd tackle this first.

Thanks for looking!
-- Stanislav




Code:
Thread 1 (Thread 0x7f7b7d7fa700 (LWP 5679)):
#0  0x00007f7bc8b62428 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
#1  0x00007f7bc8b6402a in __GI_abort () at abort.c:89
#2  0x00007f7bcdb5d78f in Py_FatalError () from /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0
#3  0x00007f7bcdb2a67e in PyEval_EvalFrameEx () from /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0
#4  0x00007f7bcdbc1c6c in ?? () from /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0
#5  0x00007f7bcdbc1d43 in PyEval_EvalCodeEx () from /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0
#6  0x00007f7bcda49ac8 in ?? () from /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0
#7  0x00007f7bcdafe46e in PyObject_Call () from /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0
#8  0x00007f7bcdada80f in PyObject_CallFunctionObjArgs () from /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0
#9  0x00007f7bcdaf849c in PyObject_ClearWeakRefs () from /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0
#10 0x00007f7bcda09997 in ?? () from /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0
#11 0x00007f7bcda31c37 in PyDict_SetItem () from /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0
#12 0x00007f7bcda245eb in _PyModule_ClearDict () from /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0
#13 0x00007f7bcdb67b3c in PyImport_Cleanup () from /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0
#14 0x00007f7bcdb67cb7 in Py_EndInterpreter () from /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0
#15 0x0000000000aac4b9 in CPythonInvoker::execute(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::vector<std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >, std::allocator<std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > > > const&) ()
#16 0x0000000000aad803 in CPythonInvoker::execute(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&) ()
#17 0x0000000000aafe20 in CPythonInvoker::Execute(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&) ()
#18 0x0000000000f79505 in CThread::Action() ()
#19 0x0000000000f7cac4 in ?? ()
#20 0x0000000000f7e21f in ?? ()
#21 0x00007f7bc7df8c80 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#22 0x00007f7bcff846ba in start_thread (arg=0x7f7b7d7fa700) at pthread_create.c:333
#23 0x00007f7bc8c3441d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109
Reply
#2
Unfortunately your log isn't a Debug Log. You can enable debug logging via advancedsettings.xml in case you don't want to be bothered by the screen overlay.
Reply
#3
(2019-11-25, 17:30)DaVu Wrote: Unfortunately your log isn't a Debug Log. You can enable debug logging via advancedsettings.xml in case you don't want to be bothered by the screen overlay.

Sure. Here's the debug log.

Thanks,
-- Stanislav
Reply
#4
May possibly be related to https://github.com/xbmc/xbmc/issues/16936

If you can build from source, you could try pulling in https://github.com/xbmc/xbmc/pull/16812 and seeing if it results in a cleaner shutdown. Reportedly it does fix the issue listed above, and there is at least some commonality in the crash logs, so fingers crossed i guess.
Reply
#5
Yes, this seems to solve the issue for me as well. Just for reference, below are the commands I used to apply the patch, then I compiled in the usual way.

I restarted about 10 times since then without issues.

Thanks!
-- Stanislav


Code:

$ git clone git://github.com/xbmc/xbmc.git                
Cloning into 'xbmc'...
remote: Enumerating objects: 18, done.
remote: Counting objects: 100% (18/18), done.
remote: Compressing objects: 100% (15/15), done.
remote: Total 536778 (delta 5), reused 3 (delta 3), pack-reused 536760
Receiving objects: 100% (536778/536778), 695.08 MiB | 23.05 MiB/s, done.
Resolving deltas: 100% (399712/399712), done.
Checking connectivity... done.
$ cd xbmc
$ git remote add -f jimfcarroll  https://github.com/jimfcarroll/xbmc.git
Updating jimfcarroll
remote: Enumerating objects: 585, done.
remote: Counting objects: 100% (585/585), done.
remote: Total 872 (delta 585), reused 585 (delta 585), pack-reused 287
Receiving objects: 100% (872/872), 1.02 MiB | 0 bytes/s, done.
Resolving deltas: 100% (676/676), completed with 316 local objects.
From https://github.com/jimfcarroll/xbmc
 * [new branch]      appparser  -> jimfcarroll/appparser
 * [new branch]      codegenerated-addons-jsonrpc-example -> jimfcarroll/codegenerated-addons-jsonrpc-example
 * [new branch]      di         -> jimfcarroll/di
 * [new branch]      diexample  -> jimfcarroll/diexample
 * [new branch]      example1   -> jimfcarroll/example1
 * [new branch]      executor   -> jimfcarroll/executor
 * [new branch]      feature_python3 -> jimfcarroll/feature_python3
 * [new branch]      leak-detection -> jimfcarroll/leak-detection
 * [new branch]      master     -> jimfcarroll/master
 * [new branch]      mt-testing -> jimfcarroll/mt-testing
 * [new branch]      pre-codegenerator -> jimfcarroll/pre-codegenerator
 * [new branch]      std-thread -> jimfcarroll/std-thread
 * [new branch]      test-test  -> jimfcarroll/test-test
$ git remote -v
jimfcarroll    https://github.com/jimfcarroll/xbmc.git (fetch)
jimfcarroll    https://github.com/jimfcarroll/xbmc.git (push)
origin    git://github.com/xbmc/xbmc.git (fetch)
origin    git://github.com/xbmc/xbmc.git (push)
$ git cherry-pick 312ee95425f3d47215093e3fd0c67de1f42c8c28
[master f1cd511] Revert "Revert "Reusepython""
 Author: Jim Carroll <[email protected]>
 Date: Sun Oct 20 15:51:20 2019 -0400
 15 files changed, 424 insertions(+), 219 deletions(-)
$
Reply
#6
Great, thanks for the confirmation
Reply

Logout Mark Read Team Forum Stats Members Help
frequent crashes on shutdown0