Bug 2302520 - python-sqlalchemy: FTBFS in Rawhide due to segmentation fault with Python 3.13.0rc1
Summary: python-sqlalchemy: FTBFS in Rawhide due to segmentation fault with Python 3.1...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: python-sqlalchemy
Version: rawhide
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Nils Philippsen
QA Contact: Fedora Extras Quality Assurance
URL: https://koschei.fedoraproject.org/pac...
Whiteboard:
Depends On: 2303832
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-08-02 15:34 UTC by Ben Beasley
Modified: 2024-08-11 15:18 UTC (History)
3 users (show)

Fixed In Version: python-sqlalchemy-2.0.32-1.fc41
Clone Of:
Environment:
Last Closed: 2024-08-11 13:45:20 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Ben Beasley 2024-08-02 15:34:45 UTC
Description of problem:
Package python-sqlalchemy fails to build from source in Fedora Rawhide due to a segmentation fault that appears to be associated with Python 3.13.0rc1.

Version-Release number of selected component (if applicable):
2.0.31-3.fc41

Steps to Reproduce:
koji build --scratch f41 python-sqlalchemy-2.0.31-3.fc41.src.rpm

Additional info:
This package is tracked by Koschei. See:
https://koschei.fedoraproject.org/package/python-sqlalchemy

However, Koschei hasn’t attempted a build with Python 3.13.0rc1 yet.

+ /usr/bin/pytest test -k 'not (MypyPluginTest and test_plugin_file)' --numprocesses=auto
Fatal Python error: Segmentation fault

Current thread 0x00007ffa4ce2c740 (most recent call first):
  File /var/tmp/rpm-tmp.dNLsjs: line 57:  4649 Segmentation fault      (core dumped) CFLAGS="${CFLAGS:-${RPM_OPT_FLAGS}}" LDFLAGS="${LDFLAGS:-${RPM_LD_FLAGS}}" PATH="/builddir/build/BUILD/python-sqlalchemy-2.0.31-build/BUILDROOT/usr/bin:$PATH" PYTHONPATH="${PYTHONPATH:-/builddir/build/BUILD/python-sqlalchemy-2.0.31-build/BUILDROOT/usr/lib64/python3.13/site-packages:/builddir/build/BUILD/python-sqlalchemy-2.0.31-build/BUILDROOT/usr/lib/python3.13/site-packages}" PYTHONDONTWRITEBYTECODE=1 PYTEST_ADDOPTS="${PYTEST_ADDOPTS:-} --ignore=/builddir/build/BUILD/python-sqlalchemy-2.0.31-build/SQLAlchemy-2.0.31/.pyproject-builddir" PYTEST_XDIST_AUTO_NUM_WORKERS="${PYTEST_XDIST_AUTO_NUM_WORKERS:-16}" /usr/bin/pytest test -k 'not (MypyPluginTest and test_plugin_file)' --numprocesses=auto

I’m also seeing this in python-opentelemetry-contrib, in the tests corresponding to the python3-opentelemetry-instrumentation-sqlalchemy subpackage.

Reproducible: Always

Comment 1 Michael Bayer 2024-08-02 15:50:40 UTC
We (at SQLAlchemy) test in CI for python 3.13 but we haven't installed rc1 yet.   Doing an rc1 run locally (Fedora 40 on AMD x86_64) I am able to run the full tox suite successfully.  Note the deps installed here include @vstinner 's not-yet-merged PR of greenlet and cython>=0.29.24 .  I'd check the greenlet dep being used here first


