Skip to content

[3.15] gh-159320: use pthread_getattr_np for stack limit checks even on musl (GH-161749) - #162819

Open
hugovk wants to merge 2 commits into
python:3.15from
hugovk:backport-235d138-3.15
Open

hugovk wants to merge 2 commits into
python:3.15from
hugovk:backport-235d138-3.15

Conversation

@hugovk

@hugovk hugovk commented Nov 28, 2026 •

Copy link
Copy Markdown
Member

Rewrite the pthread_getattr_np usage to avoid the problem on musl of it reporting the stack limit of the main thread incorrectly. On platforms where pthread_getattr_np underreports the main thread's stack size, use RLIMIT_STACK for the main thread instead.

Add HAVE_UNRELIABLE_PTHREAD_GETATTR_NP to the long, long list of ignored symbols for the Py check.

Authored mainly by: Thomas Wouters
(cherry picked from commit 235d138)

… even on musl (pythonGH-161749)

Rewrite the pthread_getattr_np usage to avoid the problem on musl of it
reporting the stack limit of the main thread incorrectly. On platforms where
pthread_getattr_np underreports the main thread's stack size, use
RLIMIT_STACK for the main thread instead.

Add HAVE_UNRELIABLE_PTHREAD_GETATTR_NP to the long, long list of ignored
symbols for the Py check.

Authored mainly by: Thomas Wouters
(cherry picked from commit 235d138)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Thomas Wouters <thomas@python.org>
@hugovk

hugovk commented Nov 28, 2026

Copy link
Copy Markdown
Member Author

!buildbot Alpine

@bedevere-bot

Copy link
Copy Markdown

🤖 New build scheduled with the buildbot fleet by @hugovk for commit d8c6b68 🤖

Results will be shown at:

https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F162819%2Fmerge

The command will test the builders whose names match following regular expression: Alpine

The builders matched are:

  • AMD64 Alpine Linux NoGIL PR
  • AMD64 Alpine Linux PR

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants