Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 33.9k
Description
Crash report
What happened?
In the pylint / astroid test suite we have a regression test for a common recursion issue on our end. Though the code triggers a deep recursion, so far CPython was still able to resolve it. While getting ready for 3.14, I noticed that a specific test started to crash Python but only on MacOS. Isolated Github action CI runs seem to confirm this, Ubuntu, Windows are completely fine both with 3.13.6 and 3.14.0rc1. However MacOS only passes with 3.13.6 while failing 3.14.0rc1. Noticeable 3.14.0a6 seems to be the last version which reliably still succeeded.
The releases have been downloaded from python.org; used the actions/setup-python action for tests in CI.
To bisect the issue further, I compiled 3.14.0rc1 on my Mac. Strangely though the test now passes, on the same system where the binary from python.org failed previously.
Local tests done with
- MacOS 14 on M2 Pro
Python 3.14.0rc1 (v3.14.0rc1:48f88310044, Jul 22 2025, 13:06:29) [Clang 16.0.0 (clang-1600.0.26.6)]from https://www.python.org/downloads/release/python-3140rc1/ => test failsPython 3.14.0rc1 (tags/v3.14.0rc1:48f88310044, Aug 9 2025, 00:54:21) [Clang 16.0.6 ]compiled manually => test succeeds
CC=/opt/homebrew/opt/llvm@16/bin/clang ./configure --with-openssl=$(brew --prefix openssl@3) --enable-optimizations --with-lto make -j4 -sRun the test case
git clone --depth 1 --branch v4.0.0b2 https://github.com/pylint-dev/astroid.git cd astroid python -m venv venv source venv/bin/activate pip install pytest==8.4.1 . pytest tests/test_inference.py::test_recursion_on_inference_tipOutput with 3.14.0rc1 from python.org
(venv) MyMacBook-Pro:astroid $ pytest-stests/test_inference.py::test_recursion_on_inference_tip==============================testsessionstarts===================================platformdarwin--Python3.14.0rc1, pytest-8.4.1, pluggy-1.6.0rootdir: /.../astroidconfigfile: pyproject.tomlcollected1itemtests/test_inference.pyFatalPythonerror: _Py_CheckRecursiveCall: Unrecoverablestackoverflow (used3953kB) Pythonruntimestate: initializedCurrentthread0x00000001dc071ec0 (mostrecentcallfirst): File"/.../astroid/astroid/decorators.py", line81ininnerFile"/.../astroid/astroid/nodes/node_classes.py", line451in_infer ... File"/.../astroid/astroid/decorators.py", line44inwrappedFile"/.../astroid/astroid/decorators.py", line81ininnerAborttrap: 6Output with 3.14.0rc1 compiled locally
tests/test_inference.py::test_recursion_on_inference_tipPASSED--
I'd be grateful about any pointers to things I'm doing "wrong" in my local build that prevent me from reproducing and bisecting the issue.
CPython versions tested on:
3.14
Operating systems tested on:
macOS
Output from running 'python -VV' on the command line:
Python 3.14.0rc1 (v3.14.0rc1:48f88310044, Jul 22 2025, 13:06:29) [Clang 16.0.0 (clang-1600.0.26.6)]
Linked PRs
- GH-137573: Check C stack depth before stack allocating JIT optimizer struct #137676
- GH-137573: Add test to check that the margin used for overflow protection is larger than the stack space used by the interpreter #137724
- GH-137573: mark _PyOptimizer_Optimize as no inline #137731
- [3.14] GH-137573: mark _PyOptimizer_Optimize as no inline (GH-137731) #137751
- [3.14] GH-137573: Add test to check that the margin used for overflow protection is larger than the stack space used by the interpreter (GH-137724) #139295
Metadata
Metadata
Assignees
Labels
Projects
Status