Repository navigation
Report crashes of the test process in CI logs - #405
Merged
Merged
Conversation
A test process crash left no Python traceback in the CI logs: the DataLab application context redirected faulthandler to a log file kept on the runner, then disabled it, including pytest's own handler, for all subsequent tests. Tests now keep pytest's faulthandler, so that crash tracebacks are reported in the test output. The PyQt5 workflow also keeps the core dump of a crashed test process and prints its native backtrace. Assisted-by: Claude Opus 5.5
This was referenced Oct 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
After #402 was merged, the PyQt5 / Python 3.9 job on
developcrashed twice with a segmentation fault (exit code 139) at the start ofside_by_side_app_test.py::test_view_images_side_by_side(run 39420412512, both attempts), while the same tree had passed on the PR branch with identical dependencies. The logs contained no traceback at all, so the crash could not be analyzed.Why no traceback was reported
The application context (
sigimax_app_context) redirectsfaulthandlerto.DataLab_faulthandler.login the configuration directory, then disables it on exit, which also disables pytest's own handler for every subsequent test. Crash tracebacks therefore ended up in a file left on the runner, or nowhere.Changes
datalab/tests/conftest.py): thefaulthandler_enabledoption is disabled in tests, so that pytest's faulthandler stays active and reports crash tracebacks in the test output. Checked locally: without this change, a crash in an application context prints nothing in the pytest output; with it, the traceback points to the crashing test line.Notes
pushruns ondevelop, so merging this is the best way to capture its traceback if it happens again.