Bug 1939885

Summary: Python 3.10.0a6 regression caused segfaults in packages using Cython
Product: [Fedora] Fedora Reporter: Tomáš Hrnčiar <thrnciar>
Component: python3.10Assignee: Victor Stinner <vstinner>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: cstratak, dmalcolm, fschwarz, igor.raits, lbalhar, m.cyprian, mhroncok, ndbecker2, projects.rg, pviktori, python-sig, rkuska, shcherbina.iryna, slavek.kabrda, steve.traylen, thrnciar, tomspur, torsava, vstinner
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-04-13 09:41:47 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:
Bug Depends On:    
Bug Blocks: 1890881, 1939888, 1939892, 1939893, 1939912, 1939915, 1939924, 1939942, 1939951    

Description Tomáš Hrnčiar 2021-03-17 09:34:36 UTC
I noticed there are some packages that fail with a segmentation fault when build with Python 3.10. All of them are using Cython. This is a common bugzilla and I'll open a separate bugzilla for each package.

Comment 1 Raphael Groner 2021-03-17 19:46:10 UTC
Propably let's try to rebuild Cython due to changed gcc settings maybe. In assumption as first attempt that could simply help to fix failing execution of some tests seen in referenced packages.

Comment 2 Raphael Groner 2021-03-17 20:01:27 UTC
Please consider https://github.com/cython/cython/blob/master/runtests.py for %check.

Comment 3 Tomáš Hrnčiar 2021-03-18 08:14:37 UTC
(In reply to Raphael Groner from comment #1)
> Propably let's try to rebuild Cython due to changed gcc settings maybe. In
> assumption as first attempt that could simply help to fix failing execution
> of some tests seen in referenced packages.

I've tried to rebuilt Cython, but python-jnius fails with the same error.
See: https://download.copr.fedorainfracloud.org/results/@python/python3.10/fedora-rawhide-x86_64/02080888-python-jnius/builder-live.log.gz

Comment 4 Miro Hrončok 2021-03-18 08:16:37 UTC
Note that currently Cython is not compiled on Python 3.10, we use the pure Python implementation. Hence rebuilding Cython has no possitive/negative side effects, it just copy-pastes Python files around.

Comment 5 Victor Stinner 2021-03-18 10:31:21 UTC
Cython has multiple compatibility issues with Python 3.10. I created https://github.com/cython/cython/issues/4046 meta issue to track them all.

I wrote 3 fixes to port Cython 0.29.x to Python 3.10:

* https://github.com/cython/cython/pull/4042
* https://github.com/cython/cython/pull/4044
* https://github.com/cython/cython/pull/4045

Comment 6 Victor Stinner 2021-03-18 10:32:40 UTC
Miro reported https://github.com/cython/cython/issues/4025 "[BUG] Cython 0.29.22 SIGSEGV with Python 3.10.0a6" upstream.

Comment 7 Victor Stinner 2021-03-18 11:12:40 UTC
> Miro reported https://github.com/cython/cython/issues/4025 "[BUG] Cython 0.29.22 SIGSEGV with Python 3.10.0a6" upstream.

It looks like a Python 3.10 regression in PyEval_EvalCodeEx(). I reported the issue to Python: https://bugs.python.org/issue43541

Comment 8 Miro Hrončok 2021-03-18 12:33:05 UTC
I'm building python3.10 in the Copr with https://github.com/python/cpython/pull/24918