[issue37788] fix for bpo-36402 (threading._shutdown() race condition) causes reference leak

2021-05-25 Thread STINNER Victor
STINNER Victor added the comment: Fix in the main branch: commit c10c2ec7a0e06975e8010c56c9c3270f8ea322ec Author: Antoine Pitrou Date: Fri May 14 21:37:20 2021 +0200 bpo-37788: Fix reference leak when Thread is never joined (GH-26103) When a Thread is not joined

[issue37788] fix for bpo-36402 (threading._shutdown() race condition) causes reference leak

2021-05-15 Thread Antoine Pitrou
Change by Antoine Pitrou : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue37788] fix for bpo-36402 (threading._shutdown() race condition) causes reference leak

2021-05-15 Thread miss-islington
miss-islington added the comment: New changeset b30b25b26663fb6070b8ed86fe3a20dcb557d05d by Antoine Pitrou in branch '3.9': [3.9] bpo-37788: Fix reference leak when Thread is never joined (GH-26103) (GH-26142) https://github.com/python/cpython/commit/b30b25b26663fb6070b8ed86fe3a20dcb557d05d

[issue37788] fix for bpo-36402 (threading._shutdown() race condition) causes reference leak

2021-05-15 Thread miss-islington
miss-islington added the comment: New changeset 71dca6ea73aaf215fafa094512e8c748248c16b0 by Miss Islington (bot) in branch '3.10': [3.10] bpo-37788: Fix reference leak when Thread is never joined (GH-26103) (GH-26138)

[issue37788] fix for bpo-36402 (threading._shutdown() race condition) causes reference leak

2021-05-15 Thread Antoine Pitrou
Change by Antoine Pitrou : -- pull_requests: +24777 pull_request: https://github.com/python/cpython/pull/26142 ___ Python tracker ___

[issue37788] fix for bpo-36402 (threading._shutdown() race condition) causes reference leak

2021-05-15 Thread Antoine Pitrou
Change by Antoine Pitrou : -- versions: -Python 3.8 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37788] fix for bpo-36402 (threading._shutdown() race condition) causes reference leak

2021-05-14 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 14.0 -> 15.0 pull_requests: +24772 pull_request: https://github.com/python/cpython/pull/26138 ___ Python tracker

[issue37788] fix for bpo-36402 (threading._shutdown() race condition) causes reference leak

2021-05-13 Thread Antoine Pitrou
Change by Antoine Pitrou : -- nosy: +pitrou nosy_count: 13.0 -> 14.0 pull_requests: +24745 pull_request: https://github.com/python/cpython/pull/26103 ___ Python tracker ___

[issue37788] fix for bpo-36402 (threading._shutdown() race condition) causes reference leak

2021-05-13 Thread Antoine Pitrou
Change by Antoine Pitrou : -- versions: +Python 3.11 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37788] fix for bpo-36402 (threading._shutdown() race condition) causes reference leak

2021-04-11 Thread hai shi
hai shi added the comment: I created PR 25226. It's a another way to solve this problem. Compared to PR 15175, `_set_sentinel()` don't need to receive any params :) -- ___ Python tracker

[issue37788] fix for bpo-36402 (threading._shutdown() race condition) causes reference leak

2021-04-06 Thread hai shi
Change by hai shi : -- nosy: +shihai1991 nosy_count: 12.0 -> 13.0 pull_requests: +23963 pull_request: https://github.com/python/cpython/pull/25226 ___ Python tracker ___

[issue37788] fix for bpo-36402 (threading._shutdown() race condition) causes reference leak

2021-04-03 Thread Martin Panter
Martin Panter added the comment: Anselm's pull request PR 15175 looked hopeful to me. I've been using those changes in our builds at work for a while. -- ___ Python tracker

[issue37788] fix for bpo-36402 (threading._shutdown() race condition) causes reference leak

2021-04-02 Thread Roundup Robot
Change by Roundup Robot : -- nosy: +python-dev nosy_count: 11.0 -> 12.0 pull_requests: +23895 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/25148 ___ Python tracker

[issue37788] fix for bpo-36402 (threading._shutdown() race condition) causes reference leak

2021-03-29 Thread Jason R. Coombs
Jason R. Coombs added the comment: No. The issue remains open. -- stage: -> needs patch versions: -Python 3.7 ___ Python tracker ___

