python / python/cpython

Data races with frame objects

Open
#144,446 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

3.16 interpreter-core topic-free-threading type-bug
Dominant language
Python
Stars
77.2k
Forks
35.9k
PR merge metrics
PR metrics pending

Description

Bug report

We've fixed most of the data races with Python frame objects in:

But I think we missed a few places, such as:

  • repr(frame) on an frame that is executing or in the process of getting cleared
  • frame.f_lasti
  • Accessing variables through frame.f_locals

Additionally, I'd like to add more free threading tests for frames.

Linked PRs
  • gh-144479
  • gh-144546
  • gh-145183
  • gh-156037
  • gh-156893
  • gh-156973

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the unchecked frame.f_locals item and review the linked PRs for the frame-object race work. The issue names no files or tests; done means resolving the remaining variable-access race and adding the requested free-threading frame tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
compilers
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
15/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.