[issue30165] faulthandler acquires lock from signal handler, can deadlock while crashing

STINNER Victor report at bugs.python.org
Wed Apr 26 04:00:14 EDT 2017


STINNER Victor added the comment:

> but faulthandler_dump_traceback calls PyGILState_GetThisThreadState() which ultimately calls thread.c's find_key() which acquires a lock:

Hum, Python 3 now uses native TLS, not this fallback implementation using a lock. At least on Linux and Windows. I don't know if the fallback implementation is still used (which platforms supported by Python don't provide pthread API?

PyGILState_GetThisThreadState -> PyThread_get_key_value:

* pthread: pthread_getspecific()
* Windows ("nt"): TlsGetValue()

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue30165>
_______________________________________


More information about the Python-bugs-list mailing list