[issue27535] Ignored ResourceWarning warnings leak memory in warnings registries
Jonathan Bastien-Filiatrault
report at bugs.python.org
Tue Nov 21 10:54:01 EST 2017
Jonathan Bastien-Filiatrault <jbf at zerospam.ca> added the comment:
> But it will still "leak" when you display ResourceWarning warnings with an action different than "always". In this case, IMHO the root issue is more the code which doesn't close the resource, than Python itself.
Not closing a file is a bug, but under normal circumstances it causes no leak by itself. The fact that the warnings module leaks in this case seems a problem. Had I logged warnings correctly, I would have found the bug by looking at the application log rather than by investigating the cause of the OOM killer invocation.
IMHO, the warnings module should have upper bounds on memory consumption to avoid DOSing itself.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue27535>
_______________________________________
More information about the Python-bugs-list
mailing list