Christian Heimes added the comment: internal_setblocking() sets an exception w/o holding the GIL.
#0 0x00007ffff711f6f5 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54 #1 0x00007ffff71212fa in __GI_abort () at abort.c:89 #2 0x000000000042935f in Py_FatalError (msg=0x83d8f8 "Python memory allocator called without holding the GIL") at Python/pylifecycle.c:1457 #3 0x000000000042138f in _PyMem_DebugCheckGIL () at Objects/obmalloc.c:1972 #4 0x00000000004214ae in _PyMem_DebugFree (ctx=0xad8bf0 <_PyMem_Debug+48>, ptr=0xcf8b40) at Objects/obmalloc.c:1994 #5 0x000000000041e9cb in PyMem_Free (ptr=0xcf8b40) at Objects/obmalloc.c:442 #6 0x000000000046f7ed in _PyFaulthandler_Fini () at ./Modules/faulthandler.c:1369 #7 0x0000000000429303 in Py_FatalError (msg=0x83d8f8 "Python memory allocator called without holding the GIL") at Python/pylifecycle.c:1431 #8 0x000000000042138f in _PyMem_DebugCheckGIL () at Objects/obmalloc.c:1972 #9 0x00000000004213d0 in _PyMem_DebugMalloc (ctx=0xad8c20 <_PyMem_Debug+96>, nbytes=84) at Objects/obmalloc.c:1980 #10 0x000000000041eb6b in PyObject_Malloc (size=84) at Objects/obmalloc.c:479 #11 0x00000000005c0a19 in PyUnicode_New (size=19, maxchar=116) at Objects/unicodeobject.c:1280 #12 0x00000000005c8e0e in PyUnicode_FromUnicode (u=0xd26450 L"Bad file descriptor", size=19) at Objects/unicodeobject.c:2016 #13 0x00000000005ce90f in PyUnicode_FromWideChar (w=0xd26450 L"Bad file descriptor", size=19) at Objects/unicodeobject.c:2497 #14 0x00000000005d48f0 in PyUnicode_DecodeLocaleAndSize (str=0x7ffff7273e98 "Bad file descriptor", len=19, errors=0x8747bb "surrogateescape") at Objects/unicodeobject.c:3729 #15 0x00000000005d4f86 in PyUnicode_DecodeLocale (str=0x7ffff7273e98 "Bad file descriptor", errors=0x8747bb "surrogateescape") at Objects/unicodeobject.c:3802 #16 0x0000000000717924 in PyErr_SetFromErrnoWithFilenameObjects (exc=<type at remote 0xafee40>, filenameObject=0x0, filenameObject2=0x0) at Python/errors.c:448 #17 0x0000000000717f00 in PyErr_SetFromErrno (exc=<type at remote 0xafee40>) at Python/errors.c:553 #18 0x00007ffff03000b0 in internal_setblocking (s=0x7fffeb3e1d48, block=1) at /home/heimes/dev/python/cpython/Modules/socketmodule.c:667 #19 0x00007ffff030597a in sock_setblocking (s=0x7fffeb3e1d48, arg=False) at /home/heimes/dev/python/cpython/Modules/socketmodule.c:2445 #20 0x000000000054a2ce in _PyCFunction_FastCallDict (func_obj=<built-in method setblocking of socket object at remote 0x7fffeb3e1d48>, args=0xef4058, nargs=1, kwargs=0x0) at Objects/methodobject.c:209 #21 0x000000000054a963 in _PyCFunction_FastCallKeywords (func=<built-in method setblocking of socket object at remote 0x7fffeb3e1d48>, stack=0xef4058, nargs=1, kwnames=0x0) at Objects/methodobject.c:295 #22 0x00000000006e306c in call_function (pp_stack=0x7ffffffe9088, oparg=1, kwnames=0x0) at Python/ceval.c:4787 ---------- nosy: +christian.heimes _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue28471> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com