New submission from José Melero Fernández <jmelerofernan...@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 <rep...@bugs.python.org>
<https://bugs.python.org/issue32574>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to