Closed
Labels
3.14bugs and security fixesbugs and security fixesextension-modulesC modules in the Modules dirC modules in the Modules dirtopic-C-APItype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
Bug description:
Noted by @picnixz in #119827 (comment):
Failed tests:
test__interpchannels
test_capi
test__interpreters
test_ast
test_importlib
Test leaking resources:
test_importlib: references
test_ast: references
test__interpchannels: references
test__interpreters: memory blocks
test_capi: memory blocks
test_capi: references
test__interpreters: references
test_importlib: memory blocks
test_ast: memory blocks
test__interpchannels: memory blocksI'm bisecting a bad commit right now.
CPython versions tested on:
CPython main branch
Operating systems tested on:
macOS
Metadata
Metadata
Assignees
Labels
3.14bugs and security fixesbugs and security fixesextension-modulesC modules in the Modules dirC modules in the Modules dirtopic-C-APItype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Activity
Eclips4 commentedon Sep 26, 2024
Bisected to d929652.
Seems related to handling immortal objects in subinterpreters.
ZeroIntensity commentedon Sep 26, 2024
I don't think this is related to subinterpreters, but more that the
Placeholdersingleton isn't stored elsewhere, so it's never freed. It just gets reinitialized for every subinterpreter, so the leak seems greater.I can try and fix this much later today, but anyone feel free to try and do it before me.
vstinner commentedon Sep 26, 2024
The issue can be reproduced with:
which can be simplified to:
vstinner commentedon Sep 26, 2024
I wrote PR gh-124601 to fix the leak.
vstinner commentedon Sep 26, 2024
The leak was fixed by #124601.