Example on PPC64LE CentOS9 Refleaks 3.x buildbot (I ran the test manually):
$ ./python -m test -R 3:3 test_lazy_import -m test_deeply_dotted_name ... test_lazy_import leaked [19650, 19650, 19650] references, sum=58950 test_lazy_import leaked [9829, 9829, 9829] memory blocks, sum=29487 ... Result: FAILURE
See also the leak on PPC64LE CentOS9 Refleaks 3.x: https://buildbot.python.org/#/builders/867/builds/3577
CC @brittanyrey
The test was added by #159289.
Taking a look!
I put up a fix that adds an explicit call to self.addCleanup. #159576
There's also another workaround that changes the restricted stack size from 256 -> 512 which should also suffice:
- @support.run_with_limited_c_stack(depth=10_000, size=256 * 1024) + @support.run_with_limited_c_stack(depth=10_000, size=512 * 1024)
gh-159538: Fix deep chain leak in test_deeply_dotted_name (#159576)
[3.15] gh-159538: Fix deep chain leak in test_deeply_dotted_name (GH-…
Activity
StanFromIreland commented on Oct 16, 2026
CC @brittanyrey
vstinner commented on Oct 16, 2026
The test was added by #159289.
brittanyrey commented on Oct 16, 2026
Taking a look!
brittanyrey commented on Oct 16, 2026
I put up a fix that adds an explicit call to self.addCleanup. #159576
There's also another workaround that changes the restricted stack size from 256 -> 512 which should also suffice:
gh-159538: Fix deep chain leak in test_deeply_dotted_name (#159576)
[3.15] gh-159538: Fix deep chain leak in test_deeply_dotted_name (GH-…