[issue27558] SystemError inside multiprocessing.dummy Pool.map
Antti Haapala
report at bugs.python.org
Mon Jul 18 04:51:34 EDT 2016
Antti Haapala added the comment:
Reproducible on Python 3.6a4ish on Ubuntu. I believe this needs forking multiprocessing.
do_raise is called with 2 NULLs as arguments, it should raise
PyErr_SetString(PyExc_RuntimeError,
"No active exception to reraise");
What happens is that PyThreadState is initialized to *all* NULL pointers on the new thread on multiprocessing, however `type` is expected to point to `Py_None` when no exception has been raised:
PyThreadState *tstate = PyThreadState_GET();
PyObject *tb;
type = tstate->exc_type;
value = tstate->exc_value;
tb = tstate->exc_traceback;
if (type == Py_None) {
PyErr_SetString(PyExc_RuntimeError,
"No active exception to reraise");
return 0;
}
I am not sure where the thread state should have been initialized though
----------
nosy: +ztane
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue27558>
_______________________________________
More information about the Python-bugs-list
mailing list