[issue37788] fix for bpo-36402 (threading._shutdown() race condition) causes reference leak

2021-03-29 Thread Zhipeng Xie
Zhipeng Xie <775350...@qq.com> added the comment: ping I also encountered this problem. Is there a fix now? -- nosy: +Zhipeng Xie ___ Python tracker ___

[issue37788] fix for bpo-36402 (threading._shutdown() race condition) causes reference leak

2021-03-13 Thread STINNER Victor
STINNER Victor added the comment: Oh, I'm confused. This issue is about the threading module, whereas bpo-37193 is unrelated: it's about the socketserver module. -- ___ Python tracker

[issue37788] fix for bpo-36402 (threading._shutdown() race condition) causes reference leak

2021-03-13 Thread Mark Dickinson
Mark Dickinson added the comment: Re-opening; I believe this issue is still valid. Here's output on a debug build on current master (commit 7591d9455eb37525c832da3d65e1a7b3e6dbf613) on my machine: lovelace:cpython mdickinson$ ./python.exe Python 3.10.0a6+

[issue37788] fix for bpo-36402 (threading._shutdown() race condition) causes reference leak

2021-03-13 Thread Mark Dickinson
Mark Dickinson added the comment: @Victor: How does the fix for #37193 solve this issue? I think I'm missing something. -- ___ Python tracker ___

[issue37788] fix for bpo-36402 (threading._shutdown() race condition) causes reference leak

2021-03-13 Thread STINNER Victor
STINNER Victor added the comment: bpo-37193 has been fixed. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue37788] fix for bpo-36402 (threading._shutdown() race condition) causes reference leak

2021-03-09 Thread Mark Dickinson
Change by Mark Dickinson : -- nosy: +mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37788] fix for bpo-36402 (threading._shutdown() race condition) causes reference leak

2021-01-27 Thread Martin Panter
Change by Martin Panter : -- keywords: +3.7regression ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37788] fix for bpo-36402 (threading._shutdown() race condition) causes reference leak

2020-11-04 Thread Jason R. Coombs
Jason R. Coombs added the comment: I marked bpo-42263 as a duplicate of this issue. This issue is implicated in preventing the desired fix for bpo-37193, where a thread wishes to remove the handle to itself after performing its duty. By removing its own handle, it can never be joined, and

[issue37788] fix for bpo-36402 (threading._shutdown() race condition) causes reference leak

2020-11-04 Thread Jason R. Coombs
Change by Jason R. Coombs : -- versions: +Python 3.10 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37788] fix for bpo-36402 (threading._shutdown() race condition) causes reference leak

2020-06-23 Thread Виктор
Change by Виктор : -- nosy: +ViktorPegy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37788] fix for bpo-36402 (threading._shutdown() race condition) causes reference leak

2020-06-19 Thread Arkady
Arkady added the comment: I have reproduced a similar memory leak in the multiprocessing This is the trace: 913 memory blocks: 33232 Bytes: File "/usr/lib/python3.7/threading.py", line 890;self._bootstrap_inner(); File "/usr/lib/python3.7/threading.py", line 914;

[issue37788] fix for bpo-36402 (threading._shutdown() race condition) causes reference leak

2020-01-06 Thread STINNER Victor
STINNER Victor added the comment: I marked bpo-39201 as a duplicate of this issue. -- ___ Python tracker ___ ___ Python-bugs-list

[issue37788] fix for bpo-36402 (threading._shutdown() race condition) causes reference leak

2020-01-06 Thread STINNER Victor
STINNER Victor added the comment: I marked bpo-39074 as a duplicate of this issue. -- ___ Python tracker ___ ___ Python-bugs-list

[issue37788] fix for bpo-36402 (threading._shutdown() race condition) causes reference leak

2019-12-18 Thread Martin Panter
Change by Martin Panter : -- nosy: +martin.panter ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37788] fix for bpo-36402 (threading._shutdown() race condition) causes reference leak

2019-12-18 Thread Adam
Adam added the comment: I ran into this bug as well, and opened an issue for it (before I saw this issue): https://bugs.python.org/issue39074 Was there a conclusion on the best way to fix this? It seems like the previous __del__ implementation would correct the resource leakage by removing

