Skip to content

gh-151229: Finalize JIT tracer in test eval-frame stub#151609

Merged
corona10 merged 1 commit into
python:mainfrom
corona10:gh-151229-capi
Jun 18, 2026
Merged

gh-151229: Finalize JIT tracer in test eval-frame stub#151609
corona10 merged 1 commit into
python:mainfrom
corona10:gh-151229-capi

Conversation

@corona10

@corona10 corona10 commented Jun 17, 2026

Copy link
Copy Markdown
Member

A test-only interpreter stubs out JIT compilation as a no-op, but the stub also forgot to reset the tracer's is_tracing flag. Under PYTHON_JIT_STRESS=1, a trace can start inside this stub and never finalize, leaving is_tracing stuck true, so the recursive-trace guard rejects every future trace, silently disabling the JIT for the rest of the process.

@corona10

Copy link
Copy Markdown
Member Author

@Fidget-Spinner @markshannon
Test results with PYTHON_JIT_STRESS=1, full test_capi, run=1,463:
The patch fixes all 269 failures (all in test_capi.test_opt) with no new regressions.

@markshannon markshannon left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for finding this.

@corona10 corona10 merged commit 3fa92e7 into python:main Jun 18, 2026
219 of 226 checks passed
@corona10 corona10 deleted the gh-151229-capi branch June 18, 2026 11:58
@corona10 corona10 added the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label Jun 18, 2026
@miss-islington-app

Copy link
Copy Markdown

Thanks @corona10 for the PR 🌮🎉.. I'm working now to backport this PR to: 3.15.
🐍🍒⛏🤖

@bedevere-app

bedevere-app Bot commented Jun 18, 2026

Copy link
Copy Markdown

GH-151648 is a backport of this pull request to the 3.15 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label Jun 18, 2026
corona10 added a commit that referenced this pull request Jun 18, 2026
) (gh-151648)

gh-151229: Finalize JIT tracer in test eval-frame stub (gh-151609)
(cherry picked from commit 3fa92e7)

Co-authored-by: Donghee Na <donghee.na@python.org>
@bedevere-bot

Copy link
Copy Markdown

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot AMD64 Debian root 3.x (tier-1) has failed when building commit 3fa92e7.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/345/builds/14526) and take a look at the build logs.
  4. Check if the failure is related to this commit (3fa92e7) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/#/builders/345/builds/14526

Failed tests:

  • test.test_multiprocessing_forkserver.test_misc

Summary of the results of the build (if available):

==

Click to see traceback logs
Traceback (most recent call last):
  File "/root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/support/__init__.py", line 948, in gc_collect
    gc.collect()
    ~~~~~~~~~~^^
ResourceWarning: unclosed file <_io.FileIO name=11 mode='wb' closefd=True>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants