Skip to content

test_opcache fails with a --forever argument #122320

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

Closed
Eclips4 opened this issue Jul 26, 2024 · 1 comment
Closed

test_opcache fails with a --forever argument #122320

Eclips4 opened this issue Jul 26, 2024 · 1 comment
Labels
3.13 bugs and security fixes 3.14 new features, bugs and security fixes tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error

Comments

@Eclips4
Copy link
Member

Eclips4 commented Jul 26, 2024

Bug report

Bug description:

./python -m test -v test_opcache --forever
...many lines
0:00:20 load avg: 12.49 [ 16] test_opcache
test_too_many_defaults_0 (test.test_opcache.TestCallCache.test_too_many_defaults_0) ... ok
test_too_many_defaults_1 (test.test_opcache.TestCallCache.test_too_many_defaults_1) ... ok
test_too_many_defaults_2 (test.test_opcache.TestCallCache.test_too_many_defaults_2) ... ok
test_dict_dematerialization (test.test_opcache.TestInstanceDict.test_dict_dematerialization) ... ok
test_dict_dematerialization_copy (test.test_opcache.TestInstanceDict.test_dict_dematerialization_copy) ... ok
test_dict_dematerialization_multiple_refs (test.test_opcache.TestInstanceDict.test_dict_dematerialization_multiple_refs) ... ok
test_dict_dematerialization_pickle (test.test_opcache.TestInstanceDict.test_dict_dematerialization_pickle) ... ok
test_dict_dematerialization_subclass (test.test_opcache.TestInstanceDict.test_dict_dematerialization_subclass) ... ok
test_dict_materialization (test.test_opcache.TestInstanceDict.test_dict_materialization) ... ok
test_values_on_instance (test.test_opcache.TestInstanceDict.test_values_on_instance) ... ok
test_descriptor_added_after_optimization (test.test_opcache.TestLoadAttrCache.test_descriptor_added_after_optimization) ... ok
test_load_borrowed_slot_should_not_crash (test.test_opcache.TestLoadAttrCache.test_load_borrowed_slot_should_not_crash) ... ok
test_load_shadowing_slot_should_raise_type_error (test.test_opcache.TestLoadAttrCache.test_load_shadowing_slot_should_raise_type_error) ... ok
test_metaclass_del_descriptor_after_optimization (test.test_opcache.TestLoadAttrCache.test_metaclass_del_descriptor_after_optimization) ... ok
test_metaclass_descriptor_added_after_optimization (test.test_opcache.TestLoadAttrCache.test_metaclass_descriptor_added_after_optimization) ... ok
test_metaclass_descriptor_shadows_class_attribute (test.test_opcache.TestLoadAttrCache.test_metaclass_descriptor_shadows_class_attribute) ... ok
test_metaclass_getattribute (test.test_opcache.TestLoadAttrCache.test_metaclass_getattribute) ... ok
test_metaclass_set_descriptor_after_optimization (test.test_opcache.TestLoadAttrCache.test_metaclass_set_descriptor_after_optimization) ... ok
test_metaclass_swap (test.test_opcache.TestLoadAttrCache.test_metaclass_swap) ... ok
test_store_borrowed_slot_should_not_crash (test.test_opcache.TestLoadAttrCache.test_store_borrowed_slot_should_not_crash) ... ok
test_store_shadowing_slot_should_raise_type_error (test.test_opcache.TestLoadAttrCache.test_store_shadowing_slot_should_raise_type_error) ... ok
test_type_descriptor_shadows_attribute_getset (test.test_opcache.TestLoadAttrCache.test_type_descriptor_shadows_attribute_getset) ... ok
test_type_descriptor_shadows_attribute_member (test.test_opcache.TestLoadAttrCache.test_type_descriptor_shadows_attribute_member) ... ok
test_type_descriptor_shadows_attribute_method (test.test_opcache.TestLoadAttrCache.test_type_descriptor_shadows_attribute_method) ... ok
test_descriptor_added_after_optimization (test.test_opcache.TestLoadMethodCache.test_descriptor_added_after_optimization) ... ok
test_metaclass_del_descriptor_after_optimization (test.test_opcache.TestLoadMethodCache.test_metaclass_del_descriptor_after_optimization) ... ok
test_metaclass_descriptor_added_after_optimization (test.test_opcache.TestLoadMethodCache.test_metaclass_descriptor_added_after_optimization) ... ok
test_metaclass_descriptor_shadows_class_attribute (test.test_opcache.TestLoadMethodCache.test_metaclass_descriptor_shadows_class_attribute) ... ok
test_metaclass_getattribute (test.test_opcache.TestLoadMethodCache.test_metaclass_getattribute) ... ok
test_metaclass_set_descriptor_after_optimization (test.test_opcache.TestLoadMethodCache.test_metaclass_set_descriptor_after_optimization) ... ok
test_metaclass_swap (test.test_opcache.TestLoadMethodCache.test_metaclass_swap) ... ok
test_type_descriptor_shadows_attribute_member (test.test_opcache.TestLoadMethodCache.test_type_descriptor_shadows_attribute_member) ... ok
test_type_descriptor_shadows_attribute_method (test.test_opcache.TestLoadMethodCache.test_type_descriptor_shadows_attribute_method) ... ok
test_descriptor_not_double_executed_on_spec_fail (test.test_opcache.TestLoadSuperAttrCache.test_descriptor_not_double_executed_on_spec_fail) ... ok
test_binary_subscr_getitem (test.test_opcache.TestRacesDoNotCrash.test_binary_subscr_getitem) ... ok
test_binary_subscr_list_int (test.test_opcache.TestRacesDoNotCrash.test_binary_subscr_list_int) ... ok
test_for_iter_gen (test.test_opcache.TestRacesDoNotCrash.test_for_iter_gen) ... ok
test_for_iter_list (test.test_opcache.TestRacesDoNotCrash.test_for_iter_list) ... ok
test_load_attr_class (test.test_opcache.TestRacesDoNotCrash.test_load_attr_class) ... ok
test_load_attr_getattribute_overridden (test.test_opcache.TestRacesDoNotCrash.test_load_attr_getattribute_overridden) ... ok
test_load_attr_instance_value (test.test_opcache.TestRacesDoNotCrash.test_load_attr_instance_value) ... ok
test_load_attr_method_lazy_dict (test.test_opcache.TestRacesDoNotCrash.test_load_attr_method_lazy_dict) ... ok
test_load_attr_method_no_dict (test.test_opcache.TestRacesDoNotCrash.test_load_attr_method_no_dict) ... ok
test_load_attr_method_with_values (test.test_opcache.TestRacesDoNotCrash.test_load_attr_method_with_values) ... ok
test_load_attr_module (test.test_opcache.TestRacesDoNotCrash.test_load_attr_module) ... ok
test_load_attr_property (test.test_opcache.TestRacesDoNotCrash.test_load_attr_property) ... ok
test_load_attr_with_hint (test.test_opcache.TestRacesDoNotCrash.test_load_attr_with_hint) ... ok
test_load_global_module (test.test_opcache.TestRacesDoNotCrash.test_load_global_module) ... FAIL

======================================================================
FAIL: test_load_global_module (test.test_opcache.TestRacesDoNotCrash.test_load_global_module)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/eclips4/programming-languages/cpython/Lib/test/test_opcache.py", line 928, in test_load_global_module
    self.assert_races_do_not_crash(
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        opname, get_items, read, write, check_items=True
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/home/eclips4/programming-languages/cpython/Lib/test/test_opcache.py", line 20, in wrapper
    return func(*args, **kwargs)
  File "/home/eclips4/programming-languages/cpython/Lib/test/test_opcache.py", line 544, in assert_races_do_not_crash
    self.assert_specialized(item, opname)
    ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^
  File "/home/eclips4/programming-languages/cpython/Lib/test/test_opcache.py", line 524, in assert_specialized
    self.assertIn(opname, opnames)
    ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
AssertionError: 'LOAD_GLOBAL_MODULE' not found in {'RETURN_VALUE', 'RESUME_CHECK', 'LOAD_GLOBAL'}

----------------------------------------------------------------------
Ran 48 tests in 0.914s

FAILED (failures=1)
test test_opcache failed

== Tests result: FAILURE ==

1 test failed:
    test_opcache

15 tests OK.

Total duration: 21.9 sec
Total tests: run=828 failures=1
Total test files: run=16 failed=1
Result: FAILURE

CPython versions tested on:

CPython main branch

Operating systems tested on:

Linux

Linked PRs

@Eclips4 Eclips4 added type-bug An unexpected behavior, bug, or error tests Tests in the Lib/test dir labels Jul 26, 2024
@Eclips4 Eclips4 added 3.13 bugs and security fixes 3.14 new features, bugs and security fixes labels Jul 26, 2024
nascheme added a commit to nascheme/cpython that referenced this issue Apr 25, 2025
nascheme added a commit to nascheme/cpython that referenced this issue Apr 27, 2025
nascheme added a commit to nascheme/cpython that referenced this issue Apr 28, 2025
nascheme added a commit that referenced this issue Apr 28, 2025
The `test_load_global_module()` test consumes a lot of dict key versions.
Skip the test if we have consumed half of the available versions that can be
used for the "load global" cache.
@Eclips4
Copy link
Member Author

Eclips4 commented Apr 30, 2025

Fixed by #132961

@Eclips4 Eclips4 closed this as completed Apr 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.13 bugs and security fixes 3.14 new features, bugs and security fixes tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

1 participant