[issue27535] Ignored ResourceWarning warnings leak memory in warnings registries

2017-11-21 Thread Jonathan Bastien-Filiatrault

Jonathan Bastien-Filiatrault <j...@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 <rep...@bugs.python.org>
<https://bugs.python.org/issue27535>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27535] Memory leaks when opening tons of files

2017-11-21 Thread Jonathan Bastien-Filiatrault

Jonathan Bastien-Filiatrault <j...@zerospam.ca> added the comment:

@vstinner Yes, from what I saw, the leak was from the registry / deduplication 
logic.

--

___
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue27535>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27535] Memory leaks when opening tons of files

2017-11-21 Thread Jonathan Bastien-Filiatrault

Jonathan Bastien-Filiatrault <j...@zerospam.ca> added the comment:

We just got hit by this. We had one specific case where files with unique names 
were not being closed and Python was leaking a lot of memory over a few days.

--
nosy: +Jonathan Bastien-Filiatrault

___
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue27535>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com