New submission from Milan Zamazal:

When calling multiprocessing.managers.BaseManager repeatedly from a client, 
each time from a new thread, new entry with (already existent) 
multiprocessing.util.ForkAwareLocal instance is inserted as a value into 
multiprocessing.util._afterfork_registry dictionary on each of the calls.  So 
the dictionary grows on each client call and may grow so indefinitely, causing 
memory leak if nothing else.

The attached file demonstrates the problem (Python 2.7 version, it's 
reproducible on 3.4 as well after 2->3 adjustments).  Just run it and look at 
the output.  The printed dictionary contains 10 entries holding the same 
ForkAwareLocal instance although there should be probably just one such entry 
there.

----------
components: Library (Lib)
files: bug.py
messages: 258816
nosy: mzamazal
priority: normal
severity: normal
status: open
title: multiprocessing.util._afterfork_registry leak in threaded environment
type: resource usage
versions: Python 2.7, Python 3.4
Added file: http://bugs.python.org/file41690/bug.py

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

Reply via email to