xmlsec/python-xmlsec

"Fatal Python error: Segmentation fault" in CI

deronnax opened this issue · 4 comments

Does anyone have an idea of what is this error we are getting in the CI? It's happening both on linux (job) and macOS (link):

tests/test_ds.py::TestSignContext::test_no_key PASSED                    [ 47%]
Fatal Python error: Floating point exception

Current thread 0x000000010defc600 (most recent call first):
  File "/Users/runner/work/python-xmlsec/python-xmlsec/tests/test_ds.py", line 51 in test_register_id
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/unittest/case.py", line 579 in _callTestMethod
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/unittest/case.py", line 623 in run
[...]

I am willing to fix the CI but I have no solution for this error.

This looks to me like its the same error as this #277 since lxml is being installed from a wheel https://github.com/xmlsec/python-xmlsec/actions/runs/8271024317/job/22629856568#step:7:36 and there is a libxml2 mismatch between what they ship with and what xmlsec is being compiled against.

It seems like #283 is probably the right fix here, but maybe a stopgap would be to figure out what version of libxml2 lxml uses and package up wheels that are statically linked against that version, so the wheels for lxml and xmlsec will play nicely together.

@deronnax I made a PR here that updates the CI workflow to build wheels and run tests #288

@jonathangreen I did several tests and indeed that's the problems you pointed. Thank you very much for this enlighten.