New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Raising an exception that cannot be unpickled causes hang in ProcessPoolExecutor #69088
Comments
When raising an exception that is unpicklable in a worker process. This used to be the case for all exceptions that have a non-trivial constructor but this was fixed by http://bugs.python.org/issue1692335. I now have the concrete problem with cx_Oracle in which the error type cx_Oracle._Error doesn't define tp_new which results in a
I have already reported this fact at https://bitbucket.org/anthony_tuininga/cx_oracle/issues/23. However, I think that the worker thread should either be able to recover from this (which should be quite easy) or, at the very least, fail cleanly. Currently, when this condition is triggered the worker processes are not killed alongside the parent. There is an existing report and a patch in the backports project: agronholm/pythonfutures#30 (comment) |
Actually I think that this may consist of multiple issues:
|
The patch for bpo-22995 disallows default pickling objects with tp_new == NULL. |
That would touch 2, but as this is happening in the exception handling already that would need to be catched and handled by itself. However, one could then do without a "pickle -> unpickle" dance. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: