Repository navigation
test_capi leaks references in free-threaded build #118085
Copy link
Copy link
Closed
Labels
testsTests in the Lib/test dirTests in the Lib/test dirtopic-free-threadingtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
Bug description:
./python.exe -m test -R 3:3 test_capi
Using random seed: 2679025675
0:00:00 load avg: 3.55 Run 1 test sequentially
0:00:00 load avg: 3.55 [1/1] test_capi
beginning 6 repetitions. Showing number of leaks (. for 0 or less, X for 10 or more)
123:456
Traceback (most recent call last):
File "<string>", line 10, in <module>
File "<frozen importlib._bootstrap>", line 813, in module_from_spec
File "<frozen importlib._bootstrap_external>", line 1314, in create_module
File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
ImportError: module _test_module_state_shared does not support loading in subinterpreters
XTraceback (most recent call last):
File "<string>", line 10, in <module>
File "<frozen importlib._bootstrap>", line 813, in module_from_spec
File "<frozen importlib._bootstrap_external>", line 1314, in create_module
File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
ImportError: module _test_module_state_shared does not support loading in subinterpreters
XTraceback (most recent call last):
File "<string>", line 10, in <module>
File "<frozen importlib._bootstrap>", line 813, in module_from_spec
File "<frozen importlib._bootstrap_external>", line 1314, in create_module
File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
ImportError: module _test_module_state_shared does not support loading in subinterpreters
1Traceback (most recent call last):
File "<string>", line 10, in <module>
File "<frozen importlib._bootstrap>", line 813, in module_from_spec
File "<frozen importlib._bootstrap_external>", line 1314, in create_module
File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
ImportError: module _test_module_state_shared does not support loading in subinterpreters
1Traceback (most recent call last):
File "<string>", line 10, in <module>
File "<frozen importlib._bootstrap>", line 813, in module_from_spec
File "<frozen importlib._bootstrap_external>", line 1314, in create_module
File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
ImportError: module _test_module_state_shared does not support loading in subinterpreters
1Traceback (most recent call last):
File "<string>", line 10, in <module>
File "<frozen importlib._bootstrap>", line 813, in module_from_spec
File "<frozen importlib._bootstrap_external>", line 1314, in create_module
File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
ImportError: module _test_module_state_shared does not support loading in subinterpreters
1
test_capi leaked [1, 1, 1] file descriptors, sum=3
test_capi failed (reference leak) in 53.0 sec
== Tests result: FAILURE ==
1 test failed:
test_capi
Total duration: 53.0 sec
Total tests: run=864 skipped=63
Total test files: run=1/1 failed=1
Result: FAILURECPython versions tested on:
CPython main branch
Operating systems tested on:
macOS
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
testsTests in the Lib/test dirTests in the Lib/test dirtopic-free-threadingtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Activity
Eclips4 commentedon Apr 19, 2024
Sadly, I can't reproduce it constantly.
But, should this traceback really be printed?
I suggest to mark
test_capi.tesc_misc.test_overridden_setting_extensions_subinterp_checkandtest_capi.test_misc.test_module_state_shared_in_globalwith asupport.requires_gil_enableddecorator instead ofexpected_failure_if_gil_disabled.cc @colesbury
colesbury commentedon Apr 19, 2024
Did this occur in the buildbots? Or locally?
Yeah, the traceback is not ideal. I don't think there's an easy way to suppress it without skipping the test.
Eclips4 commentedon Apr 19, 2024
It's happened locally. Perhaps I missed something while bisecting this (There's already a fix to a similar(same?) problem previously: #117780). So now it's looks for me like a false report.
One thing that remains - what we can do with this traceback.
corona10 commentedon Jun 29, 2024
@Eclips4 I can not reproduce from my local environment (Fedora 40, gcc14, 0a1e8ff)
Is it still reproduced?
Eclips4 commentedon Jun 29, 2024
No, it's not. Let's close it then. Thanks you Donghee for the reminder!