This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: faulthandler: add the ability to dump all interpreters, not only the current interpreter
Type: Stage:
Components: Library (Lib) Versions: Python 3.11
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: corona10, shihai1991, vstinner
Priority: normal Keywords: patch

Created on 2022-01-13 20:26 by vstinner, last changed 2022-04-11 14:59 by admin.

Files
File name Uploaded Description Edit
faulthandler.patch vstinner, 2022-01-13 20:30
Messages (2)
msg410519 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2022-01-13 20:26
While debugging the sub-interpreter crash bpo-46070, I noticed that faulthandler only logs the Python thread state of a single interpreter. When a bug involves multiple interpreters, it is useful to log all interpreters.
msg410521 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2022-01-13 20:30
Attached patch is an incomplete quick & dirty implementation to log all interpreters in _Py_DumpTracebackThreads().

A better implementation should leave the current behavior unmodified, add a new C function, and add all_interpreters=False parameter to the following faulthandler functions:

* dump_traceback()
* enable()
* register()
History
Date User Action Args
2022-04-11 14:59:54adminsetgithub: 90526
2022-01-19 02:29:39shihai1991setnosy: + shihai1991
2022-01-14 05:59:37corona10setnosy: + corona10
2022-01-13 20:30:27vstinnersetfiles: + faulthandler.patch
keywords: + patch
messages: + msg410521
2022-01-13 20:26:44vstinnercreate