[issue40149] test_threading leaked [38, 38, 38] references, sum=114

2020-04-27 Thread STINNER Victor
STINNER Victor added the comment: > I created bpo-40217: "The garbage collector doesn't take in account that > objects of heap allocated types hold a strong reference to their type". This issue is now fixed. I tested manually: I confirm that it does fix the test_threading leak, so I close

[issue40149] test_threading leaked [38, 38, 38] references, sum=114

2020-04-07 Thread STINNER Victor
STINNER Victor added the comment: > bpo-40149: Implement traverse in _abc._abc_data (GH-19412) Pablo told me that this change is not correct: the overriden traverse function must call PyType_Type.tp_traverse (parent method). -- ___ Python tracker

[issue40149] test_threading leaked [38, 38, 38] references, sum=114

2020-04-07 Thread hai shi
Change by hai shi : -- nosy: +shihai1991 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40149] test_threading leaked [38, 38, 38] references, sum=114

2020-04-07 Thread Dong-hee Na
Dong-hee Na added the comment: Wow Thank you for the summary :) -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue40149] test_threading leaked [38, 38, 38] references, sum=114

2020-04-07 Thread STINNER Victor
STINNER Victor added the comment: In _abcmodule_exec(), when _abc_data type is created, it's created with refcnt=3: * 1 strong reference (normal) * +1 ref from tp_dict['__new__'] slot * +1 ref from tp_mro type_traverse() visits tp_dict and tp_mro, so it's fine. In Py_EndInterpreter(),

[issue40149] test_threading leaked [38, 38, 38] references, sum=114

2020-04-07 Thread STINNER Victor
STINNER Victor added the comment: New changeset 9cc3ebd7e04cb645ac7b2f372eaafa7464e16b9c by Victor Stinner in branch 'master': bpo-40149: Implement traverse in _abc._abc_data (GH-19412) https://github.com/python/cpython/commit/9cc3ebd7e04cb645ac7b2f372eaafa7464e16b9c --

[issue40149] test_threading leaked [38, 38, 38] references, sum=114

2020-04-07 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +18772 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19412 ___ Python tracker ___

[issue40149] test_threading leaked [38, 38, 38] references, sum=114

2020-04-03 Thread Dong-hee Na
Dong-hee Na added the comment: Running from abc import ABCMeta on the subinterpreter makes same size of leak. -- ___ Python tracker ___

[issue40149] test_threading leaked [38, 38, 38] references, sum=114

2020-04-03 Thread Dong-hee Na
Dong-hee Na added the comment: gc: collectable gc: collectable gc: collectable gc: collectable is not collected for the first time. -- ___ Python tracker ___

[issue40149] test_threading leaked [38, 38, 38] references, sum=114

2020-04-01 Thread Dong-hee Na
Dong-hee Na added the comment: FYI, first gc collect 772 secondary gc collect 4 -- ___ Python tracker ___ ___ Python-bugs-list

[issue40149] test_threading leaked [38, 38, 38] references, sum=114

2020-04-01 Thread STINNER Victor
STINNER Victor added the comment: I'm not sure why, but trigger explicitly a second GC collection fix the issue. diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c index 2d5cb0ff78..d20ae01238 100644 --- a/Python/pylifecycle.c +++ b/Python/pylifecycle.c @@ -1295,6 +1295,7 @@

[issue40149] test_threading leaked [38, 38, 38] references, sum=114

2020-04-01 Thread STINNER Victor
STINNER Victor added the comment: Attached test_leak.py is enough to reproduce the leak. It's related to subinterpreters and the _abc module. -- Added file: https://bugs.python.org/file49024/test_leak.py ___ Python tracker

[issue40149] test_threading leaked [38, 38, 38] references, sum=114

2020-04-01 Thread STINNER Victor
New submission from STINNER Victor : New changeset 53e4c91725083975598350877e2ed8e2d0194114 by Dong-hee Na in branch 'master': bpo-40077: Convert _abc module to use PyType_FromSpec() (GH-19202) https://github.com/python/cpython/commit/53e4c91725083975598350877e2ed8e2d0194114 This change