LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Slackware 15.0 and KODI crashing (https://www.linuxquestions.org/questions/slackware-14/slackware-15-0-and-kodi-crashing-4175710467/)

Barcoboy 04-05-2022 02:58 PM

Slackware 15.0 and KODI crashing
 
Greetings.

I have KODI Matrix compiled and running on a few Slackware64 15.0 machines. It's not very stable though and segfaults frequently while trying to do simple things like exiting a menu or getting a list of files to play. The issue seems to be Python 3.9, as if I uninstall 3.9, install the python3-3.8.6-x86_64-2.txz package, and then recompile KODI, it is then very stable. I use my own script to compile, but I've also tried compiling KODI using the SlackBuild file, and installing KODI via Flatpak, but the same instability occurs with Python 3.9. So I was wondering two things.

1) Is there a way to get a list of all packages that are dependant on Python 3.9, so that I can uninstall and recompile them to use Python 3.8?

-OR-

2) Am I able to compile and install Python 3.8 under say /usr/local and then tell KODI to use that when building? (I can't seem to find an option in the KODI build process to do so.)

Thanks in advance.

bassmadrigal 04-05-2022 05:26 PM

Quote:

Originally Posted by Barcoboy (Post 6344195)
1) Is there a way to get a list of all packages that are dependant on Python 3.9, so that I can uninstall and recompile them to use Python 3.8?

This should get most, if not all that are compiled against python3.9.

Code:

grep python3\\.9 /var/lib/pkgtools/packages/ | cut -d/ -f5 | cut -d: -f1 | uniq
Quote:

