-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Description
What's the problem this feature will solve?
When debugging thread-safety problem, it can happen that the execution puts the Python interpreter into a deadlock state.
Enabling the faulthandler_timeout=30
ini option helps because it provides useful debugging information, however the pytest process is still stuck until the developer manually issues a KeyboardInterrupt
via ctrl-c or waiting for the typical 1h+ deadline of the CI.
Describe the solution you'd like
Make it possible to tell the builtin faulthandler plugin to exit the pytest program itself without waiting any longer to avoid wasting CI resources.
The exit option is provided by default as a kwarg of faulthandler.dump_traceback_later. This is just a matter of exposing it in the builtin faulthandler
plugin of pytest.
I have implemented this solution in a branch, and it seems to work as needed.