-
-
Notifications
You must be signed in to change notification settings - Fork 30.4k
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
Crashes and errors in test_embed with PYTHONUOPS=1 #111339
Comments
It's intermittent, and it seems like it's manifesting itself as refleaks and prematurely freed interned strings. My hunch is that the linked list is broken somehow, but I've combed through it a bunch of times and haven't found anything wrong. Weirdly, I've found that I can't reproduce anymore after commenting out the |
If you look at the |
Using the VS Code C debugger on macOS to run It always happens on the second invocation of |
It also goes away for me if I replace |
I have tried a variety of things, but so far I can't make a dent in the problem. The last thing I've uncovered is that If I comment out the
If I keep
Printing it before the second
Hopefully @markshannon can take up the baton. |
Oh, that points to a new idea. The Clearly something ought to clear the |
From gh-111350 (which fixes the crash in this specific case):
@markshannon, it sounds like you may have insight into the underlying problem. More info would be valuable. |
I don't know about the true underlying problem, but I have a hunch that it's easy to repro (e.g. in
(Function names may differ from actual API, I've not looked it up.) The problem appears that the static type's It's quite possible that something needs to clear the |
@markshannon and I think we found the issue this morning. It looks like we need to add our types to I'm working on a PR now. |
Great sleuthing (as they say). I figured there was something like that, but I couldn't find it -- that's why I asked for Eric's help. |
@savannahostrowski is going to work on the fix. If anybody's blocked on this, please let me know. |
I think I hit this while wanting to use Fedora's
Is there a useable workaround to avoid the assert (while still using a debug build of Python3.12) or do I have to wait for Python3.13 with the fixes?
|
I did one more check, it really looks like this issue (#111339 (comment))
While trying to understand this further, I realized there is probably no way to avoid the assert, baring some crazy LD_PRELOAD tricks, possibly. Looks like I'd need a debug build of Python (to get clean asan bill) with asserts disabled (so as not to crash on this). |
For a detailed report see #110384 (comment) (a comment by @brandtbucher on a merged PR by @markshannon ).
I am keeping notes about what I'm learning about this (though Mark said it's his).
The issue seems intermittent. I can repro it by running this command repeatedly on my Mac:
Usually it passes (printing 5 lines of output); occasionally I get this error:
I can only repro this with PYTHONUOPS=1, but it never prints any uops debug output. Could it be that the issue is in the code for checking the env var?Linked PRs
valid
property of executors tois_valid()
method #111350object.c
#111430The text was updated successfully, but these errors were encountered: