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 — GC may have inconsistent view of stacktop with deferred references · Issue #118926 · python/cpython

GC may have inconsistent view of stacktop with deferred references #118926

New issue
Copy link
New issue
Copy link
Closed
#122730
Closed
GC may have inconsistent view of stacktop with deferred references#118926
#122730
Copy link
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

@Fidget-Spinner
Fidget-Spinner
opened on May 10, 2024
Issue body actions

In #118450, Sam pointed out that GC can occur at any Py_DECREF. With deferred references, we will need to traverse the object's stacks. The main problem is that frame->stacktop might not represent the true stacktop at a GC collection, because frame->stacktop is not set in between opcodes.

This requires either scanning the entire stack (not just up to stacktop), or deferring GC to safe points.

Linked PRs

  • gh-118926: Deferred reference counting GC changes for free threading #121318
  • GH-118926: Better distinguish between pointer and arrays in interpreter generator #121496
  • gh-118926: Spill deferred references to stack in cases generator #122748

Activity

  1. markshannon
    added a commit that references this issue on Jul 9, 2024

    GH-118926: Better distinguish between pointer and arrays in interpret…

    bf8686e
  2. estyxx
    added a commit that references this issue on Jul 17, 2024

    pythonGH-118926: Better distinguish between pointer and arrays in int…

    ee7a613
  3. markshannon
    closed this as completedin #122730on Aug 6, 2024
  4. colesbury
    added a commit that references this issue on Aug 6, 2024

    pythongh-118926: Spill deferred references to stack in cases generator

    70272dc
  5. colesbury
    reopened this on Aug 6, 2024
  6. colesbury
    added a commit that references this issue on Aug 7, 2024

    gh-118926: Spill deferred references to stack in cases generator (#12…

    3e753c6
  7. blhsing
    added a commit that references this issue on Aug 22, 2024

    pythongh-118926: Spill deferred references to stack in cases generator (

    6431127
  8. JacobCoffee
    added
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)
    on Oct 1, 2024
  9. JacobCoffee commented on Oct 1, 2024

    @JacobCoffee
    JacobCoffee
    on Oct 1, 2024
    Member
    More actions

    hey @Fidget-Spinner is this good to close since the ref'd PRs are merged?

  10. Fidget-Spinner commented on Oct 1, 2024

    @Fidget-Spinner
    Fidget-Spinner
    on Oct 1, 2024
    MemberAuthor
    More actions

    Yup

  11. Fidget-Spinner
    closed this as completedon Oct 1, 2024
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

    interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      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.