[issue27558] SystemError inside multiprocessing.dummy Pool.map

2016-07-18 Thread Xiang Zhang
Xiang Zhang added the comment: > Easiest fix would be to make do_raise test for both NULL and None, but I'd > really consider fixing the new thread initialization if possible. I think the easiest fix is OK. The new thread initialization is consistent and should not be changed. The Py_None seem

[issue27558] SystemError inside multiprocessing.dummy Pool.map

2016-07-18 Thread Antti Haapala
Antti Haapala added the comment: I was thinking that perhaps an exception is always raised somewhere before? I tried skipping site, but it still works, so I am not too sure. -- ___ Python tracker _

[issue27558] SystemError inside multiprocessing.dummy Pool.map

2016-07-18 Thread Xiang Zhang
Xiang Zhang added the comment: I am curious why individual `raise` doesn't get the same problem in single thread program. -- ___ Python tracker ___ _

[issue27558] SystemError inside multiprocessing.dummy Pool.map

2016-07-18 Thread Xiang Zhang
Xiang Zhang added the comment: It seems the thread state is initialized in thread_PyThread_start_new_thread. It calls _PyThreadState_Prealloc which initialize exc_type to NULL. -- ___ Python tracker __

[issue27558] SystemError inside multiprocessing.dummy Pool.map

2016-07-18 Thread Antti Haapala
Antti Haapala added the comment: more easily reproducible by import threading def foo(): raise threading.Thread(target=foo).start() -- ___ Python tracker ___

[issue27558] SystemError inside multiprocessing.dummy Pool.map

2016-07-18 Thread Antti Haapala
Antti Haapala added the comment: OTOH, if you put sys.exc_info() in place of raise there, it correctly (None, None, None) there, because it does (sysmodule.c:sys_exc_info) tstate->exc_type != NULL ? tstate->exc_type : Py_None, Easiest fix would be to make do_raise test for both NULL an

[issue27558] SystemError inside multiprocessing.dummy Pool.map

2016-07-18 Thread Antti Haapala
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 h

[issue27558] SystemError inside multiprocessing.dummy Pool.map

2016-07-17 Thread Xiang Zhang
Changes by Xiang Zhang : -- nosy: +xiang.zhang ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue27558] SystemError inside multiprocessing.dummy Pool.map

2016-07-17 Thread Romuald Brunet
New submission from Romuald Brunet: Raising without a previous exception inside a method called from multiprocessing.dummy.Pool.map will trigger a SystemError. SystemError: PyEval_EvalFrameEx returned NULL without setting an error Traceback (most recent call last): File "example.py", line 1