Issue 19299: test_asyncio refleak failures (original ) (raw )Created on 2013-10-19 15:04 by pitrou , last changed 2022-04-11 14:57 by admin . This issue is now closed .
Messages (6)
msg200425 - (view)
Author: Antoine Pitrou (pitrou) *
Date: 2013-10-19 15:04
Either the tests forget to cleanup resources at the end, or the library itself has resource management issues. $ ./python -Wi -m test -R 3:3 test_asyncio [1/1] test_asyncio beginning 6 repetitions 123456 ...... test_asyncio leaked [240, -677, -158] references, sum=-595 test_asyncio leaked [36, -116, -29] memory blocks, sum=-109
msg200482 - (view)
Author: Antoine Pitrou (pitrou) *
Date: 2013-10-19 19:10
It seems the attached patch solves it.
msg200484 - (view)
Author: Antoine Pitrou (pitrou) *
Date: 2013-10-19 19:11
(by the way, the part that really made a difference was losing the reference to the executor. I added the rest out of completeness.)
msg200508 - (view)
Author: Guido van Rossum (gvanrossum) *
Date: 2013-10-19 22:32
Looks good. How about adding executor.shutdown(wait=False)? E.g. def close(self): self._ready.clear() self._scheduled.clear() executor = self._default_executor if executor is not None: self._default_executor = None executor.shutdown(wait=False) If that works for you, please commit.
msg200511 - (view)
Author: Roundup Robot (python-dev)
Date: 2013-10-19 22:55
New changeset 4019694a1ce4 by Antoine Pitrou in branch 'default': Issue #19299 : fix refleak test failures in test_asyncio http://hg.python.org/cpython/rev/4019694a1ce4
msg200512 - (view)
Author: Antoine Pitrou (pitrou) *
Date: 2013-10-19 22:55
Ok, should be fixed now!
History
Date
User
Action
Args
2022-04-11 14:57:52
admin
set
github: 63498
2013-10-19 22:55:54
pitrou
set
status: open -> closedresolution: fixedmessages: + stage: patch review -> resolved
2013-10-19 22:55:26
python-dev
set
nosy: + python-dev messages: +
2013-10-19 22:32:32
gvanrossum
set
assignee: gvanrossum -> pitrou messages: +
2013-10-19 19:11:34
pitrou
set
messages: +
2013-10-19 19:11:00
pitrou
set
files: + base_event_close.patch messages: + assignee: gvanrossum keywords: + patch stage: needs patch -> patch review
2013-10-19 15:04:10
pitrou
set
nosy: + larry
2013-10-19 15:04:04
pitrou
create