STINNER Victor added the comment: faulthandler was enhanced in Python 3.6:
* Issue #26563: faulthandler now works in non-Python threads. * Issue #26154: Issue #26154: Add a new private _PyThreadState_UncheckedGet() function which gets the current thread state, but don't call Py_FatalError() if it is NULL. Can you please try Python 3.6 (default branch of Mercurial) with your use case to check if the issue is solved? And also Python 3.5 (3.5 branch of Mercurial)? I can try to backport some enhancements from Python 3.6 to Python 3.5 if needed. If it's ok for you, I will then port changes to the GitHub project. Note: I also add new unit tests. > SIGUSR1/2 will get delivered to any running thread. The current thread of the > signal doesn't give any useful information. Try to get the current Python > thread which holds the GIL instead, or use NULL. I don't understand your usecase, since faulthandler displays *all* Python threads by default. all_threads=True in faulthandler.register(signum, file=sys.stderr, all_threads=True, chain=False): https://docs.python.org/dev/library/faulthandler.html#faulthandler.register ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue23886> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com