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
Crash when tracing specialized normal class call at deep Python recursion #108390
Comments
It seems like the instrumentation system is trying to instrument The shim frame should be inserted without tracing, but because of the recursion limit is hit, it seems like the shim frame(I might be wrong here, but some frame) generated a max recursion error and triggered the instrumentation system to do an instrumentation on all code objects on the frame stack - which caused the error I mentioned above. There might be a structural fix for this issue on the specialization part, but if more "read-only" code objects would be added in the future for optimization, maybe it's worth it to have some flag on it ( |
We can't mark code objects as read-only, because the PEP states that any code object can be instrumented. So, it looks like we need to do the following:
|
…ing.set_local_events()` (pythonGH-108420)
…ing.set_local_events()` (pythonGH-108420)
…ing.set_local_events()` (pythonGH-108420)
Fixed |
Crash report
CPython versions tested on:
CPython main branch
Operating systems tested on:
Linux
Output from running 'python -VV' on the command line:
Python 3.13.0a0 (heads/main:29bc6165ab, Aug 23 2023, 18:18:02) [GCC 10.2.1 20210110]
What happened?
Bisected to 04492cb.
Error messages
Linked PRs
sys.monitoring.set_local_events()
#108420sys.monitoring.set_local_events()
(GH-108420) #108899The text was updated successfully, but these errors were encountered: