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 — Skip test_highly_nested_objects_decoding during the PGO profile task. by gpshead · Pull Request #151460 · python/cpython

Conversation

@gpshead

@gpshead gpshead commented Jun 14, 2026

Copy link
Copy Markdown
Member

One line change to disable test_json.test_highly_nested_objects_decoding during PGO training.

Since the recursion guard tracks real C-stack bounds (gh-91079), this test asserts that 500k nesting levels overflow the stack margin. On a 64 MiB stack (some Nix build envs use one that large), the optimized interpreter uses ~160 bytes/level (raises at ~420k levels) so the assertion holds with only ~16% margin; the PGO instrumented stage inlines less, its per-level scanner frames are smaller, and the 500k-deep decode completes -- "RecursionError not raised" fails the profile run and aborts make profile-opt. Upstream's skip_if_unlimited_stack_size (gh-143460) only covers RLIM_INFINITY, not large-finite stacks like ours.

We could also keep playing whack a mole and raise the 500k to a much larger number... but there's little value in PGO training on this test anyways.

Sorry, something went wrong.

Uh oh!

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

All reactions
@gpshead
Skip test_highly_nested_objects_decoding during the PGO profile task.
7efe303
Since the recursion guard tracks real C-stack bounds (pythongh-91079), this test
asserts that 500k nesting levels overflow the stack margin. On a 64 MiB stack
(some Nix build envs use one that large), the optimized interpreter uses ~160
bytes/level (raises at ~420k levels) so the assertion holds with only ~16%
margin; the PGO *instrumented* stage inlines less, its per-level scanner frames
are smaller, and the 500k-deep decode completes -- "RecursionError not raised"
fails the profile run and aborts `make profile-opt`. Upstream's
skip_if_unlimited_stack_size (pythongh-143460) only covers RLIM_INFINITY, not
large-finite stacks like ours.

We could also keep playing whack a mole and raise the 500k to a much larger
number... but there's little value in PGO training on this test anyways.
@gpshead gpshead self-assigned this Jun 14, 2026
@gpshead gpshead added tests Tests in the Lib/test dir skip issue build The build process and cross-build needs backport to 3.14 bugs and security fixes needs backport to 3.15 bugs and security fixes labels Jun 14, 2026
@bedevere-app bedevere-app Bot added the awaiting core review label Jun 14, 2026
@gpshead gpshead added the skip news label Jun 14, 2026
@gpshead
gpshead enabled auto-merge (squash) June 14, 2026 00:53
@gpshead
gpshead merged commit e91f68a into python:main Jun 14, 2026
140 of 144 checks passed

Uh oh!

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

@bedevere-app bedevere-app Bot removed the awaiting core review label Jun 14, 2026
@miss-islington-app

miss-islington-app Bot commented Jun 14, 2026

Copy link
Copy Markdown

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

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-app

bedevere-app Bot commented Jun 14, 2026

Copy link
Copy Markdown

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

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 bugs and security fixes label Jun 14, 2026
@bedevere-app

bedevere-app Bot commented Jun 14, 2026

Copy link
Copy Markdown

GH-151469 is a backport of this pull request to the 3.14 branch.

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Jun 14, 2026
gpshead added a commit that referenced this pull request Jun 14, 2026
@miss-islington @gpshead
[3.15] Skip test_highly_nested_objects_decoding during the PGO profil…
1b457d3
…e task. (GH-151460) (#151468)

Skip test_highly_nested_objects_decoding during the PGO profile task. (GH-151460)

Since the recursion guard tracks real C-stack bounds (gh-91079), this test
asserts that 500k nesting levels overflow the stack margin. On a 64 MiB stack
(some Nix build envs use one that large), the optimized interpreter uses ~160
bytes/level (raises at ~420k levels) so the assertion holds with only ~16%
margin; the PGO *instrumented* stage inlines less, its per-level scanner frames
are smaller, and the 500k-deep decode completes -- "RecursionError not raised"
fails the profile run and aborts `make profile-opt`. Upstream's
skip_if_unlimited_stack_size (gh-143460) only covers RLIM_INFINITY, not
large-finite stacks like ours.

We could also keep playing whack a mole and raise the 500k to a much larger
number... but there's little value in PGO training on this test anyways.
(cherry picked from commit e91f68a)

Co-authored-by: Gregory P. Smith <[email protected]>
gpshead added a commit that referenced this pull request Jun 14, 2026
@miss-islington @gpshead
[3.14] Skip test_highly_nested_objects_decoding during the PGO profil…
f892d79
…e task. (GH-151460) (#151469)

Skip test_highly_nested_objects_decoding during the PGO profile task. (GH-151460)

Since the recursion guard tracks real C-stack bounds (gh-91079), this test
asserts that 500k nesting levels overflow the stack margin. On a 64 MiB stack
(some Nix build envs use one that large), the optimized interpreter uses ~160
bytes/level (raises at ~420k levels) so the assertion holds with only ~16%
margin; the PGO *instrumented* stage inlines less, its per-level scanner frames
are smaller, and the 500k-deep decode completes -- "RecursionError not raised"
fails the profile run and aborts `make profile-opt`. Upstream's
skip_if_unlimited_stack_size (gh-143460) only covers RLIM_INFINITY, not
large-finite stacks like ours.

We could also keep playing whack a mole and raise the 500k to a much larger
number... but there's little value in PGO training on this test anyways.
(cherry picked from commit e91f68a)

Co-authored-by: Gregory P. Smith <[email protected]>
@bedevere-bot

bedevere-bot commented Jun 14, 2026

Copy link
Copy Markdown

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

Hi! The buildbot s390x Fedora Stable Refleaks 3.14 (tier-3) has failed when building commit f892d79.

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/1776/builds/1223) and take a look at the build logs.
  4. Check if the failure is related to this commit (f892d79) 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/1776/builds/1223

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

Click to see traceback logs
Note: switching to 'f892d79013a1f0eb00a67b902d317ef3f9e5f4d3'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at f892d79013a1f [3.14] Skip test_highly_nested_objects_decoding during the PGO profile task. (GH-151460) (#151469)
Switched to and reset branch '3.14'

ar: libpython3.14d.a: error reading Modules/posixmodule.o: No space left on device
make: *** [Makefile:1177: libpython3.14d.a] Error 1
All reactions

Sorry, something went wrong.

Uh oh!

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

philthompson10 pushed a commit to philthompson10/cpython that referenced this pull request Jun 17, 2026
@gpshead @philthompson10
Skip test_highly_nested_objects_decoding during the PGO profile task. (…
263e6ba
…pythonGH-151460)

Since the recursion guard tracks real C-stack bounds (pythongh-91079), this test
asserts that 500k nesting levels overflow the stack margin. On a 64 MiB stack
(some Nix build envs use one that large), the optimized interpreter uses ~160
bytes/level (raises at ~420k levels) so the assertion holds with only ~16%
margin; the PGO *instrumented* stage inlines less, its per-level scanner frames
are smaller, and the 500k-deep decode completes -- "RecursionError not raised"
fails the profile run and aborts `make profile-opt`. Upstream's
skip_if_unlimited_stack_size (pythongh-143460) only covers RLIM_INFINITY, not
large-finite stacks like ours.

We could also keep playing whack a mole and raise the 500k to a much larger
number... but there's little value in PGO training on this test anyways.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

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

Assignees

@gpshead gpshead

Labels

build The build process and cross-build skip issue skip news tests Tests in the Lib/test dir

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

@gpshead @bedevere-bot
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.