-
-
Notifications
You must be signed in to change notification settings - Fork 30.7k
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
3.12: Python/bytecodes.c:2995: _PyEval_EvalFrameDefault: Assertion method != NULL failed` in boto3 test suite #108487
Comments
Oh, and my first suspicion was that pytest is doing something funny because both test files have the same filename but renaming one of them didn't change anything. |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
Ok, I think that's how far as I can get it.
class CoreSession:
search_paths = []
from unittest import mock
import repro_core
def Session():
session = repro_core.CoreSession()
session.search_paths.append(1)
Session()
Session()
bc_session_patch = mock.patch('repro_core.CoreSession')
bc_session_patch.start()
Session() |
Python/bytecodes.c:2995: _PyEval_EvalFrameDefault: Assertion
method != NULL' failed` in boto3 test suite
I've been able to bisect this to 616aec1:
CC @gvanrossum |
Thanks for the report. Will try to figure out where we are going wrong. Hopefully it’s not too dramatic. |
Let’s call it a release blocker at least until I’ve had time to look into it more. |
The failing assert shouldn't exist -- this condition should result in a deoptimization, and will, two lines below. I will prepare PRs for main and 3.12 later. |
Thanks a lot for the prompt reply! |
* Remove assert that should've been DEOPT_IF The assert(method != NULL) in CALL_NO_KW_LIST_APPEND is wrong -- this condition should lead to a deoptimization, and indeed there is a DEOPT_IF two lines later that will trigger if method == NULL. This would crash in a devious repro scenario (first seen live in boto3 tests) when compiled with assertions enabled. In a production version there is no crash, so impact is limited. (The crash also appears in main; I will prepare a separate PR.) * Add back a different assert(self != NULL) * 📜🤖 Added by blurb_it. --------- Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Crash report
CPython versions tested on:
3.12
Operating systems tested on:
Linux
Output from running 'python -VV' on the command line:
Python 3.12.0rc1+ (heads/3.12:09487a202f, Aug 25 2023, 15:57:40) [GCC 13.2.0]
What happened?
When CPython 3.12 is built with assertions enabled, the boto3 test suite crashes in
tests/unit/test_session.py
if it is run after a test fromtests/functional/test_session.py
. I can only reproduce this with Python 3.12, and I've tested as far as back as to 3.12.0b4. Pythons 3.11 and 3.10 work fine.My reproducer so far:
Error messages
pytest output
gdb backtrace
Linked PRs
The text was updated successfully, but these errors were encountered: