Skip to content

test_capi leaks references in free-threaded build #118085

Closed

Description

@Eclips4

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: FAILURE

CPython versions tested on:

CPython main branch

Operating systems tested on:

macOS

Activity

  1. Eclips4 commented on Apr 19, 2024

    @Eclips4
    MemberAuthor

    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_check and test_capi.test_misc.test_module_state_shared_in_global with a support.requires_gil_enabled decorator instead of expected_failure_if_gil_disabled.
    cc @colesbury

  2. colesbury commented on Apr 19, 2024

    @colesbury
    Contributor

    Sadly, I can't reproduce it constantly.

    Did this occur in the buildbots? Or locally?

    But, should this traceback really be printed?

    Yeah, the traceback is not ideal. I don't think there's an easy way to suppress it without skipping the test.

  3. Eclips4 commented on Apr 19, 2024

    @Eclips4
    MemberAuthor

    Sadly, I can't reproduce it constantly.

    Did this occur in the buildbots? Or locally?

    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.

  4. corona10 commented on Jun 29, 2024

    @corona10
    Member

    @Eclips4 I can not reproduce from my local environment (Fedora 40, gcc14, 0a1e8ff)
    Is it still reproduced?

  5. Eclips4 commented on Jun 29, 2024

    @Eclips4
    MemberAuthor

    No, it's not. Let's close it then. Thanks you Donghee for the reminder!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions