Skip to content

[3.14] Skip test_highly_nested_objects_decoding during the PGO profile task. (GH-151460)#151469

Merged
gpshead merged 1 commit into
python:3.14from
miss-islington:backport-e91f68a-3.14
Jun 14, 2026
Merged

[3.14] Skip test_highly_nested_objects_decoding during the PGO profile task. (GH-151460)#151469
gpshead merged 1 commit into
python:3.14from
miss-islington:backport-e91f68a-3.14

Conversation

@miss-islington

Copy link
Copy Markdown
Contributor

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 68491+gpshead@users.noreply.github.com

…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.
(cherry picked from commit e91f68a)

Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
@gpshead gpshead merged commit f892d79 into python:3.14 Jun 14, 2026
53 checks passed
@miss-islington miss-islington deleted the backport-e91f68a-3.14 branch June 14, 2026 18:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip issue skip news tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants