-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
[3.13.0rc1][greenlet] _PyFrame_GetCode: Assertion `PyCode_Check(f->f_executable)' failed (regression from 3.13.0b4) #122772
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
Comments
Can you please try to reproduce it without using |
Is there any chance that #122735 has also fixed that? |
Thanks for the suggestion, but It did not help this specific case, unfortunately; as you can see in the report, I also tried with the then-current top of the 3.13 branch, which was |
If I manage to do so, I will update the issue here, but so far I have only encountered the issue with the greenlet lib, from their test suite we run as part of some CI testing. |
If I remove the |
Yeah, that leaks the local variables from every frame. Although, considering that's the "fix," could this be a reference counting problem from Greenlet's end? |
Yeah, that would be a good candidate for the issue here. I will try to do some investigation on that front. |
I'll be happy to take a look too, if you can find what (C) function in Greenlet is segfaulting. |
After installing a 3.13 port of |
Ah, Valgrind did pick something up. I'm guessing the bug is here, |
Is there a backtrace at the crash site? The PR was meant to convert the behavior of |
I failed to reproduce the issue on 3.13 and main branches. How did you configure and build Python? |
I just used what was available in Fedora rawhide at the time. They have updated the 3.13rc1 build to have the fix in #122735, but you can still reproduce the issue e.g. if you use a rawhide container for quick testing -- you can get the image here, if you wish to test it: As @ZeroIntensity mentioned yesterday (and you just did also) that he was unable to reproduce it with the linked greenlet PR (which seems to be from you; and the Fedora build includes it already) [1], I ended up rebuilding greenlet for testing and then the issue was gone... I opened this downstream issue earlier today: https://bugzilla.redhat.com/show_bug.cgi?id=2303832 [1] https://src.fedoraproject.org/rpms/python-greenlet/blob/rawhide/f/python-greenlet.spec#_24 |
Can you still reproduce the issue or not? If not, I suggest to close the issue. |
I cannot. It seems it was "fixed" by a rebuild. I am closing this. Thanks everyone for the help. |
Crash report
What happened?
File
test_oops.py
(based on a test from greenlet project that was observed to crash)Run the above code with
python3 -m unittest test_oops
:Just tested with the current top of the 3.13 branch (
5c161cb8329c941aa219dc34c56afa368516d6fb
):This is an intermittent crash, so it may not crash every single time, but if you run it in a loop, e.g. 10 times, it will likely crash in some of those.
This appears to be a regression observed from
3.13.0b4
, and a bisect between3.13.0b4
and3.13.0rc1
identified233ed46e6d2ba1d1f7d83a72ccf9aad9e628ede1
as the first bad commit (please double check):Please let me know if I can provide any additional info.
CPython versions tested on:
3.12
Operating systems tested on:
Linux
Output from running 'python -VV' on the command line:
Python 3.13.0rc1 (main, Aug 1 2024, 00:00:00) [GCC 14.1.1 20240701 (Red Hat 14.1.1-7)]
The text was updated successfully, but these errors were encountered: