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_if_huge_c_stack` underestimates available C recursion depth · Issue #155109 · python/cpython

skip_if_huge_c_stack underestimates available C recursion depth #155109

New issue
Copy link
New issue
Copy link
Closed
Closed
skip_if_huge_c_stack underestimates available C recursion depth#155109
Copy link
Assignees
serhiy-storchaka
Labels
testsTests in the Lib/test dirTests in the Lib/test dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

@kulikjak
kulikjak
opened on Aug 3, 2026
Issue body actions

Bug report

Bug description:

Hi! With the recent merge of #154277, we started seeing test_parameters_deep_recursion failure on Solaris; and I believe that the reason for this failure is an insufficient heuristic in the skip_if_huge_c_stack decorator.

On Solaris, we run the tests with 16 MiB stacks (rather than widely used 8MiB). At this stack size, the test fails with:

 ======================================================================
 FAIL: test_parameters_deep_recursion (test.test_typing.GenericTests.test_parameters_deep_recursion)
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "..../Lib/test/test_typing.py", line 4939, in test_parameters_deep_recursion
     with self.assertRaisesRegex(RecursionError, "in __parameter__ calculation"):
          ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 AssertionError: RecursionError not raised

From my testing, 14 MiB and above causes the failure on Intel, and 32 MiB and above on SPARC (different frame sizes result in different thresholds).

I used a GitHub action with ubuntu-24.04 os to test this on Linux, and it fails there as well at 20MiB+.

BTW, on MacOS, it always passes - either the heuristic works good there, or the stack handling works differently than on other platforms where I tested it (I did not investigate that further).

CPython versions tested on:

CPython main branch

Operating systems tested on:

Other

Linked PRs

  • gh-155109: Run tests exhausting the C stack with a limited C stack #155120
  • [3.15] gh-155109: Run tests exhausting the C stack with a limited C stack (GH-155120) #155164
  • [3.14] gh-155109: Run tests exhausting the C stack with a limited C stack (GH-155120) #155165

Activity

  1. kulikjak
    added
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    on Aug 3, 2026
  2. StanFromIreland
    added
    testsTests in the Lib/test dirTests in the Lib/test dir
    on Aug 3, 2026
  3. StanFromIreland commented on Aug 3, 2026

    @StanFromIreland
    StanFromIreland
    on Aug 3, 2026
    Member
    More actions

    Possibly related: #155103

  4. serhiy-storchaka
    self-assigned this
    on Aug 3, 2026
  5. serhiy-storchaka
    added 3 commits that reference this issue on Aug 4, 2026

    Merge branch 'main' of https://github.com/python/cpython into pythong…

    024188e

    gh-155109: Run tests exhausting the C stack with a limited C stack (G…

    ce5ae29

    [3.14] gh-155109: Run tests exhausting the C stack with a limited C s…

    b669be3
  6. deadlovelll
    added a commit that references this issue on Aug 5, 2026

    [3.14] pythongh-155109: Run tests exhausting the C stack with a limit…

    f161c35
  7. StanFromIreland
    marked test_parameters_deep_recursion failed on the free-threading CI job #155103 as a duplicate of this issue on Aug 6, 2026
  8. mbeijen
    added a commit that references this issue on Aug 14, 2026

    pythongh-155109: Run tests exhausting the C stack with a limited C st…

    50c8389
  9. serhiy-storchaka
    closed this as completedon Aug 16, 2026
  10. serhiy-storchaka
    added a commit that references this issue on Oct 10, 2026

    [3.15] gh-155109: Run tests exhausting the C stack with a limited C s…

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

Metadata

Metadata

Assignees

  • @serhiy-storchaka
    serhiy-storchaka

Labels

testsTests in the Lib/test dirTests in the Lib/test dirtype-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.