[New-bugs-announce] [issue32574] asyncio.Queue, put() leaks memory if the queue is full

José Melero Fernández report at bugs.python.org
Tue Jan 16 14:53:39 EST 2018


New submission from José Melero Fernández <jmelerofernandez at gmail.com>:

Repro: asyncio queue with limited size and the queue full, call asyncio.wait_for(some_queue.put(1), some_timeout). Every canceled put produces a new item in queue._putters that is never deleted (memory leak). 

Uploaded to the issue a file with an example.

The get method had a very similar bug which was fixed in 2016-11. The related issue:
https://bugs.python.org/issue31620

I already have the code for the PR prepared, so I want to publish the link of the MR in a few of minutes.

----------
components: asyncio
files: asyncio_put_memory_leak.py
messages: 310107
nosy: Mordis, asvetlov, yselivanov
priority: normal
severity: normal
status: open
title: asyncio.Queue, put() leaks memory if the queue is full
type: resource usage
versions: Python 3.6, Python 3.7
Added file: https://bugs.python.org/file47388/asyncio_put_memory_leak.py

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


More information about the New-bugs-announce mailing list