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: multiprocessing.Pool.map hangs if pickling argument raises an exception
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 3.3, Python 3.4
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: cantor, jnoller, nadeem.vawda, pitrou, python-dev, sbt, tim.peters
Priority: normal Keywords:

Created on 2013-10-28 20:53 by nadeem.vawda, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (2)
msg201580 - (view) Author: Nadeem Vawda (nadeem.vawda) * (Python committer) Date: 2013-10-28 20:53
[Split off from issue 19395]

The following code hangs after hitting a TypeError trying to pickle one
of the TextIOWrapper objects:

    import multiprocessing

    def read(f): return f.read()

    files = [open(path) for path in 3 * ['/dev/null']]
    pool = multiprocessing.Pool()
    results = pool.map(read, files)
    print(results)

This issue is present in 3.2, 3.3 and 3.4, but not in 2.7.
msg201589 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2013-10-28 23:24
New changeset 6aa42fc0c2f6 by Richard Oudkerk in branch '2.7':
Issue #19425 -- a pickling error should not cause pool to hang.
http://hg.python.org/cpython/rev/6aa42fc0c2f6

New changeset a2230a8420a5 by Richard Oudkerk in branch '3.3':
Issue #19425 -- a pickling error should not cause pool to hang.
http://hg.python.org/cpython/rev/a2230a8420a5
History
Date User Action Args
2022-04-11 14:57:52adminsetgithub: 63624
2013-10-28 23:52:12sbtsetstatus: open -> closed
resolution: fixed
stage: needs patch -> resolved
2013-10-28 23:24:43python-devsetmessages: + msg201589
2013-10-28 20:53:20nadeem.vawdacreate