FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-151542: Use at least 2 MiB stack size, instead of 1 MiB by vstinner · Pull Request #151543 · python/cpython · GitHub

Repository navigation

gh-151542: Use at least 2 MiB stack size, instead of 1 MiB - #151543

Closed
vstinner wants to merge 1 commit into
python:mainfrom
vstinner:stack_size_2mib
Closed

vstinner wants to merge 1 commit into
python:mainfrom
vstinner:stack_size_2mib

Conversation

vstinner commented Jun 16, 2026 •
edited by bedevere-app Bot
Loading

Copy link
Copy Markdown
Member

Python needs at least 2 MiB stack to run test_threading on Free Threading.

Python needs at least 2 MiB stack to run test_threading on Free
Threading.

Copy link
Copy Markdown
Contributor

Is there any downside to bump it to 8MB which is default on glibc?

Copy link
Copy Markdown
Member Author

Tests / Sanitizers / TSan (free-threading) (pull_request): Failing after 23m

Ah, that's the unrelated test_ssl issue gh-150191:

WARNING: ThreadSanitizer: data race (pid=19679)
  Read of size 8 at 0x720800031f80 by thread T11:
    #0 memcmp <null> (python+0x10a64e) (BuildId: 41036444ba804d65aa7dcf36ed904a99f126bd28)
    #1 ASN1_STRING_cmp <null> (libcrypto.so.3+0xd5904) (BuildId: 79b8e7622d14cb55e5704008d40c02423919bfae)
...

Copy link
Copy Markdown
Member Author

Python needs at least 2 MiB stack to run test_threading on Free Threading.

I created issue gh-151546 for the root cause: _Py_Dealloc() mechanism (_Py_RecursionLimit_GetMargin()) to avoid stack overflow doesn't work properly on musl.

vstinner marked this pull request as draft June 16, 2026 15:29

Copy link
Copy Markdown
Member Author

This change is more a workaround than a fix for the root issue. I mark this PR as a draft for now.

I wrote #151548 to fix the root issue.

Copy link
Copy Markdown
Member Author

I merged #151548 fix instead. I close this PR.

vstinner closed this Jun 17, 2026
vstinner deleted the stack_size_2mib branch June 17, 2026 08:28
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs backport to 3.14 bugs and security fixes needs backport to 3.15 bugs and security fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL