-
-
Notifications
You must be signed in to change notification settings - Fork 30k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test_recursion_limit in test_threading crashes with SIGSEGV on android #83033
Comments
Actually it is the script that is spawned by test_recursion_limit that crashes with SIGSEGV on android API 24. Lowering the recursion limit in the script from 1000 to 100 with sys.setrecursionlimit() fixes the problem. Here is the error: generic_x86_64:/data/local/tmp/python $ python -m test -v test_threading -m test_recursion_limit ====================================================================== Traceback (most recent call last):
File "/data/local/tmp/python/lib/python3.9/test/test_threading.py", line 1086, in test_recursion_limit
self.assertEqual(p.returncode, 0, "Unexpected error: " + stderr.decode())
AssertionError: -11 != 0 : Unexpected error: Ran 1 test in 0.148s FAILED (failures=1) == Tests result: FAILURE == 1 test failed: Total duration: 354 ms |
The crash occurs only on debug builds. See the FreeBSD related issue bpo-37906. |
Using test and try with _thread.stack_size(new_size), the pthread stack sizes must be set to the following minimums to prevent stack overflow and get a RecursionError:
The default stack size for the main thread does not need to be changed as test test_exceptions.ExceptionTests.testInfiniteRecursion is ok for both build types. PR 17337 sets the thread stack size to 8 Mb for debug builds on android platforms. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: