[issue33078] Queue with maxsize can lead to deadlocks
Thomas Moreau
report at bugs.python.org
Thu Mar 15 02:36:54 EDT 2018
New submission from Thomas Moreau <thomas.moreau.2010 at gmail.com>:
The fix for the Queue._feeder does not properly handle the size of the Queue. This can lead to a situation where the Queue is considered as Full when it is empty. Here is a reproducing script:
```
import multiprocessing as mp
q = mp.Queue(1)
class FailPickle():
def __reduce__(self):
raise ValueError()
q.put(FailPickle())
print("Queue is full:", q.full())
q.put(0)
print(f"Got result: {q.get()}")
```
----------
components: Library (Lib)
messages: 313855
nosy: davin, pitrou, tomMoral
priority: normal
severity: normal
status: open
title: Queue with maxsize can lead to deadlocks
type: behavior
versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33078>
_______________________________________
More information about the Python-bugs-list
mailing list