$ PATH=/opt/python-3.13.0rc1/bin/:$PATH tox -e py313
py313: install_deps> python -I -m pip install --only-binary=pymssql 'pytest-xdist!=3.3.0' 'pytest<8.2,>=7.0.0' 'git+https://github.com/vstinner/greenlet@py313#egg=greenlet'
.pkg: install_requires> python -I -m pip install 'cython>=0.29.24; platform_python_implementation == "CPython"' 'setuptools>=47'
.pkg: _optional_hooks> python /home/classic/.venv3/lib64/python3.12/site-packages/pyproject_api/_backend.py True setuptools.build_meta
.pkg: get_requires_for_build_sdist> python /home/classic/.venv3/lib64/python3.12/site-packages/pyproject_api/_backend.py True setuptools.build_meta
.pkg: get_requires_for_build_wheel> python /home/classic/.venv3/lib64/python3.12/site-packages/pyproject_api/_backend.py True setuptools.build_meta
.pkg: get_requires_for_build_editable> python /home/classic/.venv3/lib64/python3.12/site-packages/pyproject_api/_backend.py True setuptools.build_meta
.pkg: build_wheel> python /home/classic/.venv3/lib64/python3.12/site-packages/pyproject_api/_backend.py True setuptools.build_meta
.pkg: build_sdist> python /home/classic/.venv3/lib64/python3.12/site-packages/pyproject_api/_backend.py True setuptools.build_meta
py313: install_package_deps> python -I -m pip install --only-binary=pymssql 'greenlet!=0.4.17' 'greenlet!=0.4.17; python_version < "3.13" and (platform_machine == "aarch64" or (platform_machine == "ppc64le" or (platform_machine == "x86_64" or (platform_machine == "amd64" or (platform_machine == "AMD64" or (platform_machine == "win32" or platform_machine == "WIN32"))))))' 'importlib-metadata; python_version < "3.8"' 'typing-extensions>=4.6.0'
py313: install_package> python -I -m pip install --only-binary=pymssql --force-reinstall --no-deps /home/classic/dev/sqlalchemy/.tox/.tmp/package/1/sqlalchemy-2.0.31.dev0.tar.gz
[classic@framework sqlalchemy:HEAD]$ PATH=/opt/python-3.13.0rc1/bin/:$PATH tox -e py313
py313: install_deps> python -I -m pip install --only-binary=pymssql 'pytest-xdist!=3.3.0' 'pytest<8.2,>=7.0.0' 'git+https://github.com/vstinner/greenlet@py313#egg=greenlet'
.pkg: install_requires> python -I -m pip install 'cython>=0.29.24; platform_python_implementation == "CPython"' 'setuptools>=47'
.pkg: _optional_hooks> python /home/classic/.venv3/lib64/python3.12/site-packages/pyproject_api/_backend.py True setuptools.build_meta
.pkg: get_requires_for_build_sdist> python /home/classic/.venv3/lib64/python3.12/site-packages/pyproject_api/_backend.py True setuptools.build_meta
.pkg: get_requires_for_build_wheel> python /home/classic/.venv3/lib64/python3.12/site-packages/pyproject_api/_backend.py True setuptools.build_meta
.pkg: get_requires_for_build_editable> python /home/classic/.venv3/lib64/python3.12/site-packages/pyproject_api/_backend.py True setuptools.build_meta
.pkg: build_wheel> python /home/classic/.venv3/lib64/python3.12/site-packages/pyproject_api/_backend.py True setuptools.build_meta
.pkg: build_sdist> python /home/classic/.venv3/lib64/python3.12/site-packages/pyproject_api/_backend.py True setuptools.build_meta
py313: install_package_deps> python -I -m pip install --only-binary=pymssql 'greenlet!=0.4.17' 'greenlet!=0.4.17; python_version < "3.13" and (platform_machine == "aarch64" or (platform_machine == "ppc64le" or (platform_machine == "x86_64" or (platform_machine == "amd64" or (platform_machine == "AMD64" or (platform_machine == "win32" or platform_machine == "WIN32"))))))' 'importlib-metadata; python_version < "3.8"' 'typing-extensions>=4.6.0'
py313: install_package> python -I -m pip install --only-binary=pymssql --force-reinstall --no-deps /home/classic/dev/sqlalchemy/.tox/.tmp/package/1/sqlalchemy-2.0.31.dev0.tar.gz
py313: commands[0]> python -m pytest --color=yes --rootdir /home/classic/dev/sqlalchemy --log-info=sqlalchemy.testing -n4 --max-worker-restart=5 -m 'not memory_intensive and not mypy'
================================================================================== sqlalchemy installation ===================================================================================
SQLAlchemy 2.0.31 (no user site)
Path: /home/classic/dev/sqlalchemy/.tox/py313/lib/python3.13/site-packages/sqlalchemy/__init__.py
compiled extension enabled, e.g. /home/classic/dev/sqlalchemy/.tox/py313/lib/python3.13/site-packages/sqlalchemy/cyextension/util.cpython-313-x86_64-linux-gnu.so 
INFO:sqlalchemy.testing.plugin_base:Adding database URL: sqlite+pysqlite:///:memory:
==================================================================================== test session starts =====================================================================================
platform linux -- Python 3.13.0rc1, pytest-8.1.2, pluggy-1.5.0 -- /home/classic/dev/sqlalchemy/.tox/py313/bin/python
cachedir: .tox/py313/.pytest_cache
rootdir: /home/classic/dev/sqlalchemy
configfile: pyproject.toml
plugins: xdist-3.6.1
INFO:sqlalchemy.testing.provision:CREATE database test_871d1c4a0983, URI sqlite+pysqlite:///:memory:
INFO:sqlalchemy.testing.provision:CREATE database test_11578c66f148, URI sqlite+pysqlite:///:memory:
INFO:sqlalchemy.testing.provision:CREATE database test_58b3e49eb68f, URI sqlite+pysqlite:///:memory:
INFO:sqlalchemy.testing.provision:CREATE database test_8def48bd4059, URI sqlite+pysqlite:///:memory:
initialized: 4/4 workersINFO:sqlalchemy.testing.plugin_base:Adding database URL: sqlite+pysqlite:///:memory:
INFO:sqlalchemy.testing.plugin_base:Adding database URL: sqlite+pysqlite:///:memory:
INFO:sqlalchemy.testing.plugin_base:Adding database URL: sqlite+pysqlite:///:memory:
INFO:sqlalchemy.testing.plugin_base:Adding database URL: sqlite+pysqlite:///:memory:
.... suite runs

