Fedora 33 - Kodi segfaults with Python 3.9
#16
(2020-08-29, 01:52)asavah Wrote: @MastaG could you try this 3/4-assed patch that drops releaselock alltogether?
https://gist.githubusercontent.com/asava...Lock.patch
Works fine for me but on python 3.8.5

@Fuzzard could you please take a look if the patch looks sane to you?

Thanks @asavah
I'm having some half-assed friends staying over today, but I'll be able to test the patch tomorrow.
I'll let you know Smile
Reply
#17
Honestly from my side of things, I think there's more to dig into how Kodi handles it's python threading completely. By all means, send a PR, but I think it's going to need some extensive testing, and I'd be wary of putting it in v19 personally
Reply
#18
If you have time, try the following commit

https://github.com/fuzzard/xbmc/commit/e...17420be9b6 superseded

https://github.com/fuzzard/xbmc/commit/a...29a2174609

Let me know any troubles. Ive done some extra cleanup. Theres a fair bit of legacy stuff around the python implementation.
From my testing (OSX python 3.8.5) i wasnt actually able to get the codepath that triggers XBPython::Finalize(). I have my concerns that we no longer call Py_Finalize (not that i can actually trigger it to call in master). But ive no idea if this might have odd effects on Linux, as its the only platform that can/does call external python. Very interested around how linux use may/may not screw up because of that change in particular.
Reply
#19
apart from a few compile time warnings, it runs fine on linux + python 3.8
i can test linux + python 3.9 later today.

/home/ronie/software/kodi/xbmc/interfaces/python/PythonInvoker.cpp:597:20: warning: unused variable ‘oldThreadState’ [-Wunused-variable]
  597 |     PyThreadState* oldThreadState = PyEval_SaveThread();

/home/ronie/software/kodi/xbmc/interfaces/python/PythonInvoker.cpp:614:18: warning: unused variable ‘oldThreadState’ [-Wunused-variable]
  614 |   PyThreadState* oldThreadState = PyEval_SaveThread();
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#20
@Fuzzard Thank for the proper patch )
Finally had time to build Kodi and give it go with linux (my own "distro") + python 3.8.x.
So far so good. No issues detected.
I'm not a heavy addon user tho, mostly youtube and my own addon which is quite a complex beast which uses python threading, timers, network sockets ... no complains at all.
One thing that I was concerned about while testing my own hacky patch is proper shutdown of Kodi on eg. SIGTERM,
With your patch everything I was able to test works flawlessly.
Reply
#21
i can now also confirm that i'm not noticing any regression on F33 + python 3.9
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#22
A bit late, sorry for that.
But https://github.com/fuzzard/xbmc/commit/a...29a2174609 fixes the issue on Fedora 33.
It works great again!

Thank you!
Reply

Logout Mark Read Team Forum Stats Members Help
Fedora 33 - Kodi segfaults with Python 3.90