It's kind of a never completely resolved problem upstream but kodi 19.0 keep crashing after a couple seconds when kodi is build with python 3.9. Same source code (presently kodi-19.0_alpha1_p20200920) built with python 3.8 works flawlessly, no crash. The only useful info I found is kodi seems to crash after ~/.kodi/addons/service.xbmc.versioncheck/resources/lib/runner.py python script ran successfully. Kodi segfault in libpython3.9.so.1.0 *** From kodi_crash log *** ... 2020-09-22 10:57:40.410 T:16566 INFO <general>: AddOnLog: pvr.nextpvr: NextPVR version: 40205 2020-09-22 10:57:40.410 T:16566 INFO <general>: AddOnLog: pvr.nextpvr: Server time offset in seconds: 783 2020-09-22 10:57:40.410 T:16566 INFO <general>: AddOnLog: pvr.nextpvr: time shift buffer in seconds: 1200 2020-09-22 10:57:40.561 T:16553 INFO <general>: My Music: Scanning for music info using worker thread, operation took 00:00 2020-09-22 10:57:41.678 T:16566 INFO <general>: PVR Manager: Starting 2020-09-22 10:57:41.908 T:16607 INFO <general>: PVR Manager: Started 2020-09-22 10:57:41.942 T:16565 INFO <general>: EPG thread started 2020-09-22 10:57:45.371 T:16576 INFO <general>: CPythonInvoker(0, /home/belgix/.kodi/addons/service.xbmc.versioncheck/resources/lib/runner.py): script successfully run ############### END LOG FILE ################ ############ END Kodi CRASH LOG ############# *** dmesg *** [14707.255565] LanguageInvoker[16576]: segfault at 10 ip 00007f8ec312da15 sp 00007f8e6affc9c8 error 4 in libpython3.9.so.1.0[7f8ec3022000+1c7000] [14707.255577] Code: 00 0f 1f 40 00 c3 66 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 8b 05 09 af 1a 00 48 8b 90 38 02 00 00 48 8d b8 58 01 00 00 <48> 8b 4a 10 48 8d 71 40 e9 de f0 ff ff 66 66 2e 0f 1f 84 00 00 00 *** Nasty workaround to confirm the issue with python 3.9 *** 1) Copy libpython3.8.so.1.0 from /usr/lib64 to /usr/lib64/kodi/libpython3.9.so.1.0 2) Type "LD_LIBRARY_PATH=/usr/lib64/kodi:$LD_LIBRARY_PATH kodi" to launch kodi
A little bit more details about this segfault. Seems to appear when calling PyEval_ReleaseLock () Starting program: /usr/lib64/kodi/kodi-x11 [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". [Detaching after vfork from child process 23255] [New Thread 0x7ffff2302640 (LWP 23257)] [New Thread 0x7ffff1b01640 (LWP 23258)] [Thread 0x7ffff1b01640 (LWP 23258) exited] [New Thread 0x7ffff1b01640 (LWP 23259)] [New Thread 0x7ffff1300640 (LWP 23274)] [New Thread 0x7ffff0aff640 (LWP 23275)] [New Thread 0x7fffcbfff640 (LWP 23276)] [Thread 0x7fffcbfff640 (LWP 23276) exited] [New Thread 0x7fffcbfff640 (LWP 23277)] [Detaching after vfork from child process 23278] [New Thread 0x7fffb77ff640 (LWP 23297)] [New Thread 0x7fffb6ffe640 (LWP 23298)] [New Thread 0x7fffb638f640 (LWP 23300)] [New Thread 0x7fffb5ace640 (LWP 23303)] [New Thread 0x7fffb52cd640 (LWP 23304)] [New Thread 0x7fffb490c640 (LWP 23311)] [New Thread 0x7fff9ffff640 (LWP 23312)] [New Thread 0x7fff9f7fe640 (LWP 23313)] [New Thread 0x7fff9effd640 (LWP 23317)] [New Thread 0x7fff9e73c640 (LWP 23323)] [New Thread 0x7fff9df3b640 (LWP 23324)] [New Thread 0x7fff9d73a640 (LWP 23325)] [New Thread 0x7fff9cf39640 (LWP 23327)] [New Thread 0x7fff7bfff640 (LWP 23328)] [New Thread 0x7fff7b7fe640 (LWP 23329)] [New Thread 0x7fff7affd640 (LWP 23330)] [New Thread 0x7fff7a7fc640 (LWP 23331)] [New Thread 0x7fff78f53640 (LWP 23332)] [New Thread 0x7fff79ffb640 (LWP 23334)] Thread 11 "LanguageInvoker" received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7fffb638f640 (LWP 23300)] 0x00007ffff7b8ea15 in PyEval_ReleaseLock () from /usr/lib64/libpython3.9.so.1.0
Found it. Seems Fedora mates got the same issue 3 weeks ago on F33 branch. Full story here. https://forum.kodi.tv/showthread.php?tid=356701 I patched the build with this commit and kodi is back on track when compiled with python 3.9 https://github.com/fuzzard/xbmc/commit/ac4bd3527b2a12f157bedfe08bd19429a2174609
Issue fixed in media-tv/kodi-19.0_alpha2 Tested with dev-lang/python-3.9.0
Thank you!