* [ruby-dev:52116] [Ruby master Bug#20767] VM_ASSERT fails on clear_method_entry_by_id_in_class() under a specific situation
@ 2024-09-28 7:05 tagomoris (Satoshi Tagomori) via ruby-dev
2024-09-30 5:49 ` [ruby-dev:52117] " nobu (Nobuyoshi Nakada) via ruby-dev
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: tagomoris (Satoshi Tagomori) via ruby-dev @ 2024-09-28 7:05 UTC (permalink / raw)
To: ruby-dev; +Cc: tagomoris (Satoshi Tagomori)
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=11715
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/
_______________________________________________
ruby-dev mailing list -- ruby-dev@ml.ruby-lang.org
To unsubscribe send an email to ruby-dev-leave@ml.ruby-lang.org
^ permalink raw reply [flat|nested] 4+ messages in thread
* [ruby-dev:52117] [Ruby master Bug#20767] VM_ASSERT fails on clear_method_entry_by_id_in_class() under a specific situation
2024-09-28 7:05 [ruby-dev:52116] [Ruby master Bug#20767] VM_ASSERT fails on clear_method_entry_by_id_in_class() under a specific situation tagomoris (Satoshi Tagomori) via ruby-dev
@ 2024-09-30 5:49 ` nobu (Nobuyoshi Nakada) via ruby-dev
2024-10-22 23:02 ` [ruby-dev:52118] " alanwu (Alan Wu) via ruby-dev
2024-10-29 23:25 ` [ruby-dev:52119] " alanwu (Alan Wu) via ruby-dev
2 siblings, 0 replies; 4+ messages in thread
From: nobu (Nobuyoshi Nakada) via ruby-dev @ 2024-09-30 5:49 UTC (permalink / raw)
To: ruby-dev; +Cc: nobu (Nobuyoshi Nakada)
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=11715
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/
_______________________________________________
ruby-dev mailing list -- ruby-dev@ml.ruby-lang.org
To unsubscribe send an email to ruby-dev-leave@ml.ruby-lang.org
^ permalink raw reply [flat|nested] 4+ messages in thread
* [ruby-dev:52118] [Ruby master Bug#20767] VM_ASSERT fails on clear_method_entry_by_id_in_class() under a specific situation
2024-09-28 7:05 [ruby-dev:52116] [Ruby master Bug#20767] VM_ASSERT fails on clear_method_entry_by_id_in_class() under a specific situation tagomoris (Satoshi Tagomori) via ruby-dev
2024-09-30 5:49 ` [ruby-dev:52117] " nobu (Nobuyoshi Nakada) via ruby-dev
@ 2024-10-22 23:02 ` alanwu (Alan Wu) via ruby-dev
2024-10-29 23:25 ` [ruby-dev:52119] " alanwu (Alan Wu) via ruby-dev
2 siblings, 0 replies; 4+ messages in thread
From: alanwu (Alan Wu) via ruby-dev @ 2024-10-22 23:02 UTC (permalink / raw)
To: ruby-dev; +Cc: alanwu (Alan Wu)
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=11715
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/
_______________________________________________
ruby-dev mailing list -- ruby-dev@ml.ruby-lang.org
To unsubscribe send an email to ruby-dev-leave@ml.ruby-lang.org
^ permalink raw reply [flat|nested] 4+ messages in thread
* [ruby-dev:52119] [Ruby master Bug#20767] VM_ASSERT fails on clear_method_entry_by_id_in_class() under a specific situation
2024-09-28 7:05 [ruby-dev:52116] [Ruby master Bug#20767] VM_ASSERT fails on clear_method_entry_by_id_in_class() under a specific situation tagomoris (Satoshi Tagomori) via ruby-dev
2024-09-30 5:49 ` [ruby-dev:52117] " nobu (Nobuyoshi Nakada) via ruby-dev
2024-10-22 23:02 ` [ruby-dev:52118] " alanwu (Alan Wu) via ruby-dev
@ 2024-10-29 23:25 ` alanwu (Alan Wu) via ruby-dev
2 siblings, 0 replies; 4+ messages in thread
From: alanwu (Alan Wu) via ruby-dev @ 2024-10-29 23:25 UTC (permalink / raw)
To: ruby-dev; +Cc: alanwu (Alan Wu)
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=11715
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/
_______________________________________________
ruby-dev mailing list -- ruby-dev@ml.ruby-lang.org
To unsubscribe send an email to ruby-dev-leave@ml.ruby-lang.org
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-10-29 23:26 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-09-28 7:05 [ruby-dev:52116] [Ruby master Bug#20767] VM_ASSERT fails on clear_method_entry_by_id_in_class() under a specific situation tagomoris (Satoshi Tagomori) via ruby-dev
2024-09-30 5:49 ` [ruby-dev:52117] " nobu (Nobuyoshi Nakada) via ruby-dev
2024-10-22 23:02 ` [ruby-dev:52118] " alanwu (Alan Wu) via ruby-dev
2024-10-29 23:25 ` [ruby-dev:52119] " alanwu (Alan Wu) via ruby-dev
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).