-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Addons crashing Kodi Matrix v19.0-6 in Arch Linux #19324
Comments
Can you get a crashlog? The debug log won't explain the reason for the crash. Either way I suspect this is YABDBR (yet another busydialog bug report :) ) |
Kodi crash log: |
you need to install gdb to get a stack trace |
Oops, hope this is it: |
The first thing I noticed is numpy I remember I had to downgrade that in Kodi Leia: |
Just to let you know.... There's a PR to bump the Python version to 3.8.8 (from 3.8.5). I somewhat guess we might backport that to Kodi Matrix as it fixes some CVEs and also for the reason it's micro-version-bump. But I highly guess we won't bump the minor version (3.8->3.9) for Matrix as the changelog compare to 3.8 is not that small ;) |
Thanks for the reply. |
this is a known issue pillow+numpy in Linux sualfred/script.embuary.helper#28 |
|
In Debian, Python 3.9.1 is in testing and no new issues spotted so far (other than the fix I reported and rolled into RC1) |
Current version of Python in Arch is 3.9.2-1. |
I tried pyenv, set Python v3.8.5 as global, ran "pyenv exec kodi" a number of times, but after checking kodi.log it seems to use Python v3.9.2 instead of what pyenv suggested. |
If anyone has any suggestions, feel free to comment. |
Same issue still exists in Kodi v19.0-9. |
Kodi is really only tested against the python version we have in our depends, so I would suggest using that version. I believe python 3.9 may require other changes. It's unlikely Kodi 19 will fully support anything above 3.8 however we are always open to fixes. No one that I know of is actively working on it though. |
I am now gonna make a snapshot of my Kodi development VM running Debian testing and install python3 3.9.2-2 from unstable. If PIL crash is reproducible I will check the stacktrace. If not, you can port 3.9.2-2 from Debian to Arch and see which patch in Debian packaging (or a patch in Arch packaging) brings an error. About the VMThe VM has the following addons installed at the moment:
Tests Run:
Run 1: Update Python3 only - works as expectedroot@kodi-test:~# apt install -t unstable python3
Зчитування переліків пакунків... Виконано
Побудова дерева залежностей... Виконано
Зчитування інформації про стан... Виконано
The following additional packages will be installed:
libpython3-stdlib libpython3.9 libpython3.9-minimal libpython3.9-stdlib python3-minimal python3.9 python3.9-minimal
Пропоновані пакунки:
python3-doc python3-tk python3-venv python3.9-venv python3.9-doc binfmt-support
Пакунки, які будуть ОНОВЛЕНІ:
libpython3-stdlib libpython3.9 libpython3.9-minimal libpython3.9-stdlib python3 python3-minimal python3.9 python3.9-minimal
оновлено 8, встановлено 0 нових, 0 відмічено для видалення і 69 не оновлено.
Необхідно завантажити 6 694 kB архівів.
Після цієї операції об'єм зайнятого дискового простору зменшиться на 104 kB.
Бажаєте продовжити? [Y/n] y
Отр:1 http://deb.debian.org/debian unstable/main amd64 python3.9 amd64 3.9.2-1 [466 kB]
Отр:2 http://deb.debian.org/debian unstable/main amd64 libpython3.9 amd64 3.9.2-1 [1 691 kB]
Отр:3 http://deb.debian.org/debian unstable/main amd64 python3.9-minimal amd64 3.9.2-1 [1 955 kB]
Отр:4 http://deb.debian.org/debian unstable/main amd64 libpython3.9-minimal amd64 3.9.2-1 [801 kB]
Отр:5 http://deb.debian.org/debian unstable/main amd64 libpython3.9-stdlib amd64 3.9.2-1 [1 684 kB]
Отр:6 http://deb.debian.org/debian unstable/main amd64 python3-minimal amd64 3.9.2-2 [38,2 kB]
Отр:7 http://deb.debian.org/debian unstable/main amd64 python3 amd64 3.9.2-2 [37,8 kB]
Отр:8 http://deb.debian.org/debian unstable/main amd64 libpython3-stdlib amd64 3.9.2-2 [21,3 kB]
Отримано 6 694 kB за 2сB (3 427 kB/s)
Reading changelogs... Done
(Reading database ... 82037 files and directories currently installed.)
Preparing to unpack .../python3.9_3.9.2-1_amd64.deb ...
Unpacking python3.9 (3.9.2-1) over (3.9.1-4) ...
Preparing to unpack .../libpython3.9_3.9.2-1_amd64.deb ...
Unpacking libpython3.9:amd64 (3.9.2-1) over (3.9.1-4) ...
Preparing to unpack .../python3.9-minimal_3.9.2-1_amd64.deb ...
Unpacking python3.9-minimal (3.9.2-1) over (3.9.1-4) ...
Preparing to unpack .../libpython3.9-minimal_3.9.2-1_amd64.deb ...
Unpacking libpython3.9-minimal:amd64 (3.9.2-1) over (3.9.1-4) ...
Preparing to unpack .../libpython3.9-stdlib_3.9.2-1_amd64.deb ...
Unpacking libpython3.9-stdlib:amd64 (3.9.2-1) over (3.9.1-4) ...
Setting up libpython3.9-minimal:amd64 (3.9.2-1) ...
Setting up python3.9-minimal (3.9.2-1) ...
(Reading database ... 82037 files and directories currently installed.)
Preparing to unpack .../python3-minimal_3.9.2-2_amd64.deb ...
Unpacking python3-minimal (3.9.2-2) over (3.9.1-1) ...
Setting up python3-minimal (3.9.2-2) ...
(Reading database ... 82037 files and directories currently installed.)
Preparing to unpack .../python3_3.9.2-2_amd64.deb ...
running python pre-rtupdate hooks for python3.9...
Unpacking python3 (3.9.2-2) over (3.9.1-1) ...
Preparing to unpack .../libpython3-stdlib_3.9.2-2_amd64.deb ...
Unpacking libpython3-stdlib:amd64 (3.9.2-2) over (3.9.1-1) ...
Setting up libpython3.9-stdlib:amd64 (3.9.2-1) ...
Setting up libpython3-stdlib:amd64 (3.9.2-2) ...
Setting up libpython3.9:amd64 (3.9.2-1) ...
Setting up python3.9 (3.9.2-1) ...
Setting up python3 (3.9.2-2) ...
running python rtupdate hooks for python3.9...
running python post-rtupdate hooks for python3.9...
Processing triggers for mailcap (3.68) ...
Processing triggers for libc-bin (2.31-9) ...
Processing triggers for man-db (2.9.4-2) ... Run 2: Update Python3-pil on top of updated Python3 - works as expected
Run 3: Update all Python3 packages - works as expectedroot@kodi-test:~# apt install -t unstable $(dpkg -l | grep " python3-" | awk '{print $2}')
Зчитування переліків пакунків... Виконано
Побудова дерева залежностей... Виконано
Зчитування інформації про стан... Виконано
python3-avahi is already the newest version (0.8-5).
python3-chardet is already the newest version (4.0.0-1).
python3-chardet позначений як встановлений вручну.
python3-dbus is already the newest version (1.2.16-5).
python3-ldb is already the newest version (2:2.2.0-3+b1).
python3-ldb позначений як встановлений вручну.
python3-olefile is already the newest version (0.46-3).
python3-olefile позначений як встановлений вручну.
python3-bluez is already the newest version (0.23-3).
python3-bluez позначений як встановлений вручну.
python3-pycryptodome is already the newest version (3.9.7+dfsg1-1+b2).
python3-pycryptodome позначений як встановлений вручну.
python3-pycurl is already the newest version (7.43.0.6-5).
python3-pycurl позначений як встановлений вручну.
python3-gattlib is already the newest version (0~20201113-1+b1).
python3-gattlib позначений як встановлений вручну.
python3-gi is already the newest version (3.38.0-2).
python3-gi позначений як встановлений вручну.
python3-pysimplesoap is already the newest version (1.16.2-3).
python3-pysimplesoap позначений як встановлений вручну.
python3-apt is already the newest version (2.1.7).
python3-apt позначений як встановлений вручну.
python3-certifi is already the newest version (2020.6.20-1).
python3-certifi позначений як встановлений вручну.
python3-debian is already the newest version (0.1.39).
python3-debian позначений як встановлений вручну.
python3-debianbts is already the newest version (3.1.0).
python3-debianbts позначений як встановлений вручну.
python3-httplib2 is already the newest version (0.18.1-3).
python3-httplib2 позначений як встановлений вручну.
python3-idna is already the newest version (2.10-1).
python3-idna позначений як встановлений вручну.
python3-urllib3 is already the newest version (1.26.2-1).
python3-urllib3 позначений як встановлений вручну.
python3-gdbm is already the newest version (3.9.2-1).
python3-gdbm позначений як встановлений вручну.
python3-pyudev is already the newest version (0.22.0-2).
python3-usb is already the newest version (1.0.2-2).
python3-requests is already the newest version (2.25.1+dfsg-2).
python3-requests позначений як встановлений вручну.
python3-six is already the newest version (1.15.0-2).
python3-six позначений як встановлений вручну.
python3-talloc is already the newest version (2.3.1-2+b1).
python3-talloc позначений як встановлений вручну.
python3-pil is already the newest version (8.1.1-1).
python3-pil позначений як встановлений вручну.
python3-minimal is already the newest version (3.9.2-2).
python3-minimal позначений як встановлений вручну.
The following additional packages will be installed:
debconf debconf-i18n reportbug
Пропоновані пакунки:
debconf-doc debconf-utils libterm-readline-gnu-perl libgtk3-perl libnet-ldap-perl debconf-kde-helper python3-setuptools default-mta
| postfix | exim4 | mail-transport-agent debsums dlocate python3-urwid reportbug-gtk xdg-utils emacs-bin-common claws-mail
Пакунки, які будуть ОНОВЛЕНІ:
debconf debconf-i18n python3-debconf python3-pkg-resources python3-reportbug reportbug
оновлено 6, встановлено 0 нових, 0 відмічено для видалення і 62 не оновлено.
Необхідно завантажити 822 kB архівів.
Після цієї операції об'єм зайнятого дискового простору зросте на 0 B.
Бажаєте продовжити? [Y/n] y
Отр:1 http://deb.debian.org/debian unstable/main amd64 python3-debconf all 1.5.75 [4 016 B]
Отр:2 http://deb.debian.org/debian unstable/main amd64 debconf-i18n all 1.5.75 [206 kB]
Отр:3 http://deb.debian.org/debian unstable/main amd64 debconf all 1.5.75 [145 kB]
Отр:4 http://deb.debian.org/debian unstable/main amd64 reportbug all 7.10.3 [135 kB]
Отр:5 http://deb.debian.org/debian unstable/main amd64 python3-reportbug all 7.10.3 [143 kB]
Отр:6 http://deb.debian.org/debian unstable/main amd64 python3-pkg-resources all 52.0.0-3 [189 kB]
Отримано 822 kB за 1сB (691 kB/s)
Reading changelogs... Done
Передналаштування пакунків...
(Reading database ... 82024 files and directories currently installed.)
Preparing to unpack .../python3-debconf_1.5.75_all.deb ...
Unpacking python3-debconf (1.5.75) over (1.5.74) ...
Preparing to unpack .../debconf-i18n_1.5.75_all.deb ...
Unpacking debconf-i18n (1.5.75) over (1.5.74) ...
Preparing to unpack .../debconf_1.5.75_all.deb ...
Unpacking debconf (1.5.75) over (1.5.74) ...
Setting up debconf (1.5.75) ...
(Reading database ... 82024 files and directories currently installed.)
Preparing to unpack .../reportbug_7.10.3_all.deb ...
Unpacking reportbug (7.10.3) over (7.10.2) ...
Preparing to unpack .../python3-reportbug_7.10.3_all.deb ...
Unpacking python3-reportbug (7.10.3) over (7.10.2) ...
Preparing to unpack .../python3-pkg-resources_52.0.0-3_all.deb ...
Unpacking python3-pkg-resources (52.0.0-3) over (52.0.0-1) ...
Setting up python3-pkg-resources (52.0.0-3) ...
Setting up python3-debconf (1.5.75) ...
Setting up debconf-i18n (1.5.75) ...
Setting up python3-reportbug (7.10.3) ...
Setting up reportbug (7.10.3) ...
Processing triggers for man-db (2.9.4-2) ... |
Can you add plugin.video.themoviedb.helper from jurialmunkey's Matrix repo to your VM? |
The crash was in numpy. You are going to need to install that to have any chance of duplicating it |
Downgrading Arch's python means essentially breaking the system. |
I installed and it throws an error on first invocation but works otherwise: The log on first invocation: |
And the version list: root@kodi-test:~# dpkg -l | egrep "kodi|python"
ii kodi 2:19.0+dfsg1-1 amd64 Open Source Home Theatre (executable binaries)
ii kodi-bin 2:19.0+dfsg1-1 amd64 Open Source Home Theatre (architecture-dependent files)
ii kodi-bin-dbgsym 2:19.0+dfsg1-1 amd64 debug symbols for kodi-bin
ii kodi-data 2:19.0+dfsg1-1 all Open Source Home Theatre (arch-independent data package)
ii kodi-eventclients-common 2:19.0+dfsg1-1 all Open Source Home Theatre (Event Client Common package)
ii kodi-eventclients-kodi-send 2:19.0+dfsg1-1 all Open Source Home Theatre (Event Client Kodi-SEND package)
ii kodi-inputstream-adaptive 2.6.7+ds1-1 amd64 Adaptive inputstream addon for Kodi
ii kodi-inputstream-ffmpegdirect 1.19.2+ds1-1 amd64 FFmpegDirect inputstream addon for Kodi
ii kodi-inputstream-rtmp 3.4.0+ds1-2 amd64 Kodi input stream addon for RTMP
ii kodi-pvr-iptvsimple 7.4.2+ds1-1 amd64 IPTV Simple Client Kodi PVR Addon
ii kodi-repository-kodi 2:19.0+dfsg1-1 all Open Source Home Theatre (official addons repository feed)
ii kodi-visualization-spectrum:amd64 3.4.0+ds1-2 amd64 Spectrum visualizer addon for Kodi
ii libboost-python1.74.0 1.74.0-8 amd64 Boost.Python Library
ii libpython2.7-minimal:amd64 2.7.18-1 amd64 Minimal subset of the Python language (version 2.7)
ii libpython2.7-stdlib:amd64 2.7.18-1 amd64 Interactive high-level object-oriented language (standard library, version 2.7)
ii libpython3-stdlib:amd64 3.9.2-2 amd64 interactive high-level object-oriented language (default python3 version)
ii libpython3.9:amd64 3.9.2-1 amd64 Shared Python runtime library (version 3.9)
ii libpython3.9-minimal:amd64 3.9.2-1 amd64 Minimal subset of the Python language (version 3.9)
ii libpython3.9-stdlib:amd64 3.9.2-1 amd64 Interactive high-level object-oriented language (standard library, version 3.9)
ii python-apt-common 2.1.7 all Python interface to libapt-pkg (locales)
ii python2.7 2.7.18-1 amd64 Interactive high-level object-oriented language (version 2.7)
ii python2.7-minimal 2.7.18-1 amd64 Minimal subset of the Python language (version 2.7)
ii python3 3.9.2-2 amd64 interactive high-level object-oriented language (default python3 version)
ii python3-apt 2.1.7 amd64 Python 3 interface to libapt-pkg
ii python3-avahi 0.8-5 amd64 Python utility package for Avahi
ii python3-bluez 0.23-3 amd64 Python 3 wrappers around BlueZ for rapid bluetooth development
ii python3-certifi 2020.6.20-1 all root certificates for validating SSL certs and verifying TLS hosts (python3)
ii python3-chardet 4.0.0-1 all universal character encoding detector for Python3
ii python3-dbus 1.2.16-5 amd64 simple interprocess messaging system (Python 3 interface)
ii python3-debconf 1.5.75 all interact with debconf from Python 3
ii python3-debian 0.1.39 all Python 3 modules to work with Debian-related data formats
ii python3-debianbts 3.1.0 all Python interface to Debian's Bug Tracking System
ii python3-gattlib 0~20201113-1+b1 amd64 Bluetooth LE GATT library for Python 3
ii python3-gdbm:amd64 3.9.2-1 amd64 GNU dbm database support for Python 3.x
ii python3-gi 3.38.0-2 amd64 Python 3 bindings for gobject-introspection libraries
ii python3-httplib2 0.18.1-3 all comprehensive HTTP client library written for Python3
ii python3-idna 2.10-1 all Python IDNA2008 (RFC 5891) handling (Python 3)
ii python3-ldb 2:2.2.0-3+b1 amd64 Python 3 bindings for LDB
ii python3-minimal 3.9.2-2 amd64 minimal subset of the Python language (default python3 version)
ii python3-olefile 0.46-3 all Python module to read/write MS OLE2 files
ii python3-pil:amd64 8.1.1-1 amd64 Python Imaging Library (Python3)
ii python3-pkg-resources 52.0.0-3 all Package Discovery and Resource Access using pkg_resources
ii python3-pycryptodome 3.9.7+dfsg1-1+b2 amd64 cryptographic Python library (Python 3)
ii python3-pycurl 7.43.0.6-5 amd64 Python bindings to libcurl (Python 3)
ii python3-pysimplesoap 1.16.2-3 all simple and lightweight SOAP Library (Python 3)
ii python3-pyudev 0.22.0-2 all Python3 bindings for libudev
ii python3-reportbug 7.10.3 all Python modules for interacting with bug tracking systems
ii python3-requests 2.25.1+dfsg-2 all elegant and simple HTTP library for Python3, built for human beings
ii python3-six 1.15.0-2 all Python 2 and 3 compatibility library (Python 3 interface)
ii python3-talloc:amd64 2.3.1-2+b1 amd64 hierarchical pool based memory allocator - Python3 bindings
ii python3-urllib3 1.26.2-1 all HTTP library with thread-safe connection pooling for Python3
ii python3-usb 1.0.2-2 all USB interface for Python (Python3)
ii python3.9 3.9.2-1 amd64 Interactive high-level object-oriented language (version 3.9)
ii python3.9-minimal 3.9.2-1 amd64 Minimal subset of the Python language (version 3.9) |
But jurialmunkey's addon does not use numpy! Which addon is using numpy, @CgCgCgCgCg ? |
And that's the mystery |
On my logs on top, I mentioned this is a blank Kodi 19 with just one addon TMDb Helper. |
Yes, but PIL/Pillow does in its ImageFilter module which is used by TMDbH: |
You were right :) Immediate crash after I installed
|
Trying to increment the memory which points to non-address: |
I found that the formatted string smashes the memory: |
@jurialmunkey fixed his TMDb Helper addon, but the PIL issue remains for other addons and skins and only Kodi devs can fix it for all. |
As far as im conerned, its not a kodi issue, You are going to have to take it up with PIL and numpy to sort out the crash. |
I opened an issue on Pillow: |
I'm trying to run Kodi on Arch as well and I can't seem to get Kodi to use a virtual environment or pyenv. Any pointers on how Kodi is looking for Python? |
Kodi links in the python library and runs it's own python interpreter. It's not possible to use pyenv outside of kodi. |
I tried the Flatpak Kodi Matrix version and the PIL issue doesn't exist -probably because it uses its own platform and libraries. |
The Arch version of Kodi 19 (and possibly others too) still suffers from crashing due to that issue. Not necessarily. Try, for example, temporarily inserting a raise RuntimeError() at the top of numpy/init.py and starting up Kodi. I'm not familiar with Kodi, so you'll have to find out how Kodi logs Python tracebacks from it and its plugins. That traceback should show you which part of Kodi or its plugins is importing numpy (possibly through an intermediate like Pillow). You will have to modify that code to not attempt importing numpy (or the intermediate library). Since numpy has never worked with sub-interpreters, the (re)introduced bug is in the code that is trying to import numpy, so I'm going to close this." |
Further investigating using the way above revealed that script.module.websocket imports numpy and it's the root of the problem -so far. `
|
@pkscout can you look at this please?
|
I'll see if I can find some time today. I had no idea web sockets imported numpy, and I need to see what might be affected if we just don't import it. |
OK, I looked through the code, and it appears that with Python3 numpy is used as a more efficient way of doing some data masking (for what, I don't know), but the fallback Python2 routine works in Python3 as well (at least in my limited testing). For the scripts I have that use websocket, I can't tell any performance difference. So I will try and do a PR today or tomorrow with an updated module for the official repo. |
|
script.module.websocket update submitted for review at xbmc/repo-scripts#2023 |
Bug report
Describe the bug
Here is a clear and concise description of what the problem is:
Some addons crash, reading the logs I suspect that's because Arch Linux uses Python v3.9.2.
As an example, on an empty Kodi, I installed just TheMovieDb Helper and after restarting Kodi I tried to open it and it freezes, then shuts down after a few seconds. See the log.
Expected Behavior
Here is a clear and concise description of what was expected to happen:
Kodi 19 addons should work in Linux.
Actual Behavior
Some Kodi 19 addons don't work in Linux.
Possible Fix
To Reproduce
Steps to reproduce the behavior:
Debuglog
The debuglog can be found here:
https://pastebin.com/KYcH0FnW
Screenshots
Here are some links or screenshots to help explain the problem:
Additional context or screenshots (if appropriate)
Here is some additional context or explanation that might help:
Your Environment
Used Operating system:
Android
iOS
tvOS
Linux
OSX
Windows
Windows UWP
Operating system version/name:
Arch Linux
Kodi version:
Kodi v19.0-6
note: Once the issue is made we require you to update it with new information or Kodi versions should that be required.
Team Kodi will consider your problem report however, we will not make any promises the problem will be solved.
The text was updated successfully, but these errors were encountered: