acts-project / acts

Experiment-independent toolkit for (charged) particle track reconstruction in (high energy) physics experiments implemented in modern C++
https://acts.readthedocs.io
Mozilla Public License 2.0
104 stars 168 forks source link

Segfault during pytest if any ODD related test fails because of an exception #3473

Closed andiwand closed 1 month ago

andiwand commented 3 months ago
% pytest Examples/Python/tests/test_examples.py -v -k test_ckf_tracks_example
================================================================================================================================================== test session starts ===================================================================================================================================================
platform darwin -- Python 3.12.3, pytest-8.0.0, pluggy-1.4.0 -- /Users/andreas/cern/venv/bin/python3.12
cachedir: .pytest_cache
rootdir: /Users/andreas/cern/source/acts/acts/dev3
configfile: pytest.ini
plugins: check-2.3.1, anyio-4.2.0
collected 46 items / 40 deselected / 6 selected                                                                                                                                                                                                                                                                          

Examples/Python/tests/test_examples.py::test_ckf_tracks_example[generic-full_seeding] FAILED                                                                                                                                                                                                                       [ 16%]
Examples/Python/tests/test_examples.py::test_ckf_tracks_example[generic-truth_estimated] FAILED                                                                                                                                                                                                                    [ 33%]
Examples/Python/tests/test_examples.py::test_ckf_tracks_example[generic-truth_smeared] FAILED                                                                                                                                                                                                                      [ 50%]
Examples/Python/tests/test_examples.py::test_ckf_tracks_example[odd-full_seeding] FAILED                                                                                                                                                                                                                           [ 66%]
Examples/Python/tests/test_examples.py::test_ckf_tracks_example[odd-truth_estimated] Fatal Python error: Segmentation fault

Current thread 0x0000000204e4cc00 (most recent call first):
  File "/Users/andreas/cern/build/acts/acts/dev3/python/acts/examples/odd.py", line 102 in getOpenDataDetector
  File "/Users/andreas/cern/source/acts/acts/dev3/Examples/Python/tests/conftest.py", line 269 in detector_config
  File "/Users/andreas/cern/venv/lib/python3.12/site-packages/_pytest/fixtures.py", line 923 in call_fixture_func
  File "/Users/andreas/cern/venv/lib/python3.12/site-packages/_pytest/fixtures.py", line 1149 in pytest_fixture_setup
  File "/Users/andreas/cern/venv/lib/python3.12/site-packages/pluggy/_callers.py", line 102 in _multicall
  File "/Users/andreas/cern/venv/lib/python3.12/site-packages/pluggy/_manager.py", line 119 in _hookexec
  File "/Users/andreas/cern/venv/lib/python3.12/site-packages/pluggy/_hooks.py", line 501 in __call__
  File "/Users/andreas/cern/venv/lib/python3.12/site-packages/_pytest/fixtures.py", line 1095 in execute
  File "/Users/andreas/cern/venv/lib/python3.12/site-packages/_pytest/fixtures.py", line 652 in _compute_fixture_value
  File "/Users/andreas/cern/venv/lib/python3.12/site-packages/_pytest/fixtures.py", line 566 in _get_active_fixturedef
  File "/Users/andreas/cern/venv/lib/python3.12/site-packages/_pytest/fixtures.py", line 547 in getfixturevalue
  File "/Users/andreas/cern/venv/lib/python3.12/site-packages/_pytest/fixtures.py", line 693 in _fillfixtures
  File "/Users/andreas/cern/venv/lib/python3.12/site-packages/_pytest/python.py", line 1839 in setup
  File "/Users/andreas/cern/venv/lib/python3.12/site-packages/_pytest/runner.py", line 514 in setup
  File "/Users/andreas/cern/venv/lib/python3.12/site-packages/_pytest/runner.py", line 161 in pytest_runtest_setup
  File "/Users/andreas/cern/venv/lib/python3.12/site-packages/pluggy/_callers.py", line 102 in _multicall
  File "/Users/andreas/cern/venv/lib/python3.12/site-packages/pluggy/_manager.py", line 119 in _hookexec
  File "/Users/andreas/cern/venv/lib/python3.12/site-packages/pluggy/_hooks.py", line 501 in __call__
  File "/Users/andreas/cern/venv/lib/python3.12/site-packages/_pytest/runner.py", line 266 in <lambda>
  File "/Users/andreas/cern/venv/lib/python3.12/site-packages/_pytest/runner.py", line 345 in from_call
  File "/Users/andreas/cern/venv/lib/python3.12/site-packages/_pytest/runner.py", line 265 in call_runtest_hook
  File "/Users/andreas/cern/venv/lib/python3.12/site-packages/_pytest/runner.py", line 226 in call_and_report
  File "/Users/andreas/cern/venv/lib/python3.12/site-packages/_pytest/runner.py", line 127 in runtestprotocol
  File "/Users/andreas/cern/venv/lib/python3.12/site-packages/_pytest/runner.py", line 114 in pytest_runtest_protocol
  File "/Users/andreas/cern/venv/lib/python3.12/site-packages/pluggy/_callers.py", line 102 in _multicall
  File "/Users/andreas/cern/venv/lib/python3.12/site-packages/pluggy/_manager.py", line 119 in _hookexec
  File "/Users/andreas/cern/venv/lib/python3.12/site-packages/pluggy/_hooks.py", line 501 in __call__
  File "/Users/andreas/cern/venv/lib/python3.12/site-packages/_pytest/main.py", line 351 in pytest_runtestloop
  File "/Users/andreas/cern/venv/lib/python3.12/site-packages/pluggy/_callers.py", line 102 in _multicall
  File "/Users/andreas/cern/venv/lib/python3.12/site-packages/pluggy/_manager.py", line 119 in _hookexec
  File "/Users/andreas/cern/venv/lib/python3.12/site-packages/pluggy/_hooks.py", line 501 in __call__
  File "/Users/andreas/cern/venv/lib/python3.12/site-packages/_pytest/main.py", line 326 in _main
  File "/Users/andreas/cern/venv/lib/python3.12/site-packages/_pytest/main.py", line 272 in wrap_session
  File "/Users/andreas/cern/venv/lib/python3.12/site-packages/_pytest/main.py", line 319 in pytest_cmdline_main
  File "/Users/andreas/cern/venv/lib/python3.12/site-packages/pluggy/_callers.py", line 102 in _multicall
  File "/Users/andreas/cern/venv/lib/python3.12/site-packages/pluggy/_manager.py", line 119 in _hookexec
  File "/Users/andreas/cern/venv/lib/python3.12/site-packages/pluggy/_hooks.py", line 501 in __call__
  File "/Users/andreas/cern/venv/lib/python3.12/site-packages/_pytest/config/__init__.py", line 174 in main
  File "/Users/andreas/cern/venv/lib/python3.12/site-packages/_pytest/config/__init__.py", line 197 in console_main
  File "/Users/andreas/cern/venv/bin/pytest", line 8 in <module>

Extension modules: libcppyy3_12, libcppyy, libROOTPythonizations3_12, libROOTPythonizations, numpy.core._multiarray_umath, numpy.core._multiarray_tests, numpy.linalg._umath_linalg, numpy.fft._pocketfft_internal, numpy.random._common, numpy.random.bit_generator, numpy.random._bounded_integers, numpy.random._mt19937, numpy.random.mtrand, numpy.random._philox, numpy.random._pcg64, numpy.random._sfc64, numpy.random._generator (total: 17)
zsh: segmentation fault  pytest Examples/Python/tests/test_examples.py -v -k test_ckf_tracks_example
andiwand commented 3 months ago

I tried fixing this with https://github.com/acts-project/acts/pull/3471 but sadly that does not work

AJPfleger commented 2 months ago

Discussed points in the developers meeting: @paulgessinger: ways to workaround:

@andiwand: maybe pytest captures whole stack and the problem is there

github-actions[bot] commented 1 month ago

This issue/PR has been automatically marked as stale because it has not had recent activity. The stale label will be removed if any interaction occurs.

paulgessinger commented 1 month ago

I think this is resolved now @andiwand?

andiwand commented 1 month ago

should be yes