gh-151546: Fix stack limits on musl#151548
Conversation
If the thread stack size is set by linker flags, pass the stack size to Python/ceval.c via the new _Py_LINKER_THREAD_STACK_SIZE variable to set Py_C_STACK_SIZE macro.
9a61d1c
into
python:main
Jun 17, 2026
|
Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.14, 3.15. |
Sorry, something went wrong.
|
Sorry, @vstinner, I could not cleanly backport this to |
Sorry, something went wrong.
|
Sorry, @vstinner, I could not cleanly backport this to |
Sorry, something went wrong.
⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️Hi! The buildbot aarch64 Android 3.x (tier-3) has failed when building commit 9a61d1c. What do you need to do:
You can take a look at the buildbot page here: https://buildbot.python.org/#/builders/1594/builds/5106 Failed tests:
Failed subtests:
Summary of the results of the build (if available): == Click to see traceback logsTraceback (most recent call last):
File "/data/user/0/org.python.testbed/files/python/lib/python3.16/urllib/request.py", line 1531, in ftp_open
host = socket.gethostbyname(host)
socket.gaierror: [Errno 7] No address associated with hostname
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/data/user/0/org.python.testbed/files/python/lib/python3.16/test/test_urllib2.py", line 815, in test_ftp_error
urlopen("ftp://www.pythontest.net/")
~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/data/user/0/org.python.testbed/files/python/lib/python3.16/urllib/request.py", line 489, in open
response = self._open(req, data)
File "/data/user/0/org.python.testbed/files/python/lib/python3.16/urllib/request.py", line 506, in _open
result = self._call_chain(self.handle_open, protocol, protocol +
'_open', req)
File "/data/user/0/org.python.testbed/files/python/lib/python3.16/urllib/request.py", line 466, in _call_chain
result = func(*args)
File "/data/user/0/org.python.testbed/files/python/lib/python3.16/urllib/request.py", line 1533, in ftp_open
raise URLError(msg)
urllib.error.URLError: <urlopen error [Errno 7] No address associated with hostname>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/data/user/0/org.python.testbed/files/python/lib/python3.16/test/test_urllib2.py", line 817, in test_ftp_error
self.assertEqual(raised.reason,
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
f"ftp error: {exception.args[0]}")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: gaierror(7, 'No address associated with hostname') != 'ftp error: 500 OOPS: cannot change directory:/nonexistent'
----------------------------------------------------------------------
Ran 81 tests in 0.384s
FAILED (failures=1, skipped=3)
Traceback (most recent call last):
File "/data/user/0/org.python.testbed/files/python/lib/python3.16/urllib/request.py", line 1531, in ftp_open
host = socket.gethostbyname(host)
socket.gaierror: [Errno 7] No address associated with hostname
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/data/user/0/org.python.testbed/files/python/lib/python3.16/test/test_urllib2.py", line 815, in test_ftp_error
urlopen("ftp://www.pythontest.net/")
~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/data/user/0/org.python.testbed/files/python/lib/python3.16/urllib/request.py", line 489, in open
response = self._open(req, data)
File "/data/user/0/org.python.testbed/files/python/lib/python3.16/urllib/request.py", line 506, in _open
result = self._call_chain(self.handle_open, protocol, protocol +
'_open', req)
File "/data/user/0/org.python.testbed/files/python/lib/python3.16/urllib/request.py", line 466, in _call_chain
result = func(*args)
File "/data/user/0/org.python.testbed/files/python/lib/python3.16/urllib/request.py", line 1533, in ftp_open
raise URLError(msg)
urllib.error.URLError: <urlopen error [Errno 7] No address associated with hostname>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/data/user/0/org.python.testbed/files/python/lib/python3.16/test/test_urllib2.py", line 817, in test_ftp_error
self.assertEqual(raised.reason,
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
f"ftp error: {exception.args[0]}")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: gaierror(7, 'No address associated with hostname') != 'ftp error: 500 OOPS: cannot change directory:/nonexistent'
----------------------------------------------------------------------
Ran 81 tests in 3.590s
FAILED (failures=1, skipped=3)
Traceback (most recent call last):
File "/data/user/0/org.python.testbed/files/python/lib/python3.16/test/test_urllibnet.py", line 107, in test_getcode
self.assertEqual(e.exception.code, 404)
^^^^^^^^^^^^^^^^
AttributeError: 'URLError' object has no attribute 'code'
----------------------------------------------------------------------
Ran 12 tests in 0.099s
FAILED (errors=1, skipped=10)
Traceback (most recent call last):
File "/data/user/0/org.python.testbed/files/python/lib/python3.16/test/test_urllibnet.py", line 107, in test_getcode
self.assertEqual(e.exception.code, 404)
^^^^^^^^^^^^^^^^
AttributeError: 'URLError' object has no attribute 'code'
----------------------------------------------------------------------
Ran 12 tests in 0.326s
FAILED (errors=1, skipped=10)
|
Sorry, something went wrong.
[3.15] gh-151546: Fix stack limits on musl (#151548) (#151583) gh-151546: Fix stack limits on musl (#151548) If the thread stack size is set by linker flags, pass the stack size to Python/ceval.c via the new _Py_LINKER_THREAD_STACK_SIZE variable to set Py_C_STACK_SIZE macro. (cherry picked from commit 9a61d1c) (cherry picked from commit a5c5edd)
If the thread stack size is set by linker flags, pass the stack size to Python/ceval.c via the new _Py_LINKER_THREAD_STACK_SIZE variable to set Py_C_STACK_SIZE macro.