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 — Broken stack size detection on Android · Issue #159320 · python/cpython

Broken stack size detection on Android #159320

New issue
Copy link
New issue
Copy link
Open
Open
Broken stack size detection on Android#159320
Copy link
Assignees
Yhg1s
Labels
OS-androidinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

@Yhg1s
Yhg1s
opened on Oct 13, 2026
Issue body actions

Bug report

As part of investigating a test failure on #159289 on Android, I noticed the stack size detection with pthread_getatttr_np is (seemingly unintentionally) disabled on Android, because it's Linux and not glibc and so Python/ceval.c:145 assumes it's musl. Investigating the claim that musl's pthread_getattr_np doesn't work right (added in #134336) a little further it seems that it's only a problem for the main thread, not for subsequent threads. We can probably fix the code to work right on musl, although it sure would be nice if we could reliably detect musl, given that it's functionally different in more than a few places.

I have a small PR fixing the test for Android, and I'm working on a bigger PR that tries to improve pthread_getattr_np handling on musl (and other platforms that give incorrect results).

CPython versions tested on:

CPython main branch

Operating systems tested on:

Linux

Linked PRs

  • gh-159320: Enable stack size detection on Android #159321
  • gh-159320: use pthread_getattr_np for stack limit checks even on musl #159376
  • [3.15] gh-159320: Enable stack size detection on Android (GH-159321) #159409
  • [3.14] gh-159320: Enable stack size detection on Android (GH-159321) #159410
  • gh-159320: use pthread_getattr_np for stack limit checks even on musl #161749

Activity

  1. Yhg1s
    self-assigned this
    on Oct 13, 2026
  2. Yhg1s
    added
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    on Oct 13, 2026
  3. StanFromIreland
    added
    interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)
    OS-android
    on Oct 13, 2026
  4. Yhg1s
    added 3 commits that reference this issue on Oct 14, 2026

    gh-159320: Enable stack size detection on Android (#159321)

    8ff41c2

    [3.14] gh-159320: Enable stack size detection on Android (GH-159321) (#…

    a11d4cd

    [3.15] gh-159320: Enable stack size detection on Android (GH-159321) (#…

    b6d63f1
  5. kevinprimeraquecreo-stack
    added this to Project_VKon Oct 18, 2026
  6. github-project-automation
    moved this to Todo in Project_VKon Oct 18, 2026
  7. kevinprimeraquecreo-stack
    added this to Project_VKon Oct 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @Yhg1s
    Yhg1s

Labels

OS-androidinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-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.