Bug 2034962
Summary: | Regression: Broken subinterpreters affects Kodi and YouTube addon and others | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Michael Cronenworth <mike> |
Component: | python3.10 | Assignee: | Miro Hrončok <mhroncok> |
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 35 | CC: | cstratak, kjell.m.randa, mathieu, mhroncok, python-maint, python-sig, thedatum+bz, thrnciar, torsava, vstinner |
Target Milestone: | --- | Keywords: | Reopened |
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | python3.10-3.10.1-3.fc36 python3.10-3.10.1-3.fc35 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2022-01-16 01:18:45 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Michael Cronenworth
2021-12-22 15:15:23 UTC
There is a patch in the Arch bug tracking system that users report fixes it, but I have not tested it. https://bugs.archlinux.org/task/73002 https://bugs.archlinux.org/task/73002?getfile=20955 The "Exception ignored deletion of interned string failed" error comes from the unicode_dealloc() function when trying to deleted a "mortal" interned string. case SSTATE_INTERNED_MORTAL: { struct _Py_unicode_state *state = get_unicode_state(); /* Revive the dead object temporarily. PyDict_DelItem() removes two references (key and value) which were ignored by PyUnicode_InternInPlace(). Use refcnt=3 rather than refcnt=2 to prevent calling unicode_dealloc() again. Adjust refcnt after PyDict_DelItem(). */ assert(Py_REFCNT(unicode) == 0); Py_SET_REFCNT(unicode, 3); if (PyDict_DelItem(state->interned, unicode) != 0) { _PyErr_WriteUnraisableMsg("deletion of interned string failed", NULL); } assert(Py_REFCNT(unicode) == 1); Py_SET_REFCNT(unicode, 0); break; } It seems like Kodi uses Python subinterpreters (maybe to execute pluggins). Well, this issue is now tracked upstream: https://bugs.python.org/issue46070 Michael: I analyzed https://bugs.python.org/issue46070 and it seems like it's a Python 3.8 regression. Can you confirm that Kodi works on Python 3.7 and older, but crash on Python 3.8 and newer? Does someone know if Kodi always ran pluggins in subintepreters, or it's a recent Kodi change? I've provided this information in the OP. 3.10.0 - no crash 3.10.1 - crash This is exclusively a 3.10.1 issue. Kodi has not changed in any way. I see the same on Fedora 35 witk a Kodi installation compiled locally. Downgrading python from python3-3.10.1-2.fc35.x86_64 to python3-3.10.0-1.fc35.x86_64 and Kodi seems to run just fine without the crash at startup. Kodi information: Starting Kodi (19.2 (19.2.0) Git:20220104-nogitfound). Platform: Linux x86 64-bit 2022-01-10 14:34:23.768 T:40472 INFO <general>: Using Release Kodi x64 2022-01-10 14:34:23.768 T:40472 INFO <general>: Kodi compiled 2022-01-04 by GCC 11.2.1 for Linux x86 64-bit version 5.15.4 (331524) 2022-01-10 14:34:23.768 T:40472 INFO <general>: Running on Fedora Linux 35 (Thirty Five), kernel: Linux x86 64-bit version 5.15.12-200.fc35.x86_64 2022-01-10 14:34:23.768 T:40472 INFO <general>: FFmpeg version/source: 4.4.1 2022-01-10 14:34:23.768 T:40472 INFO <general>: Host CPU: Intel(R) Core(TM) i5-7260U CPU @ 2.20GHz, 4 cores available If I provide a build with this fix applied: https://github.com/python/cpython/pull/30453 -- will you be able to test it? I can test a build. Scratch build, whatever build. Thanks, Miro. Rawhide pull request: https://src.fedoraproject.org/rpms/python3.10/pull-request/90 Fedora 35 pull request: https://src.fedoraproject.org/rpms/python3.10/pull-request/91 If the scratch build succeeds there, you can download it and test it. Thanks Initial testing looks good on F35 + x86_64. No crash on a fresh Kodi / YouTube plugin install. Thanks, Miro. It seems like there is a second bug which is not fixed yet, Python 3.9 and newer are affected: https://bugs.python.org/issue46070#msg409991 I may have to revert the https://github.com/python/cpython/commit/7247407c35330f3f6292f1d40606b7ba6afd5700 change. I'm not sure why, but the bug was only seen on Windows. Right now, the bug can only be reproduced with "import _sre" on Windows with Python 3.9. Installed the needed 3.10.1-3.fc35.x86_64.rpm packages on my F35 x86_64 and Kodi starts without crashing. Thanks for your work. (In reply to Victor Stinner from comment #10) > It seems like there is a second bug which is not fixed yet, Python 3.9 and > newer are affected: https://bugs.python.org/issue46070#msg409991 > > I may have to revert the > https://github.com/python/cpython/commit/ > 7247407c35330f3f6292f1d40606b7ba6afd5700 change. I'm not sure why, but the > bug was only seen on Windows. Right now, the bug can only be reproduced with > "import _sre" on Windows with Python 3.9. So, Linux is not affected and I can proceed with the backport as is, correct? Kjell Randa confirmed that the interned string revert fix the Kodi crash, so it's enough to close this issue. I still care about https://bugs.python.org/issue46070 because in theory, the regression can cause crash on Linux as well. It seems like in practice only Python 3.9 on Windows is affected. This part is handlded upstream, there is no need to track it downstream. FEDORA-2022-23b8acee83 has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2022-23b8acee83 FEDORA-2022-23b8acee83 has been pushed to the Fedora 36 stable repository. If problem still persists, please make note of it in this bug report. Reopening for F35. FEDORA-2022-2303439072 has been submitted as an update to Fedora 35. https://bodhi.fedoraproject.org/updates/FEDORA-2022-2303439072 FEDORA-2022-2303439072 has been pushed to the Fedora 35 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2022-2303439072` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-2303439072 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates. While it's not directly related to this bug, FYI I fixed https://bugs.python.org/issue46070 FEDORA-2022-2303439072 has been pushed to the Fedora 35 stable repository. If problem still persists, please make note of it in this bug report. |