-
-
Notifications
You must be signed in to change notification settings - Fork 30.4k
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
gh-126312: Don't traverse frozen objects on the free-threaded build #126338
gh-126312: Don't traverse frozen objects on the free-threaded build #126338
Conversation
ZeroIntensity
commented
Nov 2, 2024
•
edited by bedevere-app
bot
Loading
edited by bedevere-app
bot
- Issue: GC aborts in debug no-gil build #126312
Apparently, the fix isn't as stable as I thought. Marking as draft temporarily. |
It looks good. |
Co-authored-by: Sergey B Kirpichev <[email protected]>
…ensity/cpython into fix-nogil-frozen-objects
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes to gc_free_threading.c
look good. A few questions about the test case.
I think we also need to update visit_freeze
to avoid marking objects with _PyGC_BITS_UNREACHABLE
set as frozen.
Please also fix |
Done. I'll see if I can come up with a quick test case. If not, it's probably fine to merge that untested, as it's such a small change. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
I was surprised by the "_PyGC_Freeze() no longer freezes unreachable objects" change which is not "directly" related to "Don't traverse frozen objects on the free-threaded build". But this change makes sense.
Thanks @ZeroIntensity for the PR, and @vstinner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13. |
Sorry, @ZeroIntensity and @vstinner, I could not cleanly backport this to
|
@ZeroIntensity: Oh, the automated backport to 3.13 failed. Do you want to attempt to fix the cherry-pick conflict? |
Merged, thanks @ZeroIntensity. |
…eaded build (pythonGH-126338) Also, _PyGC_Freeze() no longer freezes unreachable objects. (cherry picked from commit d4c72fe) Co-authored-by: Peter Bierma <[email protected]> Co-authored-by: Sergey B Kirpichev <[email protected]>
GH-126866 is a backport of this pull request to the 3.13 branch. |
…build (GH-126338) (#126866) * Fix merge conflicts. * [3.13] gh-126312: Don't traverse frozen objects on the free-threaded build (GH-126338) Also, _PyGC_Freeze() no longer freezes unreachable objects. (cherry picked from commit d4c72fe) Co-authored-by: Peter Bierma <[email protected]> Co-authored-by: Sergey B Kirpichev <[email protected]> --------- Co-authored-by: Sergey B Kirpichev <[email protected]>