[ruby-dev:52116] [Ruby master Bug#20767] VM_ASSERT fails on clear_method_entry_by_id_in_class() under a specific situation

Issue #20767 has been reported by tagomoris (Satoshi Tagomori). ---------------------------------------- Bug #20767: VM_ASSERT fails on clear_method_entry_by_id_in_class() under a specific situation https://bugs.ruby-lang.org/issues/20767 * Author: tagomoris (Satoshi Tagomori) * Status: Open * Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN ---------------------------------------- VM_ASSERT in `clear_method_entry_by_id_in_class()` (vm_method.c) fails when: * Kernel#require is refined * Kernel#require is replaced by `alias_method` and `define_method` * User code calls `require` * The aliased method entry is undefined Under this situation, `VM_ASSERT(cme->owner == T_CLASS)` fails in `clear_method_entry_by_id_in_class`. This CI failure shows it: https://github.com/ruby/ruby/actions/runs/11081754435/job/30793895707?pr=117... In this case, the cme had: * def->type: CFUNC * defined_class: Kernel * owner: Kernel I couldn't find the root cause of why Kernel is set on cme->owner, and why the owner is checked here. How should we fix this problem? * Just delete the VM_ASSERT() (because the cme is just to be invalidated) * Fix the root cause of the invalid&unexpected cme->owner -- https://bugs.ruby-lang.org/

Issue #20767 has been updated by nobu (Nobuyoshi Nakada). The test case: https://github.com/ruby/ruby/pull/11715 ---------------------------------------- Bug #20767: VM_ASSERT fails on clear_method_entry_by_id_in_class() under a specific situation https://bugs.ruby-lang.org/issues/20767#change-109965 * Author: tagomoris (Satoshi Tagomori) * Status: Open * ruby -v: ruby 3.4.0dev (2024-09-27T17:45:22Z vm_assertion_cme_o.. 027ef60500) +PRISM [arm64-darwin23] * Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN ---------------------------------------- VM_ASSERT in `clear_method_entry_by_id_in_class()` (vm_method.c) fails when: * Kernel#require is refined * Kernel#require is replaced by `alias_method` and `define_method` * User code calls `require` * The aliased method entry is undefined Under this situation, `VM_ASSERT(cme->owner == T_CLASS)` fails in `clear_method_entry_by_id_in_class`. This CI failure shows it: https://github.com/ruby/ruby/actions/runs/11081754435/job/30793895707?pr=117... In this case, the cme had: * def->type: CFUNC * defined_class: Kernel * owner: Kernel I couldn't find the root cause of why Kernel is set on cme->owner, and why the owner is checked here. How should we fix this problem? * Just delete the VM_ASSERT() (because the cme is just to be invalidated) * Fix the root cause of the invalid&unexpected cme->owner -- https://bugs.ruby-lang.org/

Issue #20767 has been updated by alanwu (Alan Wu). Status changed from Open to Closed commit:a838f980f599d95ccf344157f7074e997af31f48 should have fixed this issue. ---------------------------------------- Bug #20767: VM_ASSERT fails on clear_method_entry_by_id_in_class() under a specific situation https://bugs.ruby-lang.org/issues/20767#change-110215 * Author: tagomoris (Satoshi Tagomori) * Status: Closed * ruby -v: ruby 3.4.0dev (2024-09-27T17:45:22Z vm_assertion_cme_o.. 027ef60500) +PRISM [arm64-darwin23] * Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN ---------------------------------------- VM_ASSERT in `clear_method_entry_by_id_in_class()` (vm_method.c) fails when: * Kernel#require is refined * Kernel#require is replaced by `alias_method` and `define_method` * User code calls `require` * The aliased method entry is undefined Under this situation, `VM_ASSERT(cme->owner == T_CLASS)` fails in `clear_method_entry_by_id_in_class`. This CI failure shows it: https://github.com/ruby/ruby/actions/runs/11081754435/job/30793895707?pr=117... In this case, the cme had: * def->type: CFUNC * defined_class: Kernel * owner: Kernel I couldn't find the root cause of why Kernel is set on cme->owner, and why the owner is checked here. How should we fix this problem? * Just delete the VM_ASSERT() (because the cme is just to be invalidated) * Fix the root cause of the invalid&unexpected cme->owner -- https://bugs.ruby-lang.org/

Issue #20767 has been updated by alanwu (Alan Wu). Status changed from Closed to Open Reopening since the assert failed again on CI: http://ci.rvm.jp/logfiles/brlog.trunk-repeat20-asserts.20241029-211036#L2454 ---------------------------------------- Bug #20767: VM_ASSERT fails on clear_method_entry_by_id_in_class() under a specific situation https://bugs.ruby-lang.org/issues/20767#change-110290 * Author: tagomoris (Satoshi Tagomori) * Status: Open * ruby -v: ruby 3.4.0dev (2024-09-27T17:45:22Z vm_assertion_cme_o.. 027ef60500) +PRISM [arm64-darwin23] * Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN ---------------------------------------- VM_ASSERT in `clear_method_entry_by_id_in_class()` (vm_method.c) fails when: * Kernel#require is refined * Kernel#require is replaced by `alias_method` and `define_method` * User code calls `require` * The aliased method entry is undefined Under this situation, `VM_ASSERT(cme->owner == T_CLASS)` fails in `clear_method_entry_by_id_in_class`. This CI failure shows it: https://github.com/ruby/ruby/actions/runs/11081754435/job/30793895707?pr=117... In this case, the cme had: * def->type: CFUNC * defined_class: Kernel * owner: Kernel I couldn't find the root cause of why Kernel is set on cme->owner, and why the owner is checked here. How should we fix this problem? * Just delete the VM_ASSERT() (because the cme is just to be invalidated) * Fix the root cause of the invalid&unexpected cme->owner -- https://bugs.ruby-lang.org/

Issue #20767 has been updated by mame (Yusuke Endoh). Status changed from Open to Closed Maybe fixed by commit:783dde2159a3689ad2d3ef6b7d0005a7cf80adba ---------------------------------------- Bug #20767: VM_ASSERT fails on clear_method_entry_by_id_in_class() under a specific situation https://bugs.ruby-lang.org/issues/20767#change-110387 * Author: tagomoris (Satoshi Tagomori) * Status: Closed * ruby -v: ruby 3.4.0dev (2024-09-27T17:45:22Z vm_assertion_cme_o.. 027ef60500) +PRISM [arm64-darwin23] * Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN ---------------------------------------- VM_ASSERT in `clear_method_entry_by_id_in_class()` (vm_method.c) fails when: * Kernel#require is refined * Kernel#require is replaced by `alias_method` and `define_method` * User code calls `require` * The aliased method entry is undefined Under this situation, `VM_ASSERT(cme->owner == T_CLASS)` fails in `clear_method_entry_by_id_in_class`. This CI failure shows it: https://github.com/ruby/ruby/actions/runs/11081754435/job/30793895707?pr=117... In this case, the cme had: * def->type: CFUNC * defined_class: Kernel * owner: Kernel I couldn't find the root cause of why Kernel is set on cme->owner, and why the owner is checked here. How should we fix this problem? * Just delete the VM_ASSERT() (because the cme is just to be invalidated) * Fix the root cause of the invalid&unexpected cme->owner -- https://bugs.ruby-lang.org/
participants (4)
-
alanwu (Alan Wu)
-
mame (Yusuke Endoh)
-
nobu (Nobuyoshi Nakada)
-
tagomoris (Satoshi Tagomori)