pytest icon indicating copy to clipboard operation
pytest copied to clipboard

Faulthandler traceback not shown even though Python runs in dev mode

Open pitrou opened this issue 3 years ago • 0 comments

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...)

pitrou avatar Sep 19 '22 16:09 pitrou