[New-bugs-announce] [issue41761] multiprocessing.Queue prevents program exit when containing a reasonable amount of data

Dominik Schmid report at bugs.python.org
Fri Sep 11 06:37:24 EDT 2020


New submission from Dominik Schmid <dominikschmid93 at gmail.com>:

Reproduction steps: run the attached queue_busted.py

expected result: 
"done." is printed and the program terminates.

actual result:
"done." is printed and the program does not terminate.

Documentation link for your convenience:
https://docs.python.org/3.7/library/multiprocessing.html#multiprocessing.Queue.close

The lowest to trigger the bug seems to be 1639 42's in the queue.
If I put numpy.array([42]) into the queue instead of 42, I need much fewer items to trigger the bug.
When q.close() is called explicitly, it always terminates but sometimes prints a BrokenPipeError.

Reproduced on windows (Python 3.7.2) and Debian (Python 2.7.16).

----------
components: Library (Lib)
files: queue_busted.py
messages: 376716
nosy: Dominik Schmid
priority: normal
severity: normal
status: open
title: multiprocessing.Queue prevents program exit when containing a reasonable amount of data
type: behavior
versions: Python 3.7
Added file: https://bugs.python.org/file49451/queue_busted.py

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


More information about the New-bugs-announce mailing list