-
-
Notifications
You must be signed in to change notification settings - Fork 30.9k
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
PyFrame_GetBack
segfaults if called in a sys.settrace
hook on 3.11.1
#100536
Comments
PyFrame_GetBack
segfaults if called in a sys.settrace
hook on 3.11
PyFrame_GetBack
segfaults if called in a sys.settrace
hook on 3.11.1
I can take a look when I am back from holidays. |
From the stack trace, this looks like another ownership problem. |
Meanwhile, could your refine the reproducer so it doesn't use spacy? If is too hard don't worry, we will manage :) |
This looks like the same bug as #99110 . The seg. fault is tripping over an uninitialized variable. The PR's have been merged. |
The only idea that comes to my mind is to call some random Cython functions around to see what happens but could not find time to do it, yet.
I could not test this as I could not install |
maybe some from explosion (the company behind spacy) can help https://mastodon.green/@lsmith/109591644106783822 |
Ok I have verified this issue is fixed by #99110 just as @byllyfish suggested. I have used the test code in #100182 to reproduce the problem without spacy and then see I have also verified the original |
Based on 57e727a I therefore assume it will also be fixed in 3.11.2 to be released in February 2023, correct? https://peps.python.org/pep-0664/ |
Correct I am closing this issue as the problem seems to be fixed in main and #99110 has been backported to 3.11 |
Backport here: #100478 |
Crash report
When
PyFrame_GetBack
is called during asys.settrace
hook in a C extension, it segfaults for some libraries(spacy
)Following is a reproducer: https://gist.github.com/sumerc/b254f38c5a620b8d47aba7398b3c7791.
Error messages
Enter any relevant error message caused by the crash, including a core dump if there is one.
A gdb stack trace: (for more information: the last frame executed was
<frame at 0x7fffd25b2d40, file 'thinc/backends/numpy_ops.pyx', line 1, code __Pyx_PyMODINIT_FUNC PyInit_numpy_ops(void)>
) I also have another application that crashes at the same point but with a different frame:<frame at 0x7ff6568e4520, file 'stringsource', line 282, code __init__>
. The interesting part is both are Cython functions. Might there be something related with Cython?Your environment
I have reproduced same error for Python
3.11.0rc1
onUbuntu 18.04
/x86/64
and a Mac M1. (The same code runs fine on3.9
)Update: Reproduced the segfault with
3.11.1
final release, too.@pablogsal, Any idea?
The text was updated successfully, but these errors were encountered: