Title: Broken stack size detection on Android · Issue #159320 · python/cpython · GitHub
Open Graph Title: Broken stack size detection on Android · Issue #159320 · python/cpython
X Title: Broken stack size detection on Android · Issue #159320 · python/cpython
Description: 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/ceva...
Open Graph Description: 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'...
X Description: 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&...
Opengraph URL: https://github.com/python/cpython/issues/159320
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Broken stack size detection on Android","articleBody":"### Bug report\n\nAs 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](github.com/python/cpython/blob/04862280a2ccbf9be9883eb4bce886f6b1bc4ca0/Python/ceval.c#L145-L149) 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.\n\nI 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).\n\n\n### CPython versions tested on:\n\nCPython main branch\n\n### Operating systems tested on:\n\nLinux\n\n\u003c!-- gh-linked-prs -->\n### Linked PRs\n* gh-159321\n* gh-159376\n* gh-159409\n* gh-159410\n* gh-161749\n\u003c!-- /gh-linked-prs -->\n","author":{"url":"https://github.com/Yhg1s","@type":"Person","name":"Yhg1s"},"datePublished":"2026-10-13T14:33:55Z","url":"https://github.com/python/cpython/issues/159320"}
| 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:59fa6ab7-8595-427b-1cef-584074cbdae5 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C8A4:2A7C1C:18B69B1:20A7073:6B020EC3 |
| html-safe-nonce | 2ff54fe0c6cd3db5e11cf35fb1c97cd4a9b5f64eac3edc81b8c1826bc7d41833 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDOEE0OjJBN0MxQzoxOEI2OUIxOjIwQTcwNzM6NkIwMjBFQzMiLCJ2aXNpdG9yX2lkIjoiMjgwMzEyODY1Njg0NTczNzY2NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 7a3752fd84a0146a8898a665d437f95e526e15a725c32ba35f6fed8d67e706bb |
| hovercard-subject-tag | issue:5832218341 |
| 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/159320/issue_layout |
| twitter:image | https://opengraph.githubassets.com/d539970897d848cb3b7762f7045f2d1d39f31c42837bfeaee0470993ff727f7a/python/cpython/issues/159320 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/d539970897d848cb3b7762f7045f2d1d39f31c42837bfeaee0470993ff727f7a/python/cpython/issues/159320 |
| og:image:alt | 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'... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Yhg1s |
| 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