SKIPPED [1] .tox/py313/lib/python3.13/site-packages/sqlalchemy/testing/config.py:423: 'test/dialect/test_suite.py::ComponentReflectionTest_sqlite+pysqlite_3_45_1::test_get_comments (call)' : not postgresql and not mysql and not mariadb and not oracle and not mssql
SKIPPED [1] .tox/py313/lib/python3.13/site-packages/sqlalchemy/testing/config.py:423: 'test/dialect/test_suite.py::ComponentReflectionTest_sqlite+pysqlite_3_45_1::test_get_comments_with_schema (call)' : not postgresql and not mysql and not mariadb and not oracle and not mssql
SKIPPED [1] .tox/py313/lib/python3.13/site-packages/sqlalchemy/testing/config.py:423: 'test/dialect/test_suite.py::ComponentReflectionTest_sqlite+pysqlite_3_45_1::test_get_inter_schema_foreign_keys (call)' : not postgresql and not mysql and not mariadb and not mssql
================================================================ 21035 passed, 10797 skipped, 1 warning in 100.02s (0:01:40) =================================================================
  py313: OK (130.19=setup[28.92]+cmd[101.27] seconds)
  congratulations :) (130.28 seconds)

Comment 2 Fedora Update System 2024-08-04 17:10:34 UTC
FEDORA-2024-77ddccc7ad (python-opentelemetry-contrib-1.26.0-3.fc41) has been submitted as an update to Fedora 41.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-77ddccc7ad

Comment 3 Fedora Update System 2024-08-04 17:15:04 UTC
FEDORA-2024-77ddccc7ad (python-opentelemetry-contrib-1.26.0-3.fc41) has been pushed to the Fedora 41 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 4 Ben Beasley 2024-08-04 18:59:09 UTC
Apparently this was auto-closed just because I mentioned it in a changelog, even though I didn’t use one of the "magic" formulations (closes/fixes/resolves/etc.). Reopening.

Comment 5 Fedora Update System 2024-08-11 15:14:13 UTC
FEDORA-2024-0a6bec4560 (python-opentelemetry-contrib-1.26.0-5.fc41) has been submitted as an update to Fedora 41.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-0a6bec4560

Comment 6 Fedora Update System 2024-08-11 15:18:04 UTC
FEDORA-2024-0a6bec4560 (python-opentelemetry-contrib-1.26.0-5.fc41) has been pushed to the Fedora 41 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.