[New-bugs-announce] [issue41614] Items put on Queue in thread in child process sometimes not seen by parent process

Alex Hall report at bugs.python.org
Sat Aug 22 07:42:15 EDT 2020


New submission from Alex Hall <alex.mojaki at gmail.com>:

See attached file. The summary is that I start a Process, which starts a Thread, which puts some values on a Queue which was originally created by the parent process and passed down. Usually this works but occasionally the parent process doesn't see the items on the queue: queue.get() times out and queue.empty() is True, although queue.qsize() is accurate.

I can reproduce this on master:

Python 3.10.0a0 (heads/master:802726a, Aug 22 2020, 12:56:09) 
[GCC 7.5.0] on linux

as well as other versions I have installed which I've selected. On 3.6 it seems like the problem is even worse and some of my comments don't apply.

I've tested the script on Ubuntu 18.04.4, but the general problem seems to also happen on OSX although I can't confirm that now.

----------
files: queue_bug.py
messages: 375795
nosy: alexmojaki
priority: normal
severity: normal
status: open
title: Items put on Queue in thread in child process sometimes not seen by parent process
versions: Python 3.10, Python 3.6, Python 3.7, Python 3.8
Added file: https://bugs.python.org/file49422/queue_bug.py

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


More information about the New-bugs-announce mailing list