Message350082
The crash start to occur with a Python callstack depth larger than 750. It doesn't crash with setrecursionlimit(750). See attached stack.py. Example:
vstinner@freebsd$ ./python stack.py 750 10240
setrecursionlimit(750)
stack_size: 10240.0 kiB = 10.0 MiB
end of main thread
It seems like calling _thread.stack_size(s) doesn't help:
vstinner@freebsd$ ./python stack.py 1000 10240
setrecursionlimit(1000)
stack_size: 10240.0 kiB = 10.0 MiB
Segmentation fault (core dumped)
--
I see different options:
* Reduce the Python recursion limit in the test
* Find a way to increase the default thread stack size on FreeBSD
* Skip the test on FreeBSD
On macOS, configure.ac uses a stack of 8 MiB:
# Issue #18075: the default maximum stack size (8MBytes) is too
# small for the default recursion limit. Increase the stack size
# to ensure that tests don't crash
# Note: This matches the value of THREAD_STACK_SIZE in
# thread_pthread.h
LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED" |
|
Date |
User |
Action |
Args |
2019-08-21 13:06:16 | vstinner | set | recipients:
+ vstinner |
2019-08-21 13:06:16 | vstinner | set | messageid: <1566392776.04.0.65915593541.issue37906@roundup.psfhosted.org> |
2019-08-21 13:06:16 | vstinner | link | issue37906 messages |
2019-08-21 13:06:15 | vstinner | create | |
|