Dear Maintainer,
pyton-lupa is failed to build on ppc64el with below error:
Extension modules: lupa.lua (total: 1)
Segmentation fault
E: pybuild pybuild:483: test: plugin pyproject failed with: exit
code=139: cd
/build/reproducible-path/python-lupa-2.4+dfsg/.pybuild/cpython3_3.13_lupa/build;
python3.13 -m pytest lupa/tests/test.py -k 'not test_attrgetter_refcycle
and not test_no_overflow and not test_pyfunc_refcycle and not
test_runtime_cleanup'
dh_auto_test: error: pybuild --test --test-pytest -i python{version} -p
"3.14 3.13" returned exit code 13
make: *** [debian/rules:16: binary-arch] Error 25
dpkg-buildpackage: error: debian/rules binary-arch subprocess failed
with exit status 2
And attached is the build log for reference.
Extension modules: lupa.lua (total: 1)
Segmentation fault
E: pybuild pybuild:483: test: plugin pyproject failed with: exit
code=139: cd
/build/reproducible-path/python-lupa-2.4+dfsg/.pybuild/cpython3_3.13_lupa/build;
python3.13 -m pytest lupa/tests/test.py -k 'not test_attrgetter_refcycle
and not test_no_overflow and not test_pyfunc_refcycle and not
test_runtime_cleanup'
dh_auto_test: error: pybuild --test --test-pytest -i python{version} -p
"3.14 3.13" returned exit code 13
make: *** [debian/rules:16: binary-arch] Error 25
dpkg-buildpackage: error: debian/rules binary-arch subprocess failed
with exit status 2
The segfault occurs inside libluajit-5.1 on ppc64el when running the
coroutine debug-hook test.
gdb shows stack corruption with the crash entirely in LuaJIT, consistent
with a use-after-free in LuaJIT’s coroutine/debug hook handling
For reference, LuaJIT has known ppc64le runtime issues (see LuaJIT
issues https://github.com/LuaJIT/LuaJIT/issues/42 and
https://github.com/LuaJIT/LuaJIT/issues/633). I plan to reference this
upstream.
This confirms LuaJIT as the root cause of the crash on ppc64el.
Rebuilding python-lupa on ppc64el against PUC Lua (liblua5.1) instead of
LuaJIT avoids the reproducible segmentation fault and allows the test
suite to complete successfully.
platform linux -- Python 3.13.11, pytest-9.0.2, pluggy-1.6.0
rootdir:
/build/reproducible-path/python-lupa-2.4+dfsg/.pybuild/cpython3_3.13_lupa/build
configfile: pyproject.toml
plugins: typeguard-4.4.4
collected 320 items / 9 deselected / 311 selected
lupa/tests/test.py
.........................s.......s................................................................................................................
[ 46%]
...................................................................................................................sssssssssss.......................................
[100%]
=============================================================== 298
passed, 13 skipped, 9 deselected in 3.72s
===============================================================
create-stamp debian/debhelper-build-stamp
dh_testroot -O--buildsystem=pybuild
dh_prep -O--buildsystem=pybuild
dh_auto_install --destdir=debian/python3-lupa/
-O--buildsystem=pybuild
I: pybuild plugin_pyproject:196: Copying package built for python3.14 to
destdir
I: pybuild plugin_pyproject:196: Copying package built for python3.13 to
destdir
dh_installdocs -O--buildsystem=pybuild
dh_installchangelogs -O--buildsystem=pybuild
dh_python3 -O--buildsystem=pybuild
dh_installsystemduser -O--buildsystem=pybuild
dh_perl -O--buildsystem=pybuild
dh_link -O--buildsystem=pybuild
dh_strip_nondeterminism -O--buildsystem=pybuild
dh_compress -O--buildsystem=pybuild
dh_fixperms -O--buildsystem=pybuild
dh_missing -O--buildsystem=pybuild
dh_dwz -a -O--buildsystem=pybuild
dh_strip -a -O--buildsystem=pybuild
dh_makeshlibs -a -O--buildsystem=pybuild
dh_shlibdeps -a -O--buildsystem=pybuild
dh_installdeb -O--buildsystem=pybuild
dh_gencontrol -O--buildsystem=pybuild
dh_md5sums -O--buildsystem=pybuild
dh_builddeb -O--buildsystem=pybuild
dpkg-deb: building package 'python3-lupa' in
'../python3-lupa_2.4+dfsg-1_ppc64el.deb'.
dpkg-deb: building package 'python3-lupa-dbgsym' in
'../python3-lupa-dbgsym_2.4+dfsg-1_ppc64el.deb'.
dpkg-genbuildinfo --build=binary
-O../python-lupa_2.4+dfsg-1_ppc64el.buildinfo
dpkg-genchanges --build=binary
-O../python-lupa_2.4+dfsg-1_ppc64el.changes
dpkg-genchanges: info: binary-only upload (no source code included)
dpkg-source --after-build .
dpkg-buildpackage: info: binary-only upload (no source included)
Thanks,
Trupti