This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: _result_handler dies on raised exceptions [multiprocessing]
Type: crash Stage: patch review
Components: Library (Lib) Versions: Python 3.11, Python 3.10, Python 3.9
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: sindrig
Priority: normal Keywords: patch

Created on 2020-01-02 12:26 by sindrig, last changed 2022-04-11 14:59 by admin.

Files
File name Uploaded Description Edit
test_pool_error.py sindrig, 2020-01-02 12:26 Steps to reproduce
Pull Requests
URL Status Linked Edit
PR 17795 open sindrig, 2020-01-02 12:33
Messages (1)
msg359194 - (view) Author: Sindri Guðmundsson (sindrig) * Date: 2020-01-02 12:26
Raising an Exception in a callback handler of apply_async and/or map_async will kill the _result_handler thread. This causes unexpected behavior as all subsequent callbacks won't be called and worse, pool.join will deadlock.

The documentation states that callbacks should return immediately but it does not warn the user against raising an exception.

Attached are steps to reproduce.
History
Date User Action Args
2022-04-11 14:59:24adminsetgithub: 83371
2021-09-19 22:01:28iritkatrielsetversions: + Python 3.10, Python 3.11, - Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8
2020-01-06 11:00:07sindrigsettype: behavior -> crash
2020-01-02 12:33:40sindrigsetkeywords: + patch
stage: patch review
pull_requests: + pull_request17230
2020-01-02 12:26:53sindrigcreate