Open
Description
Crash report
What happened?
Hello,
In the CI of cloudpickle
, we encountered a crash of the python interpreter due to a stack overflow with python3.14.0a6
.
Reverting to python3.14.0a5
fixes the error.
This might be related to GH-130398, with a bad detection of the limit of the stack?
I could not test it locally as I don't own a mac.
class A:
def __getattribute__(self, name):
return getattr(self, name)
a = A()
print("Testing Recursion Limit")
try:
a.test
except RecursionError:
print("Recursion Limit ok")
Output with python3.14.0a5
:
Testing Recursion Limit
Recursion Limit ok
Output with python3.14.0a6
:
Fatal Python error: _Py_CheckRecursiveCall: Unrecoverable stack overflow (used 3923 kB)
Python runtime state: initialized
Current thread 0x00000001f839cf80 (most recent call first):
File "/Users/runner/work/cloudpickle/cloudpickle/test_recursion_error.py", line 3 in __getattribute__
File "/Users/runner/work/cloudpickle/cloudpickle/test_recursion_error.py", line 3 in __getattribute__
File "/Users/runner/work/cloudpickle/cloudpickle/test_recursion_error.py", line 3 in __getattribute__
....
CPython versions tested on:
3.14
Operating systems tested on:
macOS
Output from running 'python -VV' on the command line:
No response
Metadata
Metadata
Assignees
Labels
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
StanFromIreland commentedon Mar 21, 2025
Unable to reproduce with
python3.14.0a6
on Linux.encukou commentedon Mar 21, 2025
Hi,
Are the logs from that cloudpickle CI run public?
tomMoral commentedon Mar 21, 2025
I was unable to reproduce locally with linux either.
The outputs for both runs with cloudpickle CI are linked in the issue description (sorry it is not super explicit indeed)
[-]Unrecoverable stack overflow with infinite recursion on OSX[/-][+]Unrecoverable stack overflow with infinite recursion on macOS[/+]ned-deily commentedon Mar 22, 2025
I can reproduce the crash using any of the python.org macOS Python 3.14 alphas, as well as the latest python.org and MacPorts-supplied Python 3.13(.2) and 3.12(.9) - I didn't try any earlier versions of them.It might be an issue with release vs debug builds and there certainly have been many instances in the past of different stack limits on different platforms, especially on macOS.tomMoral commentedon Mar 22, 2025
Hello,
In the reported case, it does not happen with
3.14.0a5
on the same platform, so I don't know if it is linked to how it is built (I'm guessing both builds have a similar process).The exact build from the logs:
3.14.0a5 (working): Download from "https://github.com/actions/python-versions/releases/download/3.14.0-alpha.5-13438582588/python-3.14.0-alpha.5-darwin-arm64.tar.gz"
3.14.0a6 (failing): Download from "https://github.com/actions/python-versions/releases/download/3.14.0-alpha.6-13890321974/python-3.14.0-alpha.6-darwin-arm64.tar.gz"
ned-deily commentedon Mar 22, 2025
My apologies! I somehow totally misread your report. Contrary to what I originally wrote, I cannot reproduce the failure with any of those python.org macOS installers, including 3.14.0a5 and a6. I see that the
actions/python-versions
repo claims to repackage the python.org installers for macOS but I have no insight into how they might do that or what differences Github CI runners might present that might be a factor here. All I can say is that we have our own Github CI jobs for both Intel and Apple Silicon (ARM). And our python.org release installers are tested on a variety of real machines and VMs of both architectures with various macOS versions but not on a Github runner itself.ronaldoussoren commentedon Mar 23, 2025
FWIW: The reproducer in the initial message crashes for me with Python 3.14a6, but only for arm64 and not x86_64 (e.g. fatal error with
arch -arm64 python3.14 repro.py
and no issue witharch -x86_64 python3.14 repro.py
). This is with the python.org installer.