[issue40657] Resource leaks with threading.Thread

2021-09-24 Thread STINNER Victor


STINNER Victor  added the comment:

You must join thread using thread.join().

If I add .join() calls, threading.active_count() stays around 2, it doesn't 
grow.

It's not a bug in Python.

--
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40657] Resource leaks with threading.Thread

2020-05-23 Thread Ned Deily


Change by Ned Deily :


--
nosy: +vstinner

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40657] Resource leaks with threading.Thread

2020-05-23 Thread Martin Panter


Martin Panter  added the comment:

Perhaps this is the same as Issue 37788, introduced in 3.7.

--
nosy: +martin.panter

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40657] Resource leaks with threading.Thread

2020-05-18 Thread Rahul Kumaresan


Change by Rahul Kumaresan :


--
nosy: +rahul-kumi

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40657] Resource leaks with threading.Thread

2020-05-17 Thread Rosen Tomov


New submission from Rosen Tomov :

In my project I'm using intensively threading to transfer HTTP data - reading 
is in separate thread and the process run smoothly. However when I've try to 
optimize stopping of the process and attempt to use the daemon threads. The 
result was 'Can't start new thread' error under Linux. In order to investigate 
the issue I've create small test program and found more interesting problem: 
using non daemon threads leaks handles (under Windows/x64 Semaphore type), 
while under Linux looks like leaks some other resource, can't say exactly what. 
When using a daemon threads no leaks handles under Windows but under Linux, 
after long time running the problem arrives, the only one solution is to reboot 
of Linux/ARM64, restarting the Python process didn't help! Of course the 
problem could be race condition or some locking problem, didn't investigate 
further and in Python's core source. 
Attached test programs reveals the problem very quickly, using Python 3.8.x 
interpreters. Also I've testing with lambdas and deletion and found that they 
do not influence the behavior.

--
components: Interpreter Core
files: thread.py
messages: 369102
nosy: POCEH
priority: normal
severity: normal
status: open
title: Resource leaks with threading.Thread
type: resource usage
versions: Python 3.8
Added file: https://bugs.python.org/file49162/thread.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com