From: "yahonda (Yasuo Honda) via ruby-core" Date: 2026-09-30T17:26:12+00:00 Subject: [ruby-core:126896] [Ruby Bug#22398] `alias_method` over a bmethod fails `rb_vm_check_ints` assertion after a Ractor has been created Issue #22398 has been reported by yahonda (Yasuo Honda). ---------------------------------------- Bug #22398: `alias_method` over a bmethod fails `rb_vm_check_ints` assertion after a Ractor has been created https://bugs.ruby-lang.org/issues/22398 * Author: yahonda (Yasuo Honda) * Status: Open * ruby -v: ruby 4.1.0dev (2026-09-30T11:53:44Z master dd7be7ce69) +PRISM [x86_64-linux] * Backport: 3.3: UNKNOWN, 3.4: UNKNOWN, 4.0: UNKNOWN ---------------------------------------- This issue is originally found at the Rails nightly CI with a debug build of Ruby. It started failing at https://buildkite.com/rails/rails-nightly/builds/4738#01a0ac05-212c-406d-bec7-190726eecc98 with ruby 4.1.0dev (2026-09-16T14:21:47Z master f2f53ccbe3). The full log of the first failure is attached. ### Steps to reproduce 1. Build ruby with `-DRUBY_DEBUG=1` enabled like ``` #!/bin/bash cd ${HOME}/src/github.com/ruby/ruby make clean make distclean make realclean ./autogen.sh ./configure --prefix="${HOME}/.local/share/mise/installs/ruby/trunk" cppflags="-DENABLE_PATH_CHECK=0 -DRUBY_DEBUG=1" --disable-install-doc make -j"$(getconf _NPROCESSORS_ONLN)" make install ``` 2. Run this one liner ``` ruby -ve 'Ractor.new {}.join; o = Object.new; o.define_singleton_method(:a) { 1 }; o.define_singleton_method(:b) { 2 }; o.singleton_class.alias_method :a, :b' ``` ### Expected behavior It should pass. It passes without `Ractor.new {}.join`. ### Actual behavior It aborts with an assertion failure. ``` $ ruby -ve 'Ractor.new {}.join; o = Object.new; o.define_singleton_method(:a) { 1 }; o.define_singleton_method(:b) { 2 }; o.singleton_class.alias_method :a, :b' ruby 4.1.0dev (2026-09-30T11:53:44Z master dd7be7ce69) +PRISM [x86_64-linux] -e:1: warning: Ractor API is experimental and may change in future versions of Ruby. vm_core.h:2369: Assertion Failed: rb_vm_check_ints:ec->assert_critical_section_entered == 0 ... ``` ### Additional information This assertion was added in https://github.com/ruby/ruby/commit/a00df45480811a8909dca288f24950b5134d46b5 ---Files-------------------------------- rails-nightly_build_4738_activesupport-master-debug.log.zip (156 KB) -- https://bugs.ruby-lang.org/ ______________________________________________ ruby-core mailing list -- ruby-core@ml.ruby-lang.org To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/