[New-bugs-announce] [issue44377] Truncated error message of original function while multiprocessing or multithreading

Prasanth Rajendran report at bugs.python.org
Thu Jun 10 08:27:15 EDT 2021


New submission from Prasanth Rajendran <mrshanth at gmail.com>:

Under multiprocessing package, in pool.py, when an error occurs on line 122:
result = (True, func(*args, **kwds))

The exception "e" has the error message due to execution of the function that is executed in parallel. 

However, the error message is lost when another error is occurred due to the execution of following line 128:
put((job, i, result))

The MaybeEncodingError masks or truncates the original error message, due to the following line at 130:
MaybeEncodingError(e, result[1])

where the repr function in the class truncates the message. 

The final error message has pickling error and the masked error of the actual execution.

----------
components: Library (Lib)
messages: 395529
nosy: mrshanth
priority: normal
severity: normal
status: open
title: Truncated error message of original function while multiprocessing or multithreading
versions: Python 3.7

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44377>
_______________________________________


More information about the New-bugs-announce mailing list