Originally Posted by Barcoboy (Post 6344195)
2) Am I able to compile and install Python 3.8 under say /usr/local and then tell KODI to use that when building? (I can't seem to find an option in the KODI build process to do so.)

It looks like there is this cmake option:

Code:

-DPYTHON_VERSION=${PYTHON_VERSION}
It might just try and use a python${PYTHON_VERSION} binary within the $PATH.

Out of curiosity, have you found any consistent way to make kodi crash? I am the one who updated the SBo SlackBuild to build 19.4 and I didn't see any crashes when I was testing it after building, but I haven't migrated my htpc to 15.0 yet to run it full-time. I'd be interested in trying to track down the culprit and see if we can get a fix integrated into the SlackBuild.

Barcoboy 04-05-2022 07:54 PM

Quote:

Originally Posted by bassmadrigal (Post 6344228)
It looks like there is this cmake option:

Code:

-DPYTHON_VERSION=${PYTHON_VERSION}
It might just try and use a python${PYTHON_VERSION} binary within the $PATH.

Thanks for your post bassmadrigal. I've made some advancements. After running cmake to configure, I went back to my build directory and typed "cmake -LA", and I found these three build options which are related to Python:

Code:

PYTHON_EXECUTABLE:FILEPATH=/usr/bin/python3
PYTHON_INCLUDE_DIR:PATH=/usr/include/python3.9
PYTHON_LIBRARY:FILEPATH=/usr/lib64/libpython3.9.so

So I've renamed my python3 package to python38-3.8.6-x86_64-2.txz, and was able to install it along with the standard 15.0 python3-3.9 package. I then modified my build script to include:

Code:

-DPYTHON_EXECUTABLE:FILEPATH=/usr/bin/python38
-DPYTHON_INCLUDE_DIR:PATH=/usr/include/python3.8
-DPYTHON_LIBRARY:FILEPATH=/usr/lib64/libpython3.8.so

Trying a build now... we'll see how it works.

Quote:

Originally Posted by bassmadrigal (Post 6344228)

Out of curiosity, have you found any consistent way to make kodi crash? I am the one who updated the SBo SlackBuild to build 19.4 and I didn't see any crashes when I was testing it after building, but I haven't migrated my htpc to 15.0 yet to run it full-time. I'd be interested in trying to track down the culprit and see if we can get a fix integrated into the SlackBuild.

I don't think it is the SlackBuild's fault or KODI itself. Things are fairly stable when KODI is first installed, but the problems start once addons get installed. The worst one for me is the YouTube addon. I can install it, run the initial configuration, import my API key, and then login. But once I've done all that, if I start KODI, start the YouTube addon, and then immediately go back to the main menu, KODI segfaults every time. I've seen other people having the same sort of problems, and everybody says steering away from Python 3.9 and going back solves their issues. The skin "Amber" that I use also seems to make things less stable.

bassmadrigal 04-05-2022 09:38 PM

Quote:

Originally Posted by Barcoboy (Post 6344239)
I don't think it is the SlackBuild's fault or KODI itself. Things are fairly stable when KODI is first installed, but the problems start once addons get installed. The worst one for me is the YouTube addon. I can install it, run the initial configuration, import my API key, and then login. But once I've done all that, if I start KODI, start the YouTube addon, and then immediately go back to the main menu, KODI segfaults every time. I've seen other people having the same sort of problems, and everybody says steering away from Python 3.9 and going back solves their issues. The skin "Amber" that I use also seems to make things less stable.

I don't know what happened... I reinstalling kodi and dependencies (after realizing I screwed up the REQUIRES line by including the optional shairplay and leaving out platform -- gotta send in a fix for that) and installed the YouTube addon.

Like you, I got crashes when exiting the addon. I then tried installing inputstream.adaptive and its dependency and still had a crash. I then went in and enabled debugging in the settings to hopefully get more from the log (because I have no idea what to do with the backtrace included with the crashlog and the non-debug log wasn't helpful) and now I can't get it to crash again. It seems to be stable and solid when using the YouTube addon and exiting back to the main kodi screen.

Weird!

Do you happen to have links for the other bug reports with this? I'd be interested to see if any of them led to a patch that I could apply to prevent it from happening in the first place.

Barcoboy 04-05-2022 09:56 PM

Quote:

Originally Posted by bassmadrigal (Post 6344253)
I don't know what happened... I reinstalling kodi and dependencies (after realizing I screwed up the REQUIRES line by including the optional shairplay and leaving out platform -- gotta send in a fix for that) and installed the YouTube addon.

Like you, I got crashes when exiting the addon. I then tried installing inputstream.adaptive and its dependency and still had a crash. I then went in and enabled debugging in the settings to hopefully get more from the log (because I have no idea what to do with the backtrace included with the crashlog and the non-debug log wasn't helpful) and now I can't get it to crash again. It seems to be stable and solid when using the YouTube addon and exiting back to the main kodi screen.

Weird!

Yeah, sometimes that would happen for me too, but it would eventually crash again. Two other places KODI would crash in the YouTube addon are sometimes after a video had finished playing (it seemed the longer the video was, the more apt it was to crash), and right after submitting a new search or removing an existing search.

Quote:

Originally Posted by bassmadrigal (Post 6344253)
Do you happen to have links for the other bug reports with this? I'd be interested to see if any of them led to a patch that I could apply to prevent it from happening in the first place.

And naturally I cannot find any of the previous pages I had found in the past! Grrrr...

The good news is that the new build options seem to be working... KODI is back to being stable on one machine I tested it on. Will try the same thing on my other machines and do more thorough testing tomorrow.

bassmadrigal 04-06-2022 01:31 AM

Shoot, well, I have been able to consistently get it to crash with using the search and trying to remove that search entry. I also found it crashed after playing a Netflix show, so it doesn't seem to be related to just the YouTube addon.

I'll be playing around with this some more tomorrow (it's getting late) and see if I can get a bug report submitted to the kodi devs (which from reading a few other reports, sounds like it might actually be a cpython issue). I might have to try a nightly build to see if it's occurring with the eventual v20. I don't think it'd be good to include python3.8 with the kodi package on SBo, so we'll need to figure out a way forward.

Barcoboy 04-07-2022 12:36 PM

Glad that you were able to reproduce it consistently, and hopefully the devs will be able to solve it. In the meantime, my further testing with both Python 3.8 for KODI and 3.9 installed for everything else has gone well, with only one crash when exiting the YouTube addon back to the main menu. A while back I did try building Nexus but had the same instability-not sure if it would be any better now.

Wondering if anybody would have the SlackBuild source files for the 3.8 build? I was able to get the last packaged version of 3.8 from the Slackware UK Cumulative archive, but all of my Google and archive.org searches for the 3.8 source files have turned up empty. I tried using the 3.9 SlackBuild, but there are patches that fail to apply with the 3.8 code. Would like to upgrade my 3.8.6 package to 3.8.13.

bassmadrigal 04-07-2022 04:57 PM

Quote:

Originally Posted by Barcoboy (Post 6344608)
Glad that you were able to reproduce it consistently, and hopefully the devs will be able to solve it. In the meantime, my further testing with both Python 3.8 for KODI and 3.9 installed for everything else has gone well, with only one crash when exiting the YouTube addon back to the main menu. A while back I did try building Nexus but had the same instability-not sure if it would be any better now.

I ended up having a big event for work come up this week into the weekend, so I might not be able to track the bug down this weekend.

Quote:

Originally Posted by Barcoboy (Post 6344608)
Wondering if anybody would have the SlackBuild source files for the 3.8 build? I was able to get the last packaged version of 3.8 from the Slackware UK Cumulative archive, but all of my Google and archive.org searches for the 3.8 source files have turned up empty. I tried using the 3.9 SlackBuild, but there are patches that fail to apply with the 3.8 code. Would like to upgrade my 3.8.6 package to 3.8.13.

https://git.slackware.nl/current would have what you're looking for, but you'd need to go back through the history of the python3 SlackBuild to find when it was building 3.8 (if it was even modified... it might have the exact same build options as 3.9).

Barcoboy 04-07-2022 09:24 PM

Quote:

Originally Posted by bassmadrigal (Post 6344634)
https://git.slackware.nl/current would have what you're looking for, but you'd need to go back through the history of the python3 SlackBuild to find when it was building 3.8 (if it was even modified... it might have the exact same build options as 3.9).

Many thanks for that. I was able to build a 3.8.13 package, and everything continues to work fine.

Keep me posted about your bug tracking.

alias11 06-21-2022 01:02 PM

Quote:

Originally Posted by Barcoboy (Post 6344655)
Many thanks for that. I was able to build a 3.8.13 package, and everything continues to work fine.

Keep me posted about your bug tracking.

Can you help me out ? Please share the Files or Links, Slackbuilds etc. I need a working Kodi on my Slackware 15 Install. Thx.

fourtysixandtwo 06-22-2022 01:21 AM

Quote:

Originally Posted by Barcoboy (Post 6344655)
Many thanks for that. I was able to build a 3.8.13 package, and everything continues to work fine.

Keep me posted about your bug tracking.

I haven't used it in a while on my desktop (use LibreElec on an rpi normally) but trying it now, it does indeed crash.

Have you tried python 3.9.13? I found this comment https://github.com/xbmc/xbmc/issues/...ent-1153126673 that implies it fixes the issue and is something the LibreElec devs found.

Compiled and installed the python3 source for 3.9.13 from -current and I haven't been able to get it to crash yet.

alias11 06-22-2022 07:47 AM

Quote:

Originally Posted by fourtysixandtwo (Post 6362680)
I haven't used it in a while on my desktop (use LibreElec on an rpi normally) but trying it now, it does indeed crash.

Have you tried python 3.9.13? I found this comment https://github.com/xbmc/xbmc/issues/...ent-1153126673 that implies it fixes the issue and is something the LibreElec devs found.

Compiled and installed the python3 source for 3.9.13 from -current and I haven't been able to get it to crash yet.

I would like to try, but i dont know whre i have to look. https://git.slackware.nl/current i dont know how to handle that site.
Please link me to the slackbuild and the source. Thanks and sorry.

fourtysixandtwo 06-22-2022 03:19 PM

Quote:

Originally Posted by alias11 (Post 6362722)
I would like to try, but i dont know whre i have to look. https://git.slackware.nl/current i dont know how to handle that site.
Please link me to the slackbuild and the source. Thanks and sorry.

Here's an easy method.

Code:

mkdir python3
cd python3
lftp -c "mirror https://mirrors.kernel.org/slackware/slackware64-current/source/d/python3 ."
#make sure the version is still the one we want (3.9.13)

#as root
cd /path_used_above/python3
sh ./python3.SlackBuild

#if the build is successful
upgradepkg /tmp/python3-3.9.13-x86_64-1.txz


bassmadrigal 06-22-2022 03:40 PM

I'll have to check if that newer python fixes it on my system. I tried installing a python3.8 next to the system python3.9 and I went down a rabbit hole of missing dependencies from python that I needed to force a python3.8 build within the SlackBuild scripts (and keep the existing python3.9 to not break system apps) and then upgrade those packages. I lost my patience after like 10 or 15 packages and still having build failures of kodi.

Barcoboy 06-22-2022 03:51 PM

I can confirm that Python3 3.9.13 does seem to fix the crashing problems I was having.

fourtysixandtwo beat me to it. I was going to post a tutorial on how to do the upgrade after I had done some testing, but my power went out for a couple of hours today so I didn't get time to finish until now. I think though that the lftp "mirror" command will create the subdirectory locally when transferring files, so you may end up with python3/python3. Not a big deal though.

I'm guessing this or a future version of 3.9 will appear in Slack 15.0 eventually once a security patch becomes necessary, as 3.9.10 was the original version released with 15.0, and the patches directory currently contains 3.9.12.


All times are GMT -5. The time now is 09:56 AM.