[issue37788] fix for bpo-36402 (threading._shutdown() race condition) causes reference leak

2019-10-11 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Hummmis this really a regression? The docs say: > No other methods (except for the constructor) should be overridden in a > subclass. In other words, only override the __init__() and run() methods of > this class. So if someone is overriding

[issue37788] fix for bpo-36402 (threading._shutdown() race condition) causes reference leak

2019-10-11 Thread STINNER Victor
STINNER Victor added the comment: Copy of wmanley's comment: https://github.com/python/cpython/pull/13948#issuecomment-541076882 """ This caused a regression for people overriding Thread.join to implement custom thread interruption. See

[issue37788] fix for bpo-36402 (threading._shutdown() race condition) causes reference leak

2019-08-19 Thread STINNER Victor
STINNER Victor added the comment: New changeset d11c2c607768fa549b1aed7899edc061b2ebf19f by Victor Stinner in branch 'master': Revert "bpo-37788: Fix a reference leak if a thread is not joined (GH-15228)" (GH-15338)

[issue37788] fix for bpo-36402 (threading._shutdown() race condition) causes reference leak

2019-08-19 Thread STINNER Victor
STINNER Victor added the comment: > https://github.com/python/cpython/commit/d3dcc92778807ae8f7ebe85178f36a29711cd478 This change introduced a regression :-( https://github.com/python/cpython/pull/15228#issuecomment-522792133 I created PR 15338 to revert it --

[issue37788] fix for bpo-36402 (threading._shutdown() race condition) causes reference leak

2019-08-19 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +15055 pull_request: https://github.com/python/cpython/pull/15338 ___ Python tracker ___

[issue37788] fix for bpo-36402 (threading._shutdown() race condition) causes reference leak

2019-08-19 Thread STINNER Victor
STINNER Victor added the comment: New changeset d3dcc92778807ae8f7ebe85178f36a29711cd478 by Victor Stinner in branch 'master': bpo-37788: Fix a reference leak if a thread is not joined (GH-15228) https://github.com/python/cpython/commit/d3dcc92778807ae8f7ebe85178f36a29711cd478 --

[issue37788] fix for bpo-36402 (threading._shutdown() race condition) causes reference leak

2019-08-19 Thread miss-islington
Change by miss-islington : -- pull_requests: +15054 pull_request: https://github.com/python/cpython/pull/15337 ___ Python tracker ___

[issue37788] fix for bpo-36402 (threading._shutdown() race condition) causes reference leak

2019-08-19 Thread miss-islington
Change by miss-islington : -- pull_requests: +15053 pull_request: https://github.com/python/cpython/pull/15336 ___ Python tracker ___

[issue37788] fix for bpo-36402 (threading._shutdown() race condition) causes reference leak

2019-08-12 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +14952 pull_request: https://github.com/python/cpython/pull/15228 ___ Python tracker ___

[issue37788] fix for bpo-36402 (threading._shutdown() race condition) causes reference leak

2019-08-09 Thread Kubilay Kocak
Change by Kubilay Kocak : -- nosy: +koobs ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37788] fix for bpo-36402 (threading._shutdown() race condition) causes reference leak

2019-08-08 Thread Anselm Kruis
Change by Anselm Kruis : -- nosy: +vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37788] fix for bpo-36402 (threading._shutdown() race condition) causes reference leak

2019-08-08 Thread Anselm Kruis
Anselm Kruis added the comment: The root cause for the reference leak is the global set threading._shutdown_locks. It contains Thread._tstate_lock locks of non-daemon threads. If a non-daemon thread terminates and no other thread joins the terminated thread, the _tstate_lock remains in

[issue37788] fix for bpo-36402 (threading._shutdown() race condition) causes reference leak

2019-08-08 Thread Anselm Kruis
Change by Anselm Kruis : -- pull_requests: +14906 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15175 ___ Python tracker ___

[issue37788] fix for bpo-36402 (threading._shutdown() race condition) causes reference leak

2019-08-07 Thread Anselm Kruis
New submission from Anselm Kruis : Starting with commit 468e5fec (bpo-36402: Fix threading._shutdown() race condition (GH-13948)) the following trivial test case leaks one reference and one memory block. class MiscTestCase(unittest.TestCase): def test_without_join(self): # Test