Title: `skip_if_huge_c_stack` underestimates available C recursion depth · Issue #155109 · python/cpython · GitHub
Open Graph Title: `skip_if_huge_c_stack` underestimates available C recursion depth · Issue #155109 · python/cpython
X Title: `skip_if_huge_c_stack` underestimates available C recursion depth · Issue #155109 · python/cpython
Description: 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_stac...
Open Graph Description: 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 insuffici...
X Description: 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 insuffici...
Opengraph URL: https://github.com/python/cpython/issues/155109
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`skip_if_huge_c_stack` underestimates available C recursion depth","articleBody":"# Bug report\n\n### Bug description:\n\nHi! 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.\n\nOn Solaris, we run the tests with 16 MiB stacks (rather than widely used 8MiB). At this stack size, the test fails with:\n```pytb\n ======================================================================\n FAIL: test_parameters_deep_recursion (test.test_typing.GenericTests.test_parameters_deep_recursion)\n ----------------------------------------------------------------------\n Traceback (most recent call last):\n File \"..../Lib/test/test_typing.py\", line 4939, in test_parameters_deep_recursion\n with self.assertRaisesRegex(RecursionError, \"in __parameter__ calculation\"):\n ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n AssertionError: RecursionError not raised\n```\nFrom 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).\n\nI used a GitHub action with `ubuntu-24.04` os to test this on Linux, and it fails there as well at 20MiB+.\n\nBTW, 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).\n\n### CPython versions tested on:\n\nCPython main branch\n\n### Operating systems tested on:\n\nOther\n\n\u003c!-- gh-linked-prs -->\n### Linked PRs\n* gh-155120\n* gh-155164\n* gh-155165\n\u003c!-- /gh-linked-prs -->\n","author":{"url":"https://github.com/kulikjak","@type":"Person","name":"kulikjak"},"datePublished":"2026-08-03T08:52:27Z","url":"https://github.com/python/cpython/issues/155109"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:69eaf657-d3c8-20a5-2df9-3670f0b7e4ed |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D276:1F87:3959F4:47E98F:6B020954 |
| html-safe-nonce | 29f8d8889610b6f301c802953944ebfc4976613dcfef43ef2d6033163b7c0bf7 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMjc2OjFGODc6Mzk1OUY0OjQ3RTk4Rjo2QjAyMDk1NCIsInZpc2l0b3JfaWQiOiI1MzEyMTkyNDc2MDc1OTE5NzAwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | a94b889d68b7bb92c64e80d7acb5caf28477d73cf54594cf2f78fb81cf20d64c |
| hovercard-subject-tag | issue:5048024685 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/155109/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e63748ef0f1d37158fec345955ea9da2f77faa198f5bef76b2a04001cff480a1/python/cpython/issues/155109 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e63748ef0f1d37158fec345955ea9da2f77faa198f5bef76b2a04001cff480a1/python/cpython/issues/155109 |
| og:image:alt | 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 insuffici... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | kulikjak |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width