[issue32307] Bad assumption on thread stack size makes python crash with musl libc

2021-10-04 Thread Gregory P. Smith
Gregory P. Smith added the comment: I left some comments on the PR. We can at least make it detect musl libc and improve its default behavior there. FWIW CPython's recursionlimit and the C stack have long been a thorn in the side of many things. Even when Python's thread_pthread.h is

[issue32307] Bad assumption on thread stack size makes python crash with musl libc

2021-10-04 Thread Gregory P. Smith
Change by Gregory P. Smith : -- nosy: +gregory.p.smith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue32307] Bad assumption on thread stack size makes python crash with musl libc

2021-10-01 Thread 4-launchpad-kalvdans-no-ip-org
Change by 4-launchpad-kalvdans-no-ip-org : -- nosy: +4-launchpad-kalvdans-no-ip-org ___ Python tracker ___ ___ Python-bugs-list

[issue32307] Bad assumption on thread stack size makes python crash with musl libc

2021-05-18 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch nosy: +python-dev nosy_count: 2.0 -> 3.0 pull_requests: +24841 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26224 ___ Python tracker

[issue32307] Bad assumption on thread stack size makes python crash with musl libc

2017-12-14 Thread Natanael Copa
Natanael Copa added the comment: Exactly same as previous patch, but refactored to only have a single pthread_attr_destroy() call instead of 3. diff --git a/Python/thread_pthread.h b/Python/thread_pthread.h index b7463c0ca6..1006a168fa 100644 ---

[issue32307] Bad assumption on thread stack size makes python crash with musl libc

2017-12-14 Thread R. David Murray
R. David Murray added the comment: I think we need people who do a lot of work at the C level to evaluate this, so I've added a couple to the nosy list :) -- nosy: +serhiy.storchaka, vstinner ___ Python tracker

[issue32307] Bad assumption on thread stack size makes python crash with musl libc

2017-12-14 Thread Natanael Copa
Natanael Copa added the comment: I suggest a runtime check like this: diff --git a/Python/thread_pthread.h b/Python/thread_pthread.h index b7463c0ca6..e9d0f638c9 100644 --- a/Python/thread_pthread.h +++ b/Python/thread_pthread.h @@ -34,6 +34,8 @@ #undef

[issue32307] Bad assumption on thread stack size makes python crash with musl libc

2017-12-14 Thread Natanael Copa
Natanael Copa added the comment: I ran a test of pthread_attr_getstacksize() on various systems. Here is what they return: Linux/glibc: 8388608 MacOS: 524288 FreeBSD 11.1: 0 (ulimit -s gives 524288) NetBSD 7.1: 4194304 OpenBSD 6.2: 524288 I could

[issue32307] Bad assumption on thread stack size makes python crash with musl libc

2017-12-14 Thread Natanael Copa
Natanael Copa added the comment: With "bad assumption" I mean that currently the code assumes that all unknown systems has big enough default thread stack size. This would not be a "bad assumption" if POSIX (or any other standard) would specify a requirement on the

[issue32307] Bad assumption on thread stack size makes python crash with musl libc

2017-12-13 Thread R. David Murray
R. David Murray added the comment: Well, from our point of view it isn't a bad assumption, it's that muslc needs to be added to the list of exceptions. (I know almost nothing about this...I assume there is some reason we can't determine the stack size programatically?)

[issue32307] Bad assumption on thread stack size makes python crash with musl libc

2017-12-13 Thread Natanael Copa
New submission from Natanael Copa : Python assumes that the system default thread stack size is big enough for python, except for OSX and FreeBSD where stack size is explicitly set. With musl libc the system thread stack size is only 80k, which leads to hard crash