[issue28165] The 'subprocess' module leaks 4 kiB memory for each thread

2016-09-20 Thread STINNER Victor
STINNER Victor added the comment: Test-2.py has issues: * it doesn't call Timer.join() * it uses a weak synchronization between the main thread and the Timer thread: see msg276990 for an example using Event If you use a better synchronization code, call timer.join() and call gc.collect(),

[issue28165] The 'subprocess' module leaks 4 kiB memory for each thread

2016-09-20 Thread Xavion
Xavion added the comment: haypo: So, what is the result when you run "Test-2.py" and monitor the memory usage with "Test.sh"? ztane: The code you've provided is the same as "Test-1.py". You need to run "Test-2.py" in order to see the bug! -- ___

[issue28165] The 'subprocess' module leaks 4 kiB memory for each thread

2016-09-19 Thread Antti Haapala
Antti Haapala added the comment: The title of the issue is still wrong. As I noted before the problem is not with subprocess leaking 4K memory *always*. The issue comes from the fact that subprocess seems to leak 4K memory per individual thread. The test code to use is thus def test():