GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [3.13] gh-124785: alternative interned string clear fix by nascheme · Pull Request #124796 · python/cpython

Conversation

@nascheme

@nascheme nascheme commented Sep 30, 2024 •
edited by bedevere-app Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

The gh-124646 fix has the issue that it breaks the trace-refs debug build. This is a simpler fix that avoids the use-after-free crashes by just leaking immortal interned strings allocated by legacy sub-interpreters.

  • Issue: [TraceRefs build] Tests fail: _PyRefchain_Remove: Assertion `value == REFCHAIN_VALUE' failed #124785

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
nascheme added 2 commits September 30, 2024 10:47
@nascheme
Revert "[3.13] pythongh-116510: Fix crash due to shared immortal inte…
082aae0
…rned strings. (pythongh-124646)"

This reverts commit dc09a0c.
@nascheme
pythongh-124785: alternative immortal string clear fix
40c78e5
The pythonGH-124646 fix has the issue that it breaks the trace-refs debug
build.  This is a simpler fix that avoids the use-after-free crashes by
just leaking immortal interned strings allocated by legacy
subinterpreters.
@bedevere-app bedevere-app Bot mentioned this pull request Sep 30, 2024
[TraceRefs build] Tests fail: _PyRefchain_Remove: Assertion `value == REFCHAIN_VALUE' failed #124785
Closed
@nascheme nascheme added the 3.13 only security fixes label Sep 30, 2024
@AA-Turner AA-Turner changed the title gh-124785: alternative interned string clear fix [3.13] gh-124785: alternative interned string clear fix Sep 30, 2024
@Yhg1s

Yhg1s commented Sep 30, 2024

Copy link
Copy Markdown
Member

Since this is a rollback of the original fix plus a new, debatably dodgy fix on top, can we just do a regular rollback of #124648 first? I think we need more time for the proper fix and I'd rather release 3.13 (and 3.12, really) with known issues than introduce wholly new ones.

nascheme reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nascheme

nascheme commented Sep 30, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member Author

You should rollback GH-124648, it was not as safe a change as I thought it was. I thought it only kicks into action of you are using "basic single-phase init" extensions and at that point you are already on shaky ground. However it actually kicks in if your sub-interpreter is allowed to use those extensions, i.e Py_RTFLAGS_MULTI_INTERP_EXTENSIONS is set. I didn't realize that detail until investigating the gh-124785.

With GH-124648 rolled back, you can make a separate decision if you want to merge this PR into a RC. It fixes a use-after-free segfault bug. However, those bugs only get triggered if you are on the shaky ground as explained above (embedding case with legacy sub-interpreters). So, I think you would be well justified to say you don't want to merge this given we are already into RC2. If the ABI change is a problem, I think it can be re-worked to avoid that. Then it could go into 3.13.1 as just a regular bugfix.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Yhg1s Yhg1s mentioned this pull request Sep 30, 2024
gh-124785: Revert "gh-116510: Fix crash due to shared immortal interned strings (gh-124646)" #124807
Merged
@nascheme

nascheme commented Sep 30, 2024

Copy link
Copy Markdown
Member Author

Closing, for the 'main' branch I think GH-124808 is a better fix. For 3.13 (and 3.12) I'll work on either a backported version of GH-124808 or potentially a re-worked version of this PR.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nascheme nascheme closed this Sep 30, 2024
@nascheme nascheme mentioned this pull request Oct 1, 2024
gh-124785: re-work fix so tracerefs test passes #124808
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@kumaraditya303 kumaraditya303 Awaiting requested review from kumaraditya303 kumaraditya303 will be requested when the pull request is marked ready for review kumaraditya303 is a code owner
@ericsnowcurrently ericsnowcurrently Awaiting requested review from ericsnowcurrently ericsnowcurrently will be requested when the pull request is marked ready for review ericsnowcurrently is a code owner

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

3.13 only security fixes

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@nascheme @Yhg1s
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.