pytest-dev / pytest-dev/pytest
Faulthandler traceback not shown even though Python runs in dev mode
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 14.5k
- Forks
- 3.4k
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 35
Description
AFAIU, faulthandler is enabled by default by pytest. In our (PyArrow) CI tests, we also enable CPython dev mode through the environment variable PYTHONDEVMODE: https://github.com/pitrou/arrow/actions/runs/3080710517/jobs/4978383781#step:6:5654
However, it seems that in some cases this doesn't suffice to print a traceback on crash:
https://github.com/pitrou/arrow/actions/runs/3080710517/jobs/4978383781#step:6:5716
Of course, it might be the case that it happens late at interpreter shutdown at a point where faulthandler cannot do anything anymore.
(as you can see, this is when running doctests; not sure this is relevant...)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked PyArrow CI job and reproduce the doctest run with PYTHONDEVMODE enabled. Compare the crash timing with interpreter shutdown and pytest's faulthandler behavior; done means identifying why no traceback is emitted and defining a reproducible regression case or documented limitation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100