Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TraceRefs] test_import fails with: _PyRefchain_Remove: Assertion `value == REFCHAIN_VALUE' failed. #121198

Closed
vstinner opened this issue Jul 1, 2024 · 2 comments
Labels
tests Tests in the Lib/test dir topic-subinterpreters type-bug An unexpected behavior, bug, or error

Comments

@vstinner
Copy link
Member

vstinner commented Jul 1, 2024

Bug report

AMD64 Arch Linux TraceRefs PR build: https://buildbot.python.org/all/#/builders/82/builds/1378

test_basic_multiple_interpreters_reset_each (test.test_import.SinglephaseInitTests.test_basic_multiple_interpreters_reset_each) ...

python: Objects/object.c:195: _PyRefchain_Remove: Assertion `value == REFCHAIN_VALUE' failed.
Fatal Python error: Aborted

Current thread 0x00007f26bc0c0740 (most recent call first):
  File "<string>", line 54 in <module>

Extension modules: _testinternalcapi, _testmultiphase, _testcapi (total: 3)
@vstinner vstinner added type-bug An unexpected behavior, bug, or error tests Tests in the Lib/test dir labels Jul 1, 2024
@vstinner
Copy link
Member Author

vstinner commented Jul 1, 2024

Regression introduced by: commit b2cd54a

commit b2cd54a4fb2ecdb7b1d30bda8af3314d3a32031e
Author: Eric Snow <ericsnowcurrently@gmail.com>
Date:   Mon May 6 22:21:51 2024 -0600

    gh-117953: Always Run Extension Init Func in Main Interpreter First (gh-118157)
    
    This change makes sure all extension/builtin modules have their init function run first by the main interpreter before proceeding with import in the original interpreter (main or otherwise).  This means when the import of a single-phase init module fails in an isolated subinterpreter, it won't tie any global state/callbacks to the subinterpreter.

cc @ericsnowcurrently @pablogsal

@ericsnowcurrently
Copy link
Member

Duplicate of gh-121110.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Tests in the Lib/test dir topic-subinterpreters type-bug An unexpected behavior, bug, or error
Projects
Status: Done
Development

No branches or pull requests

3 participants