[ruby-core:122932] [Ruby Bug#21534] ppc64le Ractor ractor_port_receive aborted (core dumped)

Issue #21534 has been reported by jaruga (Jun Aruga). ---------------------------------------- Bug #21534: ppc64le Ractor ractor_port_receive aborted (core dumped) https://bugs.ruby-lang.org/issues/21534 * Author: jaruga (Jun Aruga) * Status: Open * Backport: 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN ---------------------------------------- I am seeing the following errors in the Ubuntu 24.04 noble server "Ubuntu (ppc64le)" on RubyCI on the relatively latest master branch commit `f3206cc79bec2fd852e81ec56de59f0a67ab32b7`. Originally I found the errors at <https://github.com/ruby/ruby/pull/13972#issuecomment-3160768404>. ## Reproducing the errors ``` $ grep ^VERSION /etc/os-release VERSION_ID="24.04" VERSION="24.04.3 LTS (Noble Numbat)" VERSION_CODENAME=noble $ uname -m ppc64le $ uname -r 6.8.0-71-generic ``` ``` $ pwd /home/jaruga/git/ruby/ruby ``` The following `configure` script's options comes from the `.github/workflows/ubuntu.yml`. https://github.com/ruby/ruby/blob/24d0b458cd6ccde1e052c1db15af120def349693/.... ``` $ ./autogen.sh $ ./configure -C --disable-install-doc cppflags=-DRUBY_DEBUG $ make -j4 ``` Then the 2 assertions in the following tests always fail. ``` $ make btest BTESTS=bootstraptest/test_ractor.rb ... FAIL 2/147 tests failed make: *** [uncommon.mk:913: yes-btest] Error 1 $ make btest-ruby BTESTS=bootstraptest/test_ractor.rb FAIL 2/145 tests failed make: *** [uncommon.mk:921: yes-btest-ruby] Error 1 ... ``` And the `test_ractor_1.rb` is a minimal reproducer so far I found for the 1st failing assertion. ``` $ cat test_ractor_1.rb # Ractor.count counts = [] counts << Ractor.count p counts.inspect ractors = (1..2).map { Ractor.new { Ractor.receive } } counts << Ractor.count p counts.inspect ractors[0].send('End 0').join sleep 0.1 until ractors[0].inspect =~ /terminated/ counts << Ractor.count p counts.inspect ractors[1].send('End 1').join sleep 0.1 until ractors[1].inspect =~ /terminated/ counts << Ractor.count p counts.inspect ``` Then the following test fails once in 2 or 3 times. Below is a passing case. ``` $ make run TESTRUN_SCRIPT=test_ractor_1.rb ./miniruby -I./lib -I. -I.ext/common -r./powerpc64le-linux-fake test_ractor_1.rb "[1]" test_ractor_1.rb:6: warning: Ractor is experimental, and the behavior may change in future versions of Ruby! Also there are many implementation issues. "[1, 3]" "[1, 3, 2]" "[1, 3, 2, 1]" ``` Below is a failing (aborting) case. ``` $ make run TESTRUN_SCRIPT=test_ractor_1.rb ./miniruby -I./lib -I. -I.ext/common -r./powerpc64le-linux-fake test_ractor_1.rb "[1]" test_ractor_1.rb:6: warning: Ractor is experimental, and the behavior may change in future versions of Ruby! Also there are many implementation issues. "[1, 3]" vm_core.h:2017: Assertion Failed: rb_current_execution_context:ec == rb_current_ec_noinline() ruby 3.5.0dev (2025-08-06T15:07:49Z master f3206cc79b) +PRISM [powerpc64le-linux] -- Control frame information ----------------------------------------------- c:0004 p:0003 s:0014 e:000013 METHOD <internal:ractor>:667 c:0003 p:0008 s:0010 e:000009 METHOD <internal:ractor>:313 c:0002 p:0004 s:0006 e:000005 BLOCK test_ractor_1.rb:6 [FINISH] c:0001 p:---- s:0003 e:000002 DUMMY [FINISH] -- Ruby level backtrace information ---------------------------------------- test_ractor_1.rb:6:in 'block (2 levels) in <main>' <internal:ractor>:313:in 'receive' <internal:ractor>:667:in 'receive' -- Threading information --------------------------------------------------- Total ractor count: 3 Ruby thread count for this ractor: 1 -- C level backtrace information ------------------------------------------- /home/jaruga/git/ruby/ruby/miniruby(rb_print_backtrace+0x8) [0x10a262075e10] vm_dump.c:843 /home/jaruga/git/ruby/ruby/miniruby(rb_vm_bugreport) vm_dump.c:1175 /home/jaruga/git/ruby/ruby/miniruby(rb_assert_failure_detail+0x12c) [0x10a261c62aa0] error.c:1215 /home/jaruga/git/ruby/ruby/miniruby(rb_assert_failure+0x1c) [0x10a261c62ae0] error.c:1191 /home/jaruga/git/ruby/ruby/miniruby(rb_current_execution_context+0x34) [0x10a261c66574] vm_core.h:2017 /home/jaruga/git/ruby/ruby/miniruby(ractor_basket_value+0x0) [0x10a261ee2720] ractor_sync.c:826 /home/jaruga/git/ruby/ruby/miniruby(ractor_basket_accept) ractor_sync.c:833 /home/jaruga/git/ruby/ruby/miniruby(ractor_try_receive) ractor_sync.c:1144 /home/jaruga/git/ruby/ruby/miniruby(ractor_receive) ractor_sync.c:1160 /home/jaruga/git/ruby/ruby/miniruby(ractor_port_receive) ractor_sync.c:142 /home/jaruga/git/ruby/ruby/miniruby(builtin_invoker0+0x24) [0x10a26201c3f4] vm_insnhelper.c:7344 /home/jaruga/git/ruby/ruby/miniruby(invoke_bf+0x128) [0x10a26202d968] vm_insnhelper.c:7485 /home/jaruga/git/ruby/ruby/miniruby(vm_invoke_builtin_delegate+0x1c) [0x10a262059e08] vm_insnhelper.c:7509 /home/jaruga/git/ruby/ruby/miniruby(vm_exec_core) insns.def:1698 /home/jaruga/git/ruby/ruby/miniruby(vm_exec_loop+0x0) [0x10a26204af08] vm.c:2621 /home/jaruga/git/ruby/ruby/miniruby(rb_vm_exec) vm.c:2624 /home/jaruga/git/ruby/ruby/miniruby(thread_do_start_proc+0x394) [0x10a261fd6154] thread.c:584 /home/jaruga/git/ruby/ruby/miniruby(thread_do_start+0x8) [0x10a261fd68c8] thread.c:626 /home/jaruga/git/ruby/ruby/miniruby(thread_start_func_2) thread.c:677 /home/jaruga/git/ruby/ruby/miniruby(thread_sched_lock_+0x0) [0x10a261fd7104] thread_pthread.c:2237 /home/jaruga/git/ruby/ruby/miniruby(co_start) thread_pthread_mn.c:460 /home/jaruga/git/ruby/ruby/miniruby(co_start+0x8) [0x10a261fd7028] thread_pthread_mn.c:439 -- Other runtime information ----------------------------------------------- * Loaded script: test_ractor_1.rb * Loaded features: 0 enumerator.so 1 thread.rb 2 fiber.so 3 rational.so 4 complex.so 5 pathname.so 6 ruby2_keywords.rb 7 set.rb 8 /home/jaruga/git/ruby/ruby/powerpc64le-linux-fake.rb * Process memory map: 10a261c30000-10a2622d0000 r-xp 00000000 08:01 1279300 /home/jaruga/git/ruby/ruby/miniruby 10a2622d0000-10a2622e0000 r--p 00690000 08:01 1279300 /home/jaruga/git/ruby/ruby/miniruby 10a2622e0000-10a2622f0000 rw-p 006a0000 08:01 1279300 /home/jaruga/git/ruby/ruby/miniruby 10a2622f0000-10a262300000 rw-p 00000000 00:00 0 10a279e90000-10a27a030000 rw-p 00000000 00:00 0 [heap] 68d2b0000000-68d2b0030000 rw-p 00000000 00:00 0 68d2b0030000-68d2b4000000 ---p 00000000 00:00 0 68d2b8000000-68d2b8030000 rw-p 00000000 00:00 0 68d2b8030000-68d2bc000000 ---p 00000000 00:00 0 68d2bc6f0000-68d2bc700000 ---p 00000000 00:00 0 68d2bc700000-68d2bc800000 rw-p 00000000 00:00 0 68d2bc800000-68d2bc910000 rw-p 00000000 00:00 0 [anon:Ruby:nt_alloc_thread_stack_chunk] 68d2bc910000-68d2bc920000 ---p 00000000 00:00 0 [anon:Ruby:nt_alloc_thread_stack_chunk] 68d2bc920000-68d2bcb20000 rw-p 00000000 00:00 0 [anon:Ruby:nt_alloc_thread_stack_chunk] 68d2bcb20000-68d2bcb30000 ---p 00000000 00:00 0 [anon:Ruby:nt_alloc_thread_stack_chunk] 68d2bcb30000-68d2dc800000 rw-p 00000000 00:00 0 [anon:Ruby:nt_alloc_thread_stack_chunk] 68d2dc800000-68d2dc810000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dc810000-68d2dc8c0000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dc8c0000-68d2dc8d0000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dc8d0000-68d2dc980000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dc980000-68d2dc990000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dc990000-68d2dca40000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dca40000-68d2dca50000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dca50000-68d2dcb00000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dcb00000-68d2dcb10000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dcb10000-68d2dcbc0000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dcbc0000-68d2dcbd0000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dcbd0000-68d2dcc80000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dcc80000-68d2dcc90000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dcc90000-68d2dcd40000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dcd40000-68d2dcd50000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dcd50000-68d2dce00000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dce00000-68d2dce10000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dce10000-68d2dcec0000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dcec0000-68d2dced0000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dced0000-68d2dcf80000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dcf80000-68d2dcf90000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dcf90000-68d2dd040000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd040000-68d2dd050000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd050000-68d2dd100000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd100000-68d2dd110000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd110000-68d2dd1c0000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd1c0000-68d2dd1d0000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd1d0000-68d2dd280000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd280000-68d2dd290000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd290000-68d2dd340000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd340000-68d2dd350000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd350000-68d2dd400000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd400000-68d2dd410000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd410000-68d2dd4c0000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd4c0000-68d2dd4d0000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd4d0000-68d2dd580000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd580000-68d2dd590000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd590000-68d2dd640000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd640000-68d2dd650000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd650000-68d2dd700000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd700000-68d2dd710000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd710000-68d2dd7c0000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd7c0000-68d2dd7d0000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd7d0000-68d2dd880000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd880000-68d2dd890000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd890000-68d2dd940000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd940000-68d2dd950000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd950000-68d2dda00000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dda00000-68d2dda10000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dda10000-68d2ddac0000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2ddac0000-68d2ddad0000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2ddad0000-68d2ddb80000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2ddb80000-68d2ddb90000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2ddb90000-68d2ddc40000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2ddc40000-68d2ddc50000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2ddc50000-68d2ddd00000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2ddd00000-68d2ddd10000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2ddd10000-68d2dddc0000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dddc0000-68d2dddd0000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dddd0000-68d2dde80000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dde80000-68d2dde90000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dde90000-68d2ddf40000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2ddf40000-68d2ddf50000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2ddf50000-68d2de000000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2de040000-68d2de060000 r-xp 00000000 08:01 13327 /usr/lib/powerpc64le-linux-gnu/libgcc_s.so.1 68d2de060000-68d2de070000 r--p 00010000 08:01 13327 /usr/lib/powerpc64le-linux-gnu/libgcc_s.so.1 68d2de070000-68d2de080000 rw-p 00020000 08:01 13327 /usr/lib/powerpc64le-linux-gnu/libgcc_s.so.1 68d2de080000-68d2de0b0000 rw-p 00000000 00:00 0 [anon:Ruby:GC:default:heap_page_body_allocate] 68d2de0b0000-68d2de0c0000 ---p 00000000 00:00 0 68d2de0c0000-68d2de1c0000 rw-p 00000000 00:00 0 68d2de1c0000-68d2de1f0000 rw-p 00000000 00:00 0 [anon:Ruby:GC:default:heap_page_body_allocate] 68d2de1f0000-68d2de200000 ---p 00000000 00:00 0 68d2de200000-68d2dea00000 rw-p 00000000 00:00 0 68d2dea00000-68d2f6a00000 rw-p 00000000 00:00 0 [anon:Ruby:Init_default_shapes:shape_cache] 68d2f6a00000-68d2f7e00000 rw-p 00000000 00:00 0 [anon:Ruby:Init_default_shapes:shape_list] 68d2f7e00000-68d2f80f0000 r--p 00000000 08:01 5476 /usr/lib/locale/locale-archive 68d2f80f0000-68d2f8200000 rw-p 00000000 00:00 0 68d2f8200000-68d2f8460000 r-xp 00000000 08:01 25968 /usr/lib/powerpc64le-linux-gnu/libc.so.6 68d2f8460000-68d2f8470000 r--p 00260000 08:01 25968 /usr/lib/powerpc64le-linux-gnu/libc.so.6 68d2f8470000-68d2f8480000 rw-p 00270000 08:01 25968 /usr/lib/powerpc64le-linux-gnu/libc.so.6 68d2f8490000-68d2f84c0000 rw-p 00000000 00:00 0 68d2f84c0000-68d2f84d0000 rw-p 00000000 00:00 0 [anon:Ruby:GC:default:heap_page_body_allocate] 68d2f84e0000-68d2f8550000 rw-p 00000000 00:00 0 [anon:Ruby:GC:default:heap_page_body_allocate] 68d2f8550000-68d2f85b0000 r--p 00000000 08:01 26004 /usr/lib/locale/C.utf8/LC_CTYPE 68d2f85b0000-68d2f86e0000 r-xp 00000000 08:01 25971 /usr/lib/powerpc64le-linux-gnu/libm.so.6 68d2f86e0000-68d2f86f0000 r--p 00130000 08:01 25971 /usr/lib/powerpc64le-linux-gnu/libm.so.6 68d2f86f0000-68d2f8700000 rw-p 00140000 08:01 25971 /usr/lib/powerpc64le-linux-gnu/libm.so.6 68d2f8700000-68d2f8740000 r-xp 00000000 08:01 5029 /usr/lib/powerpc64le-linux-gnu/libcrypt.so.1.1.0 68d2f8740000-68d2f8750000 r--p 00030000 08:01 5029 /usr/lib/powerpc64le-linux-gnu/libcrypt.so.1.1.0 68d2f8750000-68d2f8760000 rw-p 00040000 08:01 5029 /usr/lib/powerpc64le-linux-gnu/libcrypt.so.1.1.0 68d2f8760000-68d2f8800000 r-xp 00000000 08:01 27939 /usr/lib/powerpc64le-linux-gnu/libgmp.so.10.5.0 68d2f8800000-68d2f8810000 r--p 00090000 08:01 27939 /usr/lib/powerpc64le-linux-gnu/libgmp.so.10.5.0 68d2f8810000-68d2f8820000 rw-p 000a0000 08:01 27939 /usr/lib/powerpc64le-linux-gnu/libgmp.so.10.5.0 68d2f8820000-68d2f8850000 r-xp 00000000 08:01 23504 /usr/lib/powerpc64le-linux-gnu/libz.so.1.3 68d2f8850000-68d2f8860000 r--p 00020000 08:01 23504 /usr/lib/powerpc64le-linux-gnu/libz.so.1.3 68d2f8860000-68d2f8870000 rw-p 00030000 08:01 23504 /usr/lib/powerpc64le-linux-gnu/libz.so.1.3 68d2f8870000-68d2f8880000 r--s 00000000 08:01 25957 /usr/lib/powerpc64le-linux-gnu/gconv/gconv-modules.cache 68d2f8880000-68d2f88a0000 r--p 00000000 00:00 0 [vvar] 68d2f88a0000-68d2f88b0000 r-xp 00000000 00:00 0 [vdso] 68d2f88b0000-68d2f8900000 r-xp 00000000 08:01 25965 /usr/lib/powerpc64le-linux-gnu/ld64.so.2 68d2f8900000-68d2f8910000 r--p 00040000 08:01 25965 /usr/lib/powerpc64le-linux-gnu/ld64.so.2 68d2f8910000-68d2f8920000 rw-p 00050000 08:01 25965 /usr/lib/powerpc64le-linux-gnu/ld64.so.2 7fffe3520000-7fffe3550000 rw-p 00000000 00:00 0 [stack] make: *** [uncommon.mk:1430: run] Aborted (core dumped) ``` ## Debugging on gdb ``` $ make gdb TESTRUN_SCRIPT=test_ractor_1.rb gdb -x run.gdb --quiet --args ./miniruby -I./lib -I. -I.ext/common test_ractor_1.rb Reading symbols from ./miniruby... warning: File "/home/jaruga/git/ruby/ruby/.gdbinit" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load". To enable execution of this file add add-auto-load-safe-path /home/jaruga/git/ruby/ruby/.gdbinit line to your configuration file "/home/jaruga/.config/gdb/gdbinit". To completely disable this security protection add set auto-load safe-path / line to your configuration file "/home/jaruga/.config/gdb/gdbinit". For more information about this security protection see the "Auto-loading safe path" section in the GDB manual. E.g., run from the shell: info "(gdb)Auto-loading safe path" Breakpoint 1 at 0x32acc: file error.c, line 1190. Breakpoint 2 at 0x32d30: file error.c, line 1112. Breakpoint 3 at 0x108820: file debug.c, line 168. warning: ./breakpoints.gdb: No such file or directory This GDB supports auto-downloading debuginfo from the following URLs: <https://debuginfod.ubuntu.com> Enable debuginfod for this session? (y or [n]) [answered N; input not from terminal] Debuginfod has been disabled. To make this setting permanent, add 'set debuginfod enabled off' to .gdbinit. [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/powerpc64le-linux-gnu/libthread_db.so.1". [New Thread 0x7fffddfff100 (LWP 3470199)] "[1]" test_ractor_1.rb:6: warning: Ractor is experimental, and the behavior may change in future versions of Ruby! Also there are many implementation issues. [New Thread 0x7fffdd7ef100 (LWP 3470200)] [New Thread 0x7fffbbdff100 (LWP 3470201)] "[1, 3]" "[1, 3, 2]" [Switching to Thread 0x7fffbbdff100 (LWP 3470201)] Thread 4 "miniruby" hit Breakpoint 1, 0x0000000100032acc in rb_assert_failure ( file=file@entry=0x100514e48 "vm_core.h", line=line@entry=2017, name=name@entry=0x100573a28 <__func__.2> "rb_current_execution_context", expr=expr@entry=0x10050f5e0 "ec == rb_current_ec_noinline()") at error.c:1190 1190 { (gdb) r The program being debugged has been started already. Start it from the beginning? (y or n) y Starting program: /home/jaruga/git/ruby/ruby/miniruby -I./lib -I. -I.ext/common test_ractor_1.rb [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/powerpc64le-linux-gnu/libthread_db.so.1". [New Thread 0x7fffddfff100 (LWP 3470207)] "[1]" test_ractor_1.rb:6: warning: Ractor is experimental, and the behavior may change in future versions of Ruby! Also there are many implementation issues. [New Thread 0x7fffdd7ef100 (LWP 3470208)] [New Thread 0x7fffbbdff100 (LWP 3470209)] "[1, 3]" "[1, 3, 2]" [Switching to Thread 0x7fffbbdff100 (LWP 3470209)] Thread 4 "miniruby" hit Breakpoint 1, 0x0000000100032acc in rb_assert_failure ( file=file@entry=0x100514e48 "vm_core.h", line=line@entry=2017, name=name@entry=0x100573a28 <__func__.2> "rb_current_execution_context", expr=expr@entry=0x10050f5e0 "ec == rb_current_ec_noinline()") at error.c:1190 1190 { ``` ``` (gdb) bt #0 0x0000000100032acc in rb_assert_failure (file=file@entry=0x100514e48 "vm_core.h", line=line@entry=2017, name=name@entry=0x100573a28 <__func__.2> "rb_current_execution_context", expr=expr@entry=0x10050f5e0 "ec == rb_current_ec_noinline()") at error.c:1190 #1 0x0000000100036574 in rb_current_execution_context (expect_ec=true) at vm_core.h:2017 #2 0x00000001002b2720 in rb_current_execution_context (expect_ec=true) at ractor_sync.c:826 #3 rb_current_ractor_raw (expect=true) at vm_core.h:2039 #4 rb_current_ractor_raw (expect=<optimized out>) at vm_core.h:2033 #5 rb_current_ractor () at vm_core.h:2047 #6 rb_current_ractor () at vm_core.h:2045 #7 ractor_queue_deq (rq=0x10082d680, r=<optimized out>) at ractor_sync.c:339 #8 ractor_try_receive (ec=0x10080ed30, rp=<optimized out>, cr=<optimized out>) at ractor_sync.c:1137 #9 ractor_receive (rp=<optimized out>, ec=<optimized out>) at ractor_sync.c:1160 #10 ractor_port_receive (ec=0x10080ed30, ec@entry=<error reading variable: value has been optimized out>, self=<error reading variable: value has been optimized out>) at ractor_sync.c:142 #11 0x00000001003ec3f4 in builtin_invoker0 (ec=<optimized out>, self=<optimized out>, argv=<optimized out>, funcptr=<optimized out>) at vm_insnhelper.c:7344 #12 0x00000001003fd968 in invoke_bf (ec=0x10080ed30, reg_cfp=0x7fffbc11ff20, bf=0x1006a9678 <ractor_table+552>, argv=0x0) at vm_insnhelper.c:7485 #13 0x0000000100429e08 in vm_invoke_builtin_delegate (start_index=<optimized out>, bf=<optimized out>, cfp=<optimized out>, ec=<optimized out>) at vm_insnhelper.c:7509 #14 vm_exec_core (ec=0x10080ed30) at insns.def:1698 #15 0x000000010041af08 in rb_vm_exec (ec=0x10080ed30) at vm.c:2621 #16 0x00000001003a6154 in thread_do_start_proc (th=th@entry=0x10082d6a0) at thread.c:584 #17 0x00000001003a68c8 in thread_do_start (th=0x10082d6a0) at thread.c:626 #18 thread_start_func_2 (th=th@entry=0x10082d6a0, stack_start=<optimized out>) at thread.c:677 #19 0x00000001003a7104 in call_thread_start_func_2 (th=<optimized out>) at thread_pthread.c:2237 #20 co_start (from=<optimized out>, self=0x10082d960) at thread_pthread_mn.c:458 Backtrace stopped: previous frame identical to this frame (corrupt stack?) ``` In the stacktrace info, the ractor_sync.c:142 is below. https://github.com/ruby/ruby/blob/f3206cc79bec2fd852e81ec56de59f0a67ab32b7/r... The ractor_sync.c:826 is below. https://github.com/ruby/ruby/blob/f3206cc79bec2fd852e81ec56de59f0a67ab32b7/r... ## RubyCI Ubuntu (ppc64le) passing Interestingly, it seems that this core dump doesn't happen on the RubyCI Ubuntu (ppc64le) server, for example on the following log. I don't know why this core dump doesn't happen on the server. https://rubyci.s3.amazonaws.com/ppc64le/ruby-master/log/20250807T130006Z.log... -- https://bugs.ruby-lang.org/

Issue #21534 has been updated by luke-gru (Luke Gruber). Assignee set to ractor ---------------------------------------- Bug #21534: ppc64le Ractor ractor_port_receive aborted (core dumped) https://bugs.ruby-lang.org/issues/21534#change-114244 * Author: jaruga (Jun Aruga) * Status: Open * Assignee: ractor * Backport: 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN ---------------------------------------- I am seeing the following errors in the Ubuntu 24.04 noble server "Ubuntu (ppc64le)" on RubyCI on the relatively latest master branch commit `f3206cc79bec2fd852e81ec56de59f0a67ab32b7`. Originally I found the errors at <https://github.com/ruby/ruby/pull/13972#issuecomment-3160768404>. ## Reproducing the errors ``` $ grep ^VERSION /etc/os-release VERSION_ID="24.04" VERSION="24.04.3 LTS (Noble Numbat)" VERSION_CODENAME=noble $ uname -m ppc64le $ uname -r 6.8.0-71-generic ``` ``` $ pwd /home/jaruga/git/ruby/ruby ``` The following `configure` script's options comes from the `.github/workflows/ubuntu.yml`. https://github.com/ruby/ruby/blob/24d0b458cd6ccde1e052c1db15af120def349693/.... ``` $ ./autogen.sh $ ./configure -C --disable-install-doc cppflags=-DRUBY_DEBUG $ make -j4 ``` Then the 2 assertions in the following tests always fail. ``` $ make btest BTESTS=bootstraptest/test_ractor.rb ... #65 test_ractor.rb:1016: ... #92 test_ractor.rb:1451: ... FAIL 2/147 tests failed make: *** [uncommon.mk:913: yes-btest] Error 1 ``` ``` $ make btest-ruby BTESTS=bootstraptest/test_ractor.rb ... #65 test_ractor.rb:1016: ... #92 test_ractor.rb:1451: ... FAIL 2/145 tests failed make: *** [uncommon.mk:921: yes-btest-ruby] Error 1 ``` And the `test_ractor_1.rb` is a minimal reproducer so far I found for the 1st failing assertion. ``` $ cat test_ractor_1.rb # Ractor.count counts = [] counts << Ractor.count p counts.inspect ractors = (1..2).map { Ractor.new { Ractor.receive } } counts << Ractor.count p counts.inspect ractors[0].send('End 0').join sleep 0.1 until ractors[0].inspect =~ /terminated/ counts << Ractor.count p counts.inspect ractors[1].send('End 1').join sleep 0.1 until ractors[1].inspect =~ /terminated/ counts << Ractor.count p counts.inspect ``` Then the following test fails once in 2 or 3 times. Below is a passing case. ``` $ make run TESTRUN_SCRIPT=test_ractor_1.rb ./miniruby -I./lib -I. -I.ext/common -r./powerpc64le-linux-fake test_ractor_1.rb "[1]" test_ractor_1.rb:6: warning: Ractor is experimental, and the behavior may change in future versions of Ruby! Also there are many implementation issues. "[1, 3]" "[1, 3, 2]" "[1, 3, 2, 1]" ``` Below is a failing (aborting) case. ``` $ make run TESTRUN_SCRIPT=test_ractor_1.rb ./miniruby -I./lib -I. -I.ext/common -r./powerpc64le-linux-fake test_ractor_1.rb "[1]" test_ractor_1.rb:6: warning: Ractor is experimental, and the behavior may change in future versions of Ruby! Also there are many implementation issues. "[1, 3]" vm_core.h:2017: Assertion Failed: rb_current_execution_context:ec == rb_current_ec_noinline() ruby 3.5.0dev (2025-08-06T15:07:49Z master f3206cc79b) +PRISM [powerpc64le-linux] -- Control frame information ----------------------------------------------- c:0004 p:0003 s:0014 e:000013 METHOD <internal:ractor>:667 c:0003 p:0008 s:0010 e:000009 METHOD <internal:ractor>:313 c:0002 p:0004 s:0006 e:000005 BLOCK test_ractor_1.rb:6 [FINISH] c:0001 p:---- s:0003 e:000002 DUMMY [FINISH] -- Ruby level backtrace information ---------------------------------------- test_ractor_1.rb:6:in 'block (2 levels) in <main>' <internal:ractor>:313:in 'receive' <internal:ractor>:667:in 'receive' -- Threading information --------------------------------------------------- Total ractor count: 3 Ruby thread count for this ractor: 1 -- C level backtrace information ------------------------------------------- /home/jaruga/git/ruby/ruby/miniruby(rb_print_backtrace+0x8) [0x10a262075e10] vm_dump.c:843 /home/jaruga/git/ruby/ruby/miniruby(rb_vm_bugreport) vm_dump.c:1175 /home/jaruga/git/ruby/ruby/miniruby(rb_assert_failure_detail+0x12c) [0x10a261c62aa0] error.c:1215 /home/jaruga/git/ruby/ruby/miniruby(rb_assert_failure+0x1c) [0x10a261c62ae0] error.c:1191 /home/jaruga/git/ruby/ruby/miniruby(rb_current_execution_context+0x34) [0x10a261c66574] vm_core.h:2017 /home/jaruga/git/ruby/ruby/miniruby(ractor_basket_value+0x0) [0x10a261ee2720] ractor_sync.c:826 /home/jaruga/git/ruby/ruby/miniruby(ractor_basket_accept) ractor_sync.c:833 /home/jaruga/git/ruby/ruby/miniruby(ractor_try_receive) ractor_sync.c:1144 /home/jaruga/git/ruby/ruby/miniruby(ractor_receive) ractor_sync.c:1160 /home/jaruga/git/ruby/ruby/miniruby(ractor_port_receive) ractor_sync.c:142 /home/jaruga/git/ruby/ruby/miniruby(builtin_invoker0+0x24) [0x10a26201c3f4] vm_insnhelper.c:7344 /home/jaruga/git/ruby/ruby/miniruby(invoke_bf+0x128) [0x10a26202d968] vm_insnhelper.c:7485 /home/jaruga/git/ruby/ruby/miniruby(vm_invoke_builtin_delegate+0x1c) [0x10a262059e08] vm_insnhelper.c:7509 /home/jaruga/git/ruby/ruby/miniruby(vm_exec_core) insns.def:1698 /home/jaruga/git/ruby/ruby/miniruby(vm_exec_loop+0x0) [0x10a26204af08] vm.c:2621 /home/jaruga/git/ruby/ruby/miniruby(rb_vm_exec) vm.c:2624 /home/jaruga/git/ruby/ruby/miniruby(thread_do_start_proc+0x394) [0x10a261fd6154] thread.c:584 /home/jaruga/git/ruby/ruby/miniruby(thread_do_start+0x8) [0x10a261fd68c8] thread.c:626 /home/jaruga/git/ruby/ruby/miniruby(thread_start_func_2) thread.c:677 /home/jaruga/git/ruby/ruby/miniruby(thread_sched_lock_+0x0) [0x10a261fd7104] thread_pthread.c:2237 /home/jaruga/git/ruby/ruby/miniruby(co_start) thread_pthread_mn.c:460 /home/jaruga/git/ruby/ruby/miniruby(co_start+0x8) [0x10a261fd7028] thread_pthread_mn.c:439 -- Other runtime information ----------------------------------------------- * Loaded script: test_ractor_1.rb * Loaded features: 0 enumerator.so 1 thread.rb 2 fiber.so 3 rational.so 4 complex.so 5 pathname.so 6 ruby2_keywords.rb 7 set.rb 8 /home/jaruga/git/ruby/ruby/powerpc64le-linux-fake.rb * Process memory map: 10a261c30000-10a2622d0000 r-xp 00000000 08:01 1279300 /home/jaruga/git/ruby/ruby/miniruby 10a2622d0000-10a2622e0000 r--p 00690000 08:01 1279300 /home/jaruga/git/ruby/ruby/miniruby 10a2622e0000-10a2622f0000 rw-p 006a0000 08:01 1279300 /home/jaruga/git/ruby/ruby/miniruby 10a2622f0000-10a262300000 rw-p 00000000 00:00 0 10a279e90000-10a27a030000 rw-p 00000000 00:00 0 [heap] 68d2b0000000-68d2b0030000 rw-p 00000000 00:00 0 68d2b0030000-68d2b4000000 ---p 00000000 00:00 0 68d2b8000000-68d2b8030000 rw-p 00000000 00:00 0 68d2b8030000-68d2bc000000 ---p 00000000 00:00 0 68d2bc6f0000-68d2bc700000 ---p 00000000 00:00 0 68d2bc700000-68d2bc800000 rw-p 00000000 00:00 0 68d2bc800000-68d2bc910000 rw-p 00000000 00:00 0 [anon:Ruby:nt_alloc_thread_stack_chunk] 68d2bc910000-68d2bc920000 ---p 00000000 00:00 0 [anon:Ruby:nt_alloc_thread_stack_chunk] 68d2bc920000-68d2bcb20000 rw-p 00000000 00:00 0 [anon:Ruby:nt_alloc_thread_stack_chunk] 68d2bcb20000-68d2bcb30000 ---p 00000000 00:00 0 [anon:Ruby:nt_alloc_thread_stack_chunk] 68d2bcb30000-68d2dc800000 rw-p 00000000 00:00 0 [anon:Ruby:nt_alloc_thread_stack_chunk] 68d2dc800000-68d2dc810000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dc810000-68d2dc8c0000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dc8c0000-68d2dc8d0000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dc8d0000-68d2dc980000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dc980000-68d2dc990000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dc990000-68d2dca40000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dca40000-68d2dca50000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dca50000-68d2dcb00000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dcb00000-68d2dcb10000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dcb10000-68d2dcbc0000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dcbc0000-68d2dcbd0000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dcbd0000-68d2dcc80000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dcc80000-68d2dcc90000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dcc90000-68d2dcd40000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dcd40000-68d2dcd50000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dcd50000-68d2dce00000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dce00000-68d2dce10000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dce10000-68d2dcec0000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dcec0000-68d2dced0000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dced0000-68d2dcf80000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dcf80000-68d2dcf90000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dcf90000-68d2dd040000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd040000-68d2dd050000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd050000-68d2dd100000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd100000-68d2dd110000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd110000-68d2dd1c0000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd1c0000-68d2dd1d0000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd1d0000-68d2dd280000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd280000-68d2dd290000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd290000-68d2dd340000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd340000-68d2dd350000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd350000-68d2dd400000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd400000-68d2dd410000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd410000-68d2dd4c0000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd4c0000-68d2dd4d0000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd4d0000-68d2dd580000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd580000-68d2dd590000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd590000-68d2dd640000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd640000-68d2dd650000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd650000-68d2dd700000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd700000-68d2dd710000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd710000-68d2dd7c0000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd7c0000-68d2dd7d0000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd7d0000-68d2dd880000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd880000-68d2dd890000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd890000-68d2dd940000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd940000-68d2dd950000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd950000-68d2dda00000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dda00000-68d2dda10000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dda10000-68d2ddac0000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2ddac0000-68d2ddad0000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2ddad0000-68d2ddb80000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2ddb80000-68d2ddb90000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2ddb90000-68d2ddc40000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2ddc40000-68d2ddc50000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2ddc50000-68d2ddd00000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2ddd00000-68d2ddd10000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2ddd10000-68d2dddc0000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dddc0000-68d2dddd0000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dddd0000-68d2dde80000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dde80000-68d2dde90000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dde90000-68d2ddf40000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2ddf40000-68d2ddf50000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2ddf50000-68d2de000000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2de040000-68d2de060000 r-xp 00000000 08:01 13327 /usr/lib/powerpc64le-linux-gnu/libgcc_s.so.1 68d2de060000-68d2de070000 r--p 00010000 08:01 13327 /usr/lib/powerpc64le-linux-gnu/libgcc_s.so.1 68d2de070000-68d2de080000 rw-p 00020000 08:01 13327 /usr/lib/powerpc64le-linux-gnu/libgcc_s.so.1 68d2de080000-68d2de0b0000 rw-p 00000000 00:00 0 [anon:Ruby:GC:default:heap_page_body_allocate] 68d2de0b0000-68d2de0c0000 ---p 00000000 00:00 0 68d2de0c0000-68d2de1c0000 rw-p 00000000 00:00 0 68d2de1c0000-68d2de1f0000 rw-p 00000000 00:00 0 [anon:Ruby:GC:default:heap_page_body_allocate] 68d2de1f0000-68d2de200000 ---p 00000000 00:00 0 68d2de200000-68d2dea00000 rw-p 00000000 00:00 0 68d2dea00000-68d2f6a00000 rw-p 00000000 00:00 0 [anon:Ruby:Init_default_shapes:shape_cache] 68d2f6a00000-68d2f7e00000 rw-p 00000000 00:00 0 [anon:Ruby:Init_default_shapes:shape_list] 68d2f7e00000-68d2f80f0000 r--p 00000000 08:01 5476 /usr/lib/locale/locale-archive 68d2f80f0000-68d2f8200000 rw-p 00000000 00:00 0 68d2f8200000-68d2f8460000 r-xp 00000000 08:01 25968 /usr/lib/powerpc64le-linux-gnu/libc.so.6 68d2f8460000-68d2f8470000 r--p 00260000 08:01 25968 /usr/lib/powerpc64le-linux-gnu/libc.so.6 68d2f8470000-68d2f8480000 rw-p 00270000 08:01 25968 /usr/lib/powerpc64le-linux-gnu/libc.so.6 68d2f8490000-68d2f84c0000 rw-p 00000000 00:00 0 68d2f84c0000-68d2f84d0000 rw-p 00000000 00:00 0 [anon:Ruby:GC:default:heap_page_body_allocate] 68d2f84e0000-68d2f8550000 rw-p 00000000 00:00 0 [anon:Ruby:GC:default:heap_page_body_allocate] 68d2f8550000-68d2f85b0000 r--p 00000000 08:01 26004 /usr/lib/locale/C.utf8/LC_CTYPE 68d2f85b0000-68d2f86e0000 r-xp 00000000 08:01 25971 /usr/lib/powerpc64le-linux-gnu/libm.so.6 68d2f86e0000-68d2f86f0000 r--p 00130000 08:01 25971 /usr/lib/powerpc64le-linux-gnu/libm.so.6 68d2f86f0000-68d2f8700000 rw-p 00140000 08:01 25971 /usr/lib/powerpc64le-linux-gnu/libm.so.6 68d2f8700000-68d2f8740000 r-xp 00000000 08:01 5029 /usr/lib/powerpc64le-linux-gnu/libcrypt.so.1.1.0 68d2f8740000-68d2f8750000 r--p 00030000 08:01 5029 /usr/lib/powerpc64le-linux-gnu/libcrypt.so.1.1.0 68d2f8750000-68d2f8760000 rw-p 00040000 08:01 5029 /usr/lib/powerpc64le-linux-gnu/libcrypt.so.1.1.0 68d2f8760000-68d2f8800000 r-xp 00000000 08:01 27939 /usr/lib/powerpc64le-linux-gnu/libgmp.so.10.5.0 68d2f8800000-68d2f8810000 r--p 00090000 08:01 27939 /usr/lib/powerpc64le-linux-gnu/libgmp.so.10.5.0 68d2f8810000-68d2f8820000 rw-p 000a0000 08:01 27939 /usr/lib/powerpc64le-linux-gnu/libgmp.so.10.5.0 68d2f8820000-68d2f8850000 r-xp 00000000 08:01 23504 /usr/lib/powerpc64le-linux-gnu/libz.so.1.3 68d2f8850000-68d2f8860000 r--p 00020000 08:01 23504 /usr/lib/powerpc64le-linux-gnu/libz.so.1.3 68d2f8860000-68d2f8870000 rw-p 00030000 08:01 23504 /usr/lib/powerpc64le-linux-gnu/libz.so.1.3 68d2f8870000-68d2f8880000 r--s 00000000 08:01 25957 /usr/lib/powerpc64le-linux-gnu/gconv/gconv-modules.cache 68d2f8880000-68d2f88a0000 r--p 00000000 00:00 0 [vvar] 68d2f88a0000-68d2f88b0000 r-xp 00000000 00:00 0 [vdso] 68d2f88b0000-68d2f8900000 r-xp 00000000 08:01 25965 /usr/lib/powerpc64le-linux-gnu/ld64.so.2 68d2f8900000-68d2f8910000 r--p 00040000 08:01 25965 /usr/lib/powerpc64le-linux-gnu/ld64.so.2 68d2f8910000-68d2f8920000 rw-p 00050000 08:01 25965 /usr/lib/powerpc64le-linux-gnu/ld64.so.2 7fffe3520000-7fffe3550000 rw-p 00000000 00:00 0 [stack] make: *** [uncommon.mk:1430: run] Aborted (core dumped) ``` ## Debugging on gdb ``` $ make gdb TESTRUN_SCRIPT=test_ractor_1.rb gdb -x run.gdb --quiet --args ./miniruby -I./lib -I. -I.ext/common test_ractor_1.rb Reading symbols from ./miniruby... warning: File "/home/jaruga/git/ruby/ruby/.gdbinit" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load". To enable execution of this file add add-auto-load-safe-path /home/jaruga/git/ruby/ruby/.gdbinit line to your configuration file "/home/jaruga/.config/gdb/gdbinit". To completely disable this security protection add set auto-load safe-path / line to your configuration file "/home/jaruga/.config/gdb/gdbinit". For more information about this security protection see the "Auto-loading safe path" section in the GDB manual. E.g., run from the shell: info "(gdb)Auto-loading safe path" Breakpoint 1 at 0x32acc: file error.c, line 1190. Breakpoint 2 at 0x32d30: file error.c, line 1112. Breakpoint 3 at 0x108820: file debug.c, line 168. warning: ./breakpoints.gdb: No such file or directory This GDB supports auto-downloading debuginfo from the following URLs: <https://debuginfod.ubuntu.com> Enable debuginfod for this session? (y or [n]) [answered N; input not from terminal] Debuginfod has been disabled. To make this setting permanent, add 'set debuginfod enabled off' to .gdbinit. [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/powerpc64le-linux-gnu/libthread_db.so.1". [New Thread 0x7fffddfff100 (LWP 3470199)] "[1]" test_ractor_1.rb:6: warning: Ractor is experimental, and the behavior may change in future versions of Ruby! Also there are many implementation issues. [New Thread 0x7fffdd7ef100 (LWP 3470200)] [New Thread 0x7fffbbdff100 (LWP 3470201)] "[1, 3]" "[1, 3, 2]" [Switching to Thread 0x7fffbbdff100 (LWP 3470201)] Thread 4 "miniruby" hit Breakpoint 1, 0x0000000100032acc in rb_assert_failure ( file=file@entry=0x100514e48 "vm_core.h", line=line@entry=2017, name=name@entry=0x100573a28 <__func__.2> "rb_current_execution_context", expr=expr@entry=0x10050f5e0 "ec == rb_current_ec_noinline()") at error.c:1190 1190 { (gdb) r The program being debugged has been started already. Start it from the beginning? (y or n) y Starting program: /home/jaruga/git/ruby/ruby/miniruby -I./lib -I. -I.ext/common test_ractor_1.rb [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/powerpc64le-linux-gnu/libthread_db.so.1". [New Thread 0x7fffddfff100 (LWP 3470207)] "[1]" test_ractor_1.rb:6: warning: Ractor is experimental, and the behavior may change in future versions of Ruby! Also there are many implementation issues. [New Thread 0x7fffdd7ef100 (LWP 3470208)] [New Thread 0x7fffbbdff100 (LWP 3470209)] "[1, 3]" "[1, 3, 2]" [Switching to Thread 0x7fffbbdff100 (LWP 3470209)] Thread 4 "miniruby" hit Breakpoint 1, 0x0000000100032acc in rb_assert_failure ( file=file@entry=0x100514e48 "vm_core.h", line=line@entry=2017, name=name@entry=0x100573a28 <__func__.2> "rb_current_execution_context", expr=expr@entry=0x10050f5e0 "ec == rb_current_ec_noinline()") at error.c:1190 1190 { ``` ``` (gdb) bt #0 0x0000000100032acc in rb_assert_failure (file=file@entry=0x100514e48 "vm_core.h", line=line@entry=2017, name=name@entry=0x100573a28 <__func__.2> "rb_current_execution_context", expr=expr@entry=0x10050f5e0 "ec == rb_current_ec_noinline()") at error.c:1190 #1 0x0000000100036574 in rb_current_execution_context (expect_ec=true) at vm_core.h:2017 #2 0x00000001002b2720 in rb_current_execution_context (expect_ec=true) at ractor_sync.c:826 #3 rb_current_ractor_raw (expect=true) at vm_core.h:2039 #4 rb_current_ractor_raw (expect=<optimized out>) at vm_core.h:2033 #5 rb_current_ractor () at vm_core.h:2047 #6 rb_current_ractor () at vm_core.h:2045 #7 ractor_queue_deq (rq=0x10082d680, r=<optimized out>) at ractor_sync.c:339 #8 ractor_try_receive (ec=0x10080ed30, rp=<optimized out>, cr=<optimized out>) at ractor_sync.c:1137 #9 ractor_receive (rp=<optimized out>, ec=<optimized out>) at ractor_sync.c:1160 #10 ractor_port_receive (ec=0x10080ed30, ec@entry=<error reading variable: value has been optimized out>, self=<error reading variable: value has been optimized out>) at ractor_sync.c:142 #11 0x00000001003ec3f4 in builtin_invoker0 (ec=<optimized out>, self=<optimized out>, argv=<optimized out>, funcptr=<optimized out>) at vm_insnhelper.c:7344 #12 0x00000001003fd968 in invoke_bf (ec=0x10080ed30, reg_cfp=0x7fffbc11ff20, bf=0x1006a9678 <ractor_table+552>, argv=0x0) at vm_insnhelper.c:7485 #13 0x0000000100429e08 in vm_invoke_builtin_delegate (start_index=<optimized out>, bf=<optimized out>, cfp=<optimized out>, ec=<optimized out>) at vm_insnhelper.c:7509 #14 vm_exec_core (ec=0x10080ed30) at insns.def:1698 #15 0x000000010041af08 in rb_vm_exec (ec=0x10080ed30) at vm.c:2621 #16 0x00000001003a6154 in thread_do_start_proc (th=th@entry=0x10082d6a0) at thread.c:584 #17 0x00000001003a68c8 in thread_do_start (th=0x10082d6a0) at thread.c:626 #18 thread_start_func_2 (th=th@entry=0x10082d6a0, stack_start=<optimized out>) at thread.c:677 #19 0x00000001003a7104 in call_thread_start_func_2 (th=<optimized out>) at thread_pthread.c:2237 #20 co_start (from=<optimized out>, self=0x10082d960) at thread_pthread_mn.c:458 Backtrace stopped: previous frame identical to this frame (corrupt stack?) ``` In the stacktrace info, the ractor_sync.c:142 is below. https://github.com/ruby/ruby/blob/f3206cc79bec2fd852e81ec56de59f0a67ab32b7/r... The ractor_sync.c:826 is below. https://github.com/ruby/ruby/blob/f3206cc79bec2fd852e81ec56de59f0a67ab32b7/r... ## RubyCI Ubuntu (ppc64le) passing Interestingly, it seems that this core dump doesn't happen on the RubyCI Ubuntu (ppc64le) server, for example on the following log. I don't know why this core dump doesn't happen on the server. https://rubyci.s3.amazonaws.com/ppc64le/ruby-master/log/20250807T130006Z.log... -- https://bugs.ruby-lang.org/

Issue #21534 has been updated by jaruga (Jun Aruga). I am also seeing the following test failures in the `make test-all` below on GitHub Actions ppc64le 24.04. It seems that the first 2 failing tests are related to ractor. https://github.com/ruby/ruby/actions/runs/16884291029/job/47827946161?pr=139... ``` 2025-08-11T15:29:04.4694769Z 1) Failure: 2025-08-11T15:29:04.4700381Z TestEncoding#test_ractor_lazy_load_encoding_concurrently [/tmp/_actions-runner-working-dir/ruby/ruby/src/test/ruby/test_encoding.rb:141]: 2025-08-11T15:29:04.4706974Z pid 63572 killed by SIGABRT (signal 6) (core dumped) 2025-08-11T15:29:04.4711837Z | ../src/vm_core.h:2017: Assertion Failed: rb_current_execution_context:ec == rb_current_ec_noinline() 2025-08-11T15:29:04.4717812Z | ruby 3.5.0dev (2025-08-11T15:16:49Z pull/13972/merge 171e141eee) +PRISM [powerpc64le-linux] 2025-08-11T15:29:04.4721847Z | 2025-08-11T15:29:04.4724533Z | -- Control frame information ----------------------------------------------- 2025-08-11T15:29:04.4728557Z | c:0005 p:---- s:0021 e:000020 CFUNC :force_encoding 2025-08-11T15:29:04.4731998Z | c:0004 p:0006 s:0016 e:000015 BLOCK -:20 [FINISH] 2025-08-11T15:29:04.4735023Z | c:0003 p:---- s:0012 e:000011 CFUNC :each 2025-08-11T15:29:04.4738008Z | c:0002 p:0011 s:0008 e:000007 BLOCK -:19 [FINISH] 2025-08-11T15:29:04.4741049Z | c:0001 p:---- s:0003 e:000002 DUMMY [FINISH] 2025-08-11T15:29:04.4743711Z | 2025-08-11T15:29:04.4748718Z | -- Ruby level backtrace information ---------------------------------------- 2025-08-11T15:29:04.4755209Z | -:19:in 'block (2 levels) in <main>' 2025-08-11T15:29:04.4757682Z | -:19:in 'each' 2025-08-11T15:29:04.4759643Z | -:20:in 'block (3 levels) in <main>' 2025-08-11T15:29:04.4762158Z | -:20:in 'force_encoding' 2025-08-11T15:29:04.4764194Z | 2025-08-11T15:29:04.4766866Z | -- Threading information --------------------------------------------------- 2025-08-11T15:29:04.4770552Z | Total ractor count: 8 2025-08-11T15:29:04.4773631Z | Ruby thread count for this ractor: 1 2025-08-11T15:29:04.4776144Z | 2025-08-11T15:29:04.4778850Z | -- C level backtrace information ------------------------------------------- 2025-08-11T15:29:04.4786567Z | ../src/vm_core.h:2017: Assertion Failed: rb_current_execution_context:ec == rb_current_ec_noinline() 2025-08-11T15:29:04.4792621Z | ruby 3.5.0dev (2025-08-11T15:16:49Z pull/13972/merge 171e141eee) +PRISM [powerpc64le-linux] 2025-08-11T15:29:04.4796612Z | 2025-08-11T15:29:04.4798402Z | Crashed while printing bug report 2025-08-11T15:29:04.4800269Z 2025-08-11T15:29:04.4800314Z 2025-08-11T15:29:04.4801062Z 2) Failure: 2025-08-11T15:29:04.4805143Z TestEnv#test_fetch_in_ractor [/tmp/_actions-runner-working-dir/ruby/ruby/src/test/ruby/test_env.rb:783]: 2025-08-11T15:29:04.4810415Z pid 77587 killed by SIGABRT (signal 6) (core dumped) 2025-08-11T15:29:04.4815283Z | ../src/vm_core.h:2017: Assertion Failed: rb_current_execution_context:ec == rb_current_ec_noinline() 2025-08-11T15:29:04.4822034Z | ruby 3.5.0dev (2025-08-11T15:16:49Z pull/13972/merge 171e141eee) +PRISM [powerpc64le-linux] 2025-08-11T15:29:04.4825971Z | 2025-08-11T15:29:04.4828666Z | -- Control frame information ----------------------------------------------- 2025-08-11T15:29:04.4832594Z | c:0003 p:---- s:0017 e:000016 CFUNC :force_encoding 2025-08-11T15:29:04.4835665Z | c:0002 p:0101 s:0012 e:000010 BLOCK -:31 [FINISH] 2025-08-11T15:29:04.4838558Z | c:0001 p:---- s:0003 e:000002 DUMMY [FINISH] 2025-08-11T15:29:04.4841071Z | 2025-08-11T15:29:04.4843816Z | -- Ruby level backtrace information ---------------------------------------- 2025-08-11T15:29:04.4847536Z | -:31:in 'block in <main>' 2025-08-11T15:29:04.4849712Z | -:31:in 'force_encoding' 2025-08-11T15:29:04.4851739Z | 2025-08-11T15:29:04.4854415Z | -- Threading information --------------------------------------------------- 2025-08-11T15:29:04.4858040Z | Total ractor count: 2 2025-08-11T15:29:04.4860306Z | Ruby thread count for this ractor: 1 2025-08-11T15:29:04.4862717Z | 2025-08-11T15:29:04.4865490Z | -- C level backtrace information ------------------------------------------- 2025-08-11T15:29:04.4871747Z | /tmp/_actions-runner-working-dir/ruby/ruby/build/ruby(rb_print_backtrace+0x8) [0x118ada770] ../src/vm_dump.c:843 2025-08-11T15:29:04.4878942Z | /tmp/_actions-runner-working-dir/ruby/ruby/build/ruby(rb_vm_bugreport) ../src/vm_dump.c:1175 2025-08-11T15:29:04.4886369Z | /tmp/_actions-runner-working-dir/ruby/ruby/build/ruby(rb_assert_failure_detail+0x12c) [0x11869a4f4] ../src/error.c:1215 2025-08-11T15:29:04.4894392Z | /tmp/_actions-runner-working-dir/ruby/ruby/build/ruby(rb_assert_failure+0x1c) [0x11869a534] ../src/error.c:1191 2025-08-11T15:29:04.4902598Z | /tmp/_actions-runner-working-dir/ruby/ruby/build/ruby(rb_current_execution_context+0x34) [0x1186944e0] ../src/vm_core.h:2017 2025-08-11T15:29:04.4911070Z | /tmp/_actions-runner-working-dir/ruby/ruby/build/ruby(ractor_basket_value+0x0) [0x1187bdf00] ../src/ractor_sync.c:826 2025-08-11T15:29:04.4918906Z | /tmp/_actions-runner-working-dir/ruby/ruby/build/ruby(ractor_basket_accept) ../src/ractor_sync.c:833 2025-08-11T15:29:04.4926030Z | /tmp/_actions-runner-working-dir/ruby/ruby/build/ruby(ractor_try_receive) ../src/ractor_sync.c:1144 2025-08-11T15:29:04.4932988Z | /tmp/_actions-runner-working-dir/ruby/ruby/build/ruby(ractor_receive) ../src/ractor_sync.c:1160 2025-08-11T15:29:04.4939963Z | /tmp/_actions-runner-working-dir/ruby/ruby/build/ruby(ractor_port_receive) ../src/ractor_sync.c:142 2025-08-11T15:29:04.4947556Z | /tmp/_actions-runner-working-dir/ruby/ruby/build/ruby(rb_ractor_require+0x1d4) [0x1187c6ad4] ../src/ractor.c:2429 2025-08-11T15:29:04.4955782Z | /tmp/_actions-runner-working-dir/ruby/ruby/build/ruby(rb_require_internal_silent+0xac) [0x118743dcc] ../src/load.c:1529 2025-08-11T15:29:04.4977046Z | /tmp/_actions-runner-working-dir/ruby/ruby/build/ruby(load_encoding+0x184) [0x118a5a344] ../src/encoding.c:760 2025-08-11T15:29:04.4985149Z | /tmp/_actions-runner-working-dir/ruby/ruby/build/ruby(rb_to_encoding+0x134) [0x118a5de94] ../src/encoding.c:207 2025-08-11T15:29:04.4993133Z | /tmp/_actions-runner-working-dir/ruby/ruby/build/ruby(rb_str_force_encoding+0x34) [0x118872714] ../src/string.c:11450 2025-08-11T15:29:04.5001581Z | /tmp/_actions-runner-working-dir/ruby/ruby/build/ruby(ractor_safe_call_cfunc_1+0x28) [0x1188f2b48] ../src/vm_insnhelper.c:3671 2025-08-11T15:29:04.5010440Z | /tmp/_actions-runner-working-dir/ruby/ruby/build/ruby(vm_call_cfunc_with_frame_+0x134) [0x11890c834] ../src/vm_insnhelper.c:3848 2025-08-11T15:29:04.5018790Z | /tmp/_actions-runner-working-dir/ruby/ruby/build/ruby(vm_sendish+0x180) [0x118913970] ../src/vm_insnhelper.c:6055 2025-08-11T15:29:04.5026186Z | /tmp/_actions-runner-working-dir/ruby/ruby/build/ruby(vm_exec_core+0xd4) [0x11892f514] insns.def:899 2025-08-11T15:29:04.5033241Z | /tmp/_actions-runner-working-dir/ruby/ruby/build/ruby(vm_exec_loop+0x28) [0x118921588] ../src/vm.c:2648 2025-08-11T15:29:04.5040039Z | /tmp/_actions-runner-working-dir/ruby/ruby/build/ruby(rb_vm_exec) ../src/vm.c:2627 2025-08-11T15:29:04.5047404Z | /tmp/_actions-runner-working-dir/ruby/ruby/build/ruby(thread_do_start_proc+0x394) [0x1188ad104] ../src/thread.c:584 2025-08-11T15:29:04.5055156Z | /tmp/_actions-runner-working-dir/ruby/ruby/build/ruby(thread_do_start+0x8) [0x1188ad878] ../src/thread.c:626 2025-08-11T15:29:04.5062271Z | /tmp/_actions-runner-working-dir/ruby/ruby/build/ruby(thread_start_func_2) ../src/thread.c:677 2025-08-11T15:29:04.5069788Z | /tmp/_actions-runner-working-dir/ruby/ruby/build/ruby(thread_sched_lock_+0x0) [0x1188ae0b4] ../src/thread_pthread.c:2234 2025-08-11T15:29:04.5077271Z | /tmp/_actions-runner-working-dir/ruby/ruby/build/ruby(co_start) ../src/thread_pthread_mn.c:460 2025-08-11T15:29:04.5084502Z | /tmp/_actions-runner-working-dir/ruby/ruby/build/ruby(co_start+0x8) [0x1188adfd8] ../src/thread_pthread_mn.c:439 2025-08-11T15:29:04.5089496Z | 2025-08-11T15:29:04.5092182Z | -- Other runtime information ----------------------------------------------- 2025-08-11T15:29:04.5095752Z | 2025-08-11T15:29:04.5097339Z | * Loaded script: - 2025-08-11T15:29:04.5099193Z | 2025-08-11T15:29:04.5100843Z | * Loaded features: 2025-08-11T15:29:04.5102685Z | 2025-08-11T15:29:04.5104258Z | 0 enumerator.so 2025-08-11T15:29:04.5106159Z | 1 thread.rb 2025-08-11T15:29:04.5107921Z | 2 fiber.so 2025-08-11T15:29:04.5109696Z | 3 rational.so 2025-08-11T15:29:04.5111520Z | 4 complex.so 2025-08-11T15:29:04.5113353Z | 5 pathname.so 2025-08-11T15:29:04.5115245Z | 6 ruby2_keywords.rb 2025-08-11T15:29:04.5117251Z | 7 set.rb 2025-08-11T15:29:04.5120776Z | 8 /tmp/_actions-runner-working-dir/ruby/ruby/build/.ext/powerpc64le-linux/enc/encdb.so 2025-08-11T15:29:04.5127123Z | 9 /tmp/_actions-runner-working-dir/ruby/ruby/build/.ext/powerpc64le-linux/enc/trans/transdb.so 2025-08-11T15:29:04.5132817Z | 10 /tmp/_actions-runner-working-dir/ruby/ruby/src/lib/open3/version.rb 2025-08-11T15:29:04.5137340Z | 11 /tmp/_actions-runner-working-dir/ruby/ruby/src/lib/open3.rb 2025-08-11T15:29:04.5141542Z | 12 /tmp/_actions-runner-working-dir/ruby/ruby/src/lib/timeout.rb 2025-08-11T15:29:04.5146237Z | 13 /tmp/_actions-runner-working-dir/ruby/ruby/build/rbconfig.rb 2025-08-11T15:29:04.5150971Z | 14 /tmp/_actions-runner-working-dir/ruby/ruby/src/tool/lib/find_executable.rb 2025-08-11T15:29:04.5156884Z | 15 /tmp/_actions-runner-working-dir/ruby/ruby/build/.ext/powerpc64le-linux/rbconfig/sizeof.so 2025-08-11T15:29:04.5162534Z | 16 /tmp/_actions-runner-working-dir/ruby/ruby/src/tool/lib/envutil.rb 2025-08-11T15:29:04.5167234Z | 17 /tmp/_actions-runner-working-dir/ruby/ruby/src/tool/lib/colorize.rb 2025-08-11T15:29:04.5172088Z | 18 /tmp/_actions-runner-working-dir/ruby/ruby/src/tool/lib/leakchecker.rb 2025-08-11T15:29:04.5176888Z | 19 /tmp/_actions-runner-working-dir/ruby/ruby/src/lib/prettyprint.rb 2025-08-11T15:29:04.5181161Z | 20 /tmp/_actions-runner-working-dir/ruby/ruby/src/lib/pp.rb 2025-08-11T15:29:04.5186014Z | 21 /tmp/_actions-runner-working-dir/ruby/ruby/src/tool/lib/test/unit/assertions.rb 2025-08-11T15:29:04.5192040Z | 22 /tmp/_actions-runner-working-dir/ruby/ruby/build/.ext/powerpc64le-linux/-test-/asan.so 2025-08-11T15:29:04.5198217Z | 23 /tmp/_actions-runner-working-dir/ruby/ruby/build/.ext/powerpc64le-linux/io/console.so 2025-08-11T15:29:04.5203925Z | 24 /tmp/_actions-runner-working-dir/ruby/ruby/src/tool/lib/core_assertions.rb 2025-08-11T15:29:04.5209324Z | 25 /tmp/_actions-runner-working-dir/ruby/ruby/src/tool/lib/test/unit/testcase.rb 2025-08-11T15:29:04.5214321Z | 26 /tmp/_actions-runner-working-dir/ruby/ruby/src/lib/optparse.rb 2025-08-11T15:29:04.5218905Z | 27 /tmp/_actions-runner-working-dir/ruby/ruby/src/tool/lib/test/unit.rb 2025-08-11T15:29:04.5224432Z | 28 /tmp/_actions-runner-working-dir/ruby/ruby/build/.ext/powerpc64le-linux/enc/utf_16le.so 2025-08-11T15:29:04.5228715Z | 2025-08-11T15:29:04.5230340Z | * Process memory map: 2025-08-11T15:29:04.5232533Z | 2025-08-11T15:29:04.5236270Z | 118660000-118d00000 r-xp 00000000 fd:08 1351941 /tmp/_actions-runner-working-dir/ruby/ruby/build/ruby 2025-08-11T15:29:04.5243249Z | 118d00000-118d10000 r--p 00690000 fd:08 1351941 /tmp/_actions-runner-working-dir/ruby/ruby/build/ruby 2025-08-11T15:29:04.5250170Z | 118d10000-118d20000 rw-p 006a0000 fd:08 1351941 /tmp/_actions-runner-working-dir/ruby/ruby/build/ruby 2025-08-11T15:29:04.5254941Z | 118d20000-118d30000 rw-p 00000000 00:00 0 2025-08-11T15:29:04.5258612Z | 10025740000-10025b30000 rw-p 00000000 00:00 0 [heap] 2025-08-11T15:29:04.5262565Z | 7fff70000000-7fff70030000 rw-p 00000000 00:00 0 2025-08-11T15:29:04.5265588Z | 7fff70030000-7fff74000000 ---p 00000000 00:00 0 2025-08-11T15:29:04.5268571Z | 7fff74000000-7fff74030000 rw-p 00000000 00:00 0 2025-08-11T15:29:04.5271577Z | 7fff74030000-7fff78000000 ---p 00000000 00:00 0 2025-08-11T15:29:04.5274657Z | 7fff78000000-7fff78030000 rw-p 00000000 00:00 0 2025-08-11T15:29:04.5277663Z | 7fff78030000-7fff7c000000 ---p 00000000 00:00 0 2025-08-11T15:29:04.5280780Z | 7fff7e000000-7fff7e110000 rw-p 00000000 00:00 0 2025-08-11T15:29:04.5283848Z | 7fff7e110000-7fff7e120000 ---p 00000000 00:00 0 2025-08-11T15:29:04.5286887Z | 7fff7e120000-7fff7e240000 rw-p 00000000 00:00 0 2025-08-11T15:29:04.5289919Z | 7fff7e240000-7fff7e250000 ---p 00000000 00:00 0 2025-08-11T15:29:04.5292973Z | 7fff7e250000-7fff9e000000 rw-p 00000000 00:00 0 2025-08-11T15:29:04.5296012Z | 7fff9e000000-7fff9e010000 ---p 00000000 00:00 0 2025-08-11T15:29:04.5299053Z | 7fff9e010000-7fff9e080000 rw-p 00000000 00:00 0 2025-08-11T15:29:04.5302091Z | 7fff9e080000-7fff9e090000 ---p 00000000 00:00 0 2025-08-11T15:29:04.5305131Z | 7fff9e090000-7fff9e100000 rw-p 00000000 00:00 0 2025-08-11T15:29:04.5308177Z | 7fff9e100000-7fff9e110000 ---p 00000000 00:00 0 2025-08-11T15:29:04.5311221Z | 7fff9e110000-7fff9e180000 rw-p 00000000 00:00 0 2025-08-11T15:29:04.5314343Z | 7fff9e180000-7fff9e190000 ---p 00000000 00:00 0 2025-08-11T15:29:04.5317371Z | 7fff9e190000-7fff9e200000 rw-p 00000000 00:00 0 2025-08-11T15:29:04.5320476Z | 7fff9e200000-7fff9e210000 ---p 00000000 00:00 0 2025-08-11T15:29:04.5323519Z | 7fff9e210000-7fff9e280000 rw-p 00000000 00:00 0 2025-08-11T15:29:04.5326559Z | 7fff9e280000-7fff9e290000 ---p 00000000 00:00 0 2025-08-11T15:29:04.5329599Z | 7fff9e290000-7fff9e300000 rw-p 00000000 00:00 0 2025-08-11T15:29:04.5332632Z | 7fff9e300000-7fff9e310000 ---p 00000000 00:00 0 2025-08-11T15:29:04.5335682Z | 7fff9e310000-7fff9e380000 rw-p 00000000 00:00 0 2025-08-11T15:29:04.5338732Z | 7fff9e380000-7fff9e390000 ---p 00000000 00:00 0 2025-08-11T15:29:04.5341776Z | 7fff9e390000-7fff9e400000 rw-p 00000000 00:00 0 2025-08-11T15:29:04.5344958Z | 7fff9e400000-7fff9e410000 ---p 00000000 00:00 0 2025-08-11T15:29:04.5348003Z | 7fff9e410000-7fff9e480000 rw-p 00000000 00:00 0 2025-08-11T15:29:04.5351041Z | 7fff9e480000-7fff9e490000 ---p 00000000 00:00 0 2025-08-11T15:29:04.5354167Z | 7fff9e490000-7fff9e500000 rw-p 00000000 00:00 0 2025-08-11T15:29:04.5357205Z | 7fff9e500000-7fff9e510000 ---p 00000000 00:00 0 2025-08-11T15:29:04.5360350Z | 7fff9e510000-7fff9e580000 rw-p 00000000 00:00 0 2025-08-11T15:29:04.5363387Z | 7fff9e580000-7fff9e590000 ---p 00000000 00:00 0 2025-08-11T15:29:04.5366423Z | 7fff9e590000-7fff9e600000 rw-p 00000000 00:00 0 2025-08-11T15:29:04.5369460Z | 7fff9e600000-7fff9e610000 ---p 00000000 00:00 0 2025-08-11T15:29:04.5372504Z | 7fff9e610000-7fff9e680000 rw-p 00000000 00:00 0 2025-08-11T15:29:04.5375534Z | 7fff9e680000-7fff9e690000 ---p 00000000 00:00 0 2025-08-11T15:29:04.5378573Z | 7fff9e690000-7fff9e700000 rw-p 00000000 00:00 0 2025-08-11T15:29:04.5381595Z | 7fff9e700000-7fff9e710000 ---p 00000000 00:00 0 2025-08-11T15:29:04.5384626Z | 7fff9e710000-7fff9e780000 rw-p 00000000 00:00 0 2025-08-11T15:29:04.5387666Z | 7fff9e780000-7fff9e790000 ---p 00000000 00:00 0 2025-08-11T15:29:04.5390702Z | 7fff9e790000-7fff9e800000 rw-p 00000000 00:00 0 2025-08-11T15:29:04.5393986Z | 7fff9e800000-7fff9e810000 ---p 00000000 00:00 0 2025-08-11T15:29:04.5397350Z | 7fff9e810000-7fff9e880000 rw-p 00000000 00:00 0 2025-08-11T15:29:04.5400400Z | 7fff9e880000-7fff9e890000 ---p 00000000 00:00 0 2025-08-11T15:29:04.5403435Z | 7fff9e890000-7fff9e900000 rw-p 00000000 00:00 0 2025-08-11T15:29:04.5406467Z | 7fff9e900000-7fff9e910000 ---p 00000000 00:00 0 2025-08-11T15:29:04.5409520Z | 7fff9e910000-7fff9e980000 rw-p 00000000 00:00 0 2025-08-11T15:29:04.5412553Z | 7fff9e980000-7fff9e990000 ---p 00000000 00:00 0 2025-08-11T15:29:04.5415586Z | 7fff9e990000-7fff9ea00000 rw-p 00000000 00:00 0 2025-08-11T15:29:04.5418664Z | 7fff9ea00000-7fff9ea10000 ---p 00000000 00:00 0 2025-08-11T15:29:04.5421730Z | 7fff9ea10000-7fff9ea80000 rw-p 00000000 00:00 0 2025-08-11T15:29:04.5424787Z | 7fff9ea80000-7fff9ea90000 ---p 00000000 00:00 0 2025-08-11T15:29:04.5427855Z | 7fff9ea90000-7fff9eb00000 rw-p 00000000 00:00 0 2025-08-11T15:29:04.5430931Z | 7fff9eb00000-7fff9eb10000 ---p 00000000 00:00 0 2025-08-11T15:29:04.5434073Z | 7fff9eb10000-7fff9eb80000 rw-p 00000000 00:00 0 2025-08-11T15:29:04.5437212Z | 7fff9eb80000-7fff9eb90000 ---p 00000000 00:00 0 2025-08-11T15:29:04.5440278Z | 7fff9eb90000-7fff9ec00000 rw-p 00000000 00:00 0 2025-08-11T15:29:04.5443346Z | 7fff9ec00000-7fff9ec10000 ---p 00000000 00:00 0 2025-08-11T15:29:04.5457654Z | 7fff9ec10000-7fff9ec80000 rw-p 00000000 00:00 0 2025-08-11T15:29:04.5460727Z | 7fff9ec80000-7fff9ec90000 ---p 00000000 00:00 0 2025-08-11T15:29:04.5463801Z | 7fff9ec90000-7fff9ed00000 rw-p 00000000 00:00 0 2025-08-11T15:29:04.5466888Z | 7fff9ed00000-7fff9ed10000 ---p 00000000 00:00 0 2025-08-11T15:29:04.5469961Z | 7fff9ed10000-7fff9ed80000 rw-p 00000000 00:00 0 2025-08-11T15:29:04.5473039Z | 7fff9ed80000-7fff9ed90000 ---p 00000000 00:00 0 2025-08-11T15:29:04.5476118Z | 7fff9ed90000-7fff9ee00000 rw-p 00000000 00:00 0 2025-08-11T15:29:04.5479204Z | 7fff9ee00000-7fff9ee10000 ---p 00000000 00:00 0 2025-08-11T15:29:04.5482362Z | 7fff9ee10000-7fff9ee80000 rw-p 00000000 00:00 0 2025-08-11T15:29:04.5485443Z | 7fff9ee80000-7fff9ee90000 ---p 00000000 00:00 0 2025-08-11T15:29:04.5488609Z | 7fff9ee90000-7fff9ef00000 rw-p 00000000 00:00 0 2025-08-11T15:29:04.5491689Z | 7fff9ef00000-7fff9ef10000 ---p 00000000 00:00 0 2025-08-11T15:29:04.5494760Z | 7fff9ef10000-7fff9ef80000 rw-p 00000000 00:00 0 2025-08-11T15:29:04.5497828Z | 7fff9ef80000-7fff9ef90000 ---p 00000000 00:00 0 2025-08-11T15:29:04.5500909Z | 7fff9ef90000-7fff9f000000 rw-p 00000000 00:00 0 2025-08-11T15:29:04.5503973Z | 7fff9f7f0000-7fff9f800000 ---p 00000000 00:00 0 2025-08-11T15:29:04.5507025Z | 7fff9f800000-7fffa0000000 rw-p 00000000 00:00 0 2025-08-11T15:29:04.5510064Z | 7fffa0000000-7fffb8000000 rw-p 00000000 00:00 0 2025-08-11T15:29:04.5514957Z | 7fffb82e0000-7fffb8300000 r-xp 00000000 fd:08 527919 /usr/lib/powerpc64le-linux-gnu/libgcc_s.so.1 2025-08-11T15:29:04.5521696Z | 7fffb8300000-7fffb8310000 r--p 00010000 fd:08 527919 /usr/lib/powerpc64le-linux-gnu/libgcc_s.so.1 2025-08-11T15:29:04.5528579Z | 7fffb8310000-7fffb8320000 rw-p 00020000 fd:08 527919 /usr/lib/powerpc64le-linux-gnu/libgcc_s.so.1 2025-08-11T15:29:04.5536857Z | 7fffb8320000-7fffb8330000 r-xp 00000000 fd:08 1454640 /tmp/_actions-runner-working-dir/ruby/ruby/build/.ext/powerpc64le-linux/enc/utf_16le.so 2025-08-11T15:29:04.5546836Z | 7fffb8330000-7fffb8340000 r--p 00000000 fd:08 1454640 /tmp/_actions-runner-working-dir/ruby/ruby/build/.ext/powerpc64le-linux/enc/utf_16le.so 2025-08-11T15:29:04.5556627Z | 7fffb8340000-7fffb8350000 rw-p 00010000 fd:08 1454640 /tmp/_actions-runner-working-dir/ruby/ruby/build/.ext/powerpc64le-linux/enc/utf_16le.so 2025-08-11T15:29:04.5563080Z | 7fffb8350000-7fffb8360000 ---p 00000000 00:00 0 2025-08-11T15:29:04.5566123Z | 7fffb8360000-7fffb8380000 rw-p 00000000 00:00 0 2025-08-11T15:29:04.5569164Z | 7fffb8380000-7fffb8490000 rw-p 00000000 00:00 0 2025-08-11T15:29:04.5572468Z | 7fffb8490000-7fffb84a0000 ---p 00000000 00:00 0 2025-08-11T15:29:04.5575541Z | 7fffb84a0000-7fffb84c0000 rw-p 00000000 00:00 0 2025-08-11T15:29:04.5578856Z | 7fffb84c0000-7fffb84d0000 ---p 00000000 00:00 0 2025-08-11T15:29:04.5581965Z | 7fffb84d0000-7fffb84f0000 rw-p 00000000 00:00 0 2025-08-11T15:29:04.5585034Z | 7fffb84f0000-7fffb8500000 rw-p 00000000 00:00 0 2025-08-11T15:29:04.5591419Z | 7fffb8500000-7fffb8510000 r-xp 00000000 fd:08 1455563 /tmp/_actions-runner-working-dir/ruby/ruby/build/.ext/powerpc64le-linux/io/console.so 2025-08-11T15:29:04.5601110Z | 7fffb8510000-7fffb8520000 r--p 00000000 fd:08 1455563 /tmp/_actions-runner-working-dir/ruby/ruby/build/.ext/powerpc64le-linux/io/console.so 2025-08-11T15:29:04.5610766Z | 7fffb8520000-7fffb8530000 rw-p 00010000 fd:08 1455563 /tmp/_actions-runner-working-dir/ruby/ruby/build/.ext/powerpc64le-linux/io/console.so 2025-08-11T15:29:04.5620473Z | 7fffb8530000-7fffb8540000 r-xp 00000000 fd:08 1455212 /tmp/_actions-runner-working-dir/ruby/ruby/build/.ext/powerpc64le-linux/-test-/asan.so 2025-08-11T15:29:04.5630358Z | 7fffb8540000-7fffb8550000 r--p 00000000 fd:08 1455212 /tmp/_actions-runner-working-dir/ruby/ruby/build/.ext/powerpc64le-linux/-test-/asan.so 2025-08-11T15:29:04.5640070Z | 7fffb8550000-7fffb8560000 rw-p 00010000 fd:08 1455212 /tmp/_actions-runner-working-dir/ruby/ruby/build/.ext/powerpc64le-linux/-test-/asan.so 2025-08-11T15:29:04.5646585Z | 7fffb8560000-7fffb8570000 rw-p 00000000 00:00 0 2025-08-11T15:29:04.5653167Z | 7fffb8570000-7fffb8580000 r-xp 00000000 fd:08 1455438 /tmp/_actions-runner-working-dir/ruby/ruby/build/.ext/powerpc64le-linux/rbconfig/sizeof.so 2025-08-11T15:29:04.5663294Z | 7fffb8580000-7fffb8590000 r--p 00000000 fd:08 1455438 /tmp/_actions-runner-working-dir/ruby/ruby/build/.ext/powerpc64le-linux/rbconfig/sizeof.so 2025-08-11T15:29:04.5673405Z | 7fffb8590000-7fffb85a0000 rw-p 00010000 fd:08 1455438 /tmp/_actions-runner-working-dir/ruby/ruby/build/.ext/powerpc64le-linux/rbconfig/sizeof.so 2025-08-11T15:29:04.5680168Z | 7fffb85a0000-7fffb86b0000 rw-p 00000000 00:00 0 2025-08-11T15:29:04.5686798Z | 7fffb86b0000-7fffb86c0000 r-xp 00000000 fd:08 1454575 /tmp/_actions-runner-working-dir/ruby/ruby/build/.ext/powerpc64le-linux/enc/trans/transdb.so 2025-08-11T15:29:04.5697013Z | 7fffb86c0000-7fffb86d0000 r--p 00000000 fd:08 1454575 /tmp/_actions-runner-working-dir/ruby/ruby/build/.ext/powerpc64le-linux/enc/trans/transdb.so 2025-08-11T15:29:04.5707229Z | 7fffb86d0000-7fffb86e0000 rw-p 00010000 fd:08 1454575 /tmp/_actions-runner-working-dir/ruby/ruby/build/.ext/powerpc64le-linux/enc/trans/transdb.so 2025-08-11T15:29:04.5713900Z | 7fffb86e0000-7fffb8720000 rw-p 00000000 00:00 0 2025-08-11T15:29:04.5720204Z | 7fffb8720000-7fffb8730000 r-xp 00000000 fd:08 1454579 /tmp/_actions-runner-working-dir/ruby/ruby/build/.ext/powerpc64le-linux/enc/encdb.so 2025-08-11T15:29:04.5729959Z | 7fffb8730000-7fffb8740000 r--p 00000000 fd:08 1454579 /tmp/_actions-runner-working-dir/ruby/ruby/build/.ext/powerpc64le-linux/enc/encdb.so 2025-08-11T15:29:04.5739532Z | 7fffb8740000-7fffb8750000 rw-p 00010000 fd:08 1454579 /tmp/_actions-runner-working-dir/ruby/ruby/build/.ext/powerpc64le-linux/enc/encdb.so 2025-08-11T15:29:04.5746275Z | 7fffb8750000-7fffb9cf0000 rw-p 00000000 00:00 0 2025-08-11T15:29:04.5751127Z | 7fffb9cf0000-7fffb9f50000 r-xp 00000000 fd:08 527759 /usr/lib/powerpc64le-linux-gnu/libc.so.6 2025-08-11T15:29:04.5757777Z | 7fffb9f50000-7fffb9f60000 r--p 00260000 fd:08 527759 /usr/lib/powerpc64le-linux-gnu/libc.so.6 2025-08-11T15:29:04.5764405Z | 7fffb9f60000-7fffb9f70000 rw-p 00270000 fd:08 527759 /usr/lib/powerpc64le-linux-gnu/libc.so.6 2025-08-11T15:29:04.5771013Z | 7fffb9f70000-7fffba0a0000 r-xp 00000000 fd:08 528115 /usr/lib/powerpc64le-linux-gnu/libm.so.6 2025-08-11T15:29:04.5778355Z | 7fffba0a0000-7fffba0b0000 r--p 00130000 fd:08 528115 /usr/lib/powerpc64le-linux-gnu/libm.so.6 2025-08-11T15:29:04.5785047Z | 7fffba0b0000-7fffba0c0000 rw-p 00140000 fd:08 528115 /usr/lib/powerpc64le-linux-gnu/libm.so.6 2025-08-11T15:29:04.5791914Z | 7fffba0c0000-7fffba100000 r-xp 00000000 fd:08 527789 /usr/lib/powerpc64le-linux-gnu/libcrypt.so.1.1.0 2025-08-11T15:29:04.5798998Z | 7fffba100000-7fffba110000 r--p 00030000 fd:08 527789 /usr/lib/powerpc64le-linux-gnu/libcrypt.so.1.1.0 2025-08-11T15:29:04.5806024Z | 7fffba110000-7fffba120000 rw-p 00040000 fd:08 527789 /usr/lib/powerpc64le-linux-gnu/libcrypt.so.1.1.0 2025-08-11T15:29:04.5813027Z | 7fffba120000-7fffba1c0000 r-xp 00000000 fd:08 527947 /usr/lib/powerpc64le-linux-gnu/libgmp.so.10.5.0 2025-08-11T15:29:04.5820018Z | 7fffba1c0000-7fffba1d0000 r--p 00090000 fd:08 527947 /usr/lib/powerpc64le-linux-gnu/libgmp.so.10.5.0 2025-08-11T15:29:04.5827190Z | 7fffba1d0000-7fffba1e0000 rw-p 000a0000 fd:08 527947 /usr/lib/powerpc64le-linux-gnu/libgmp.so.10.5.0 2025-08-11T15:29:04.5834061Z | 7fffba1e0000-7fffba210000 r-xp 00000000 fd:08 528546 /usr/lib/powerpc64le-linux-gnu/libz.so.1.3 2025-08-11T15:29:04.5840781Z | 7fffba210000-7fffba220000 r--p 00020000 fd:08 528546 /usr/lib/powerpc64le-linux-gnu/libz.so.1.3 2025-08-11T15:29:04.5847826Z | 7fffba220000-7fffba230000 rw-p 00030000 fd:08 528546 /usr/lib/powerpc64le-linux-gnu/libz.so.1.3 2025-08-11T15:29:04.5853695Z | 7fffba240000-7fffba260000 r--p 00000000 00:00 0 [vvar] 2025-08-11T15:29:04.5858985Z | 7fffba260000-7fffba270000 r-xp 00000000 00:00 0 [vdso] 2025-08-11T15:29:04.5864986Z | 7fffba270000-7fffba2c0000 r-xp 00000000 fd:08 527430 /usr/lib/powerpc64le-linux-gnu/ld64.so.2 2025-08-11T15:29:04.5872091Z | 7fffba2c0000-7fffba2d0000 r--p 00040000 fd:08 527430 /usr/lib/powerpc64le-linux-gnu/ld64.so.2 2025-08-11T15:29:04.5878819Z | 7fffba2d0000-7fffba2e0000 rw-p 00050000 fd:08 527430 /usr/lib/powerpc64le-linux-gnu/ld64.so.2 2025-08-11T15:29:04.5884755Z | 7ffff7dc0000-7ffff7df0000 rw-p 00000000 00:00 0 [stack] 2025-08-11T15:29:04.5888517Z | 2025-08-11T15:29:04.5890065Z | 2025-08-11T15:29:04.5890986Z 2025-08-11T15:29:04.5891022Z ... 2025-08-11T15:29:04.7409270Z 28985 tests, 6108751 assertions, 4 failures, 36 errors, 157 skips 2025-08-11T15:29:04.7411842Z 2025-08-11T15:29:04.7414319Z ruby -v: ruby 3.5.0dev (2025-08-11T15:16:49Z pull/13972/merge 171e141eee) +PRISM [powerpc64le-linux] ... ``` ---------------------------------------- Bug #21534: ppc64le bootstraptest/test_ractor.rb ractor_port_receive aborted (core dumped) https://bugs.ruby-lang.org/issues/21534#change-114251 * Author: jaruga (Jun Aruga) * Status: Open * Assignee: ractor * Backport: 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN ---------------------------------------- I am seeing the following errors in the Ubuntu 24.04 noble server "Ubuntu (ppc64le)" on RubyCI on the relatively latest master branch commit `f3206cc79bec2fd852e81ec56de59f0a67ab32b7`. Originally I found the errors at <https://github.com/ruby/ruby/pull/13972#issuecomment-3160768404>. ## Reproducing the errors ``` $ grep ^VERSION /etc/os-release VERSION_ID="24.04" VERSION="24.04.3 LTS (Noble Numbat)" VERSION_CODENAME=noble $ uname -m ppc64le $ uname -r 6.8.0-71-generic ``` ``` $ pwd /home/jaruga/git/ruby/ruby ``` The following `configure` script's options comes from the `.github/workflows/ubuntu.yml`. https://github.com/ruby/ruby/blob/24d0b458cd6ccde1e052c1db15af120def349693/.... ``` $ ./autogen.sh $ ./configure -C --disable-install-doc cppflags=-DRUBY_DEBUG $ make -j4 ``` Then the 2 assertions in the following tests always fail. ``` $ make btest BTESTS=bootstraptest/test_ractor.rb ... #65 test_ractor.rb:1016: ... #92 test_ractor.rb:1451: ... FAIL 2/147 tests failed make: *** [uncommon.mk:913: yes-btest] Error 1 ``` ``` $ make btest-ruby BTESTS=bootstraptest/test_ractor.rb ... #65 test_ractor.rb:1016: ... #92 test_ractor.rb:1451: ... FAIL 2/145 tests failed make: *** [uncommon.mk:921: yes-btest-ruby] Error 1 ``` And the `test_ractor_1.rb` is a minimal reproducer so far I found for the 1st failing assertion. ``` $ cat test_ractor_1.rb # Ractor.count counts = [] counts << Ractor.count p counts.inspect ractors = (1..2).map { Ractor.new { Ractor.receive } } counts << Ractor.count p counts.inspect ractors[0].send('End 0').join sleep 0.1 until ractors[0].inspect =~ /terminated/ counts << Ractor.count p counts.inspect ractors[1].send('End 1').join sleep 0.1 until ractors[1].inspect =~ /terminated/ counts << Ractor.count p counts.inspect ``` Then the following test fails once in 2 or 3 times. Below is a passing case. ``` $ make run TESTRUN_SCRIPT=test_ractor_1.rb ./miniruby -I./lib -I. -I.ext/common -r./powerpc64le-linux-fake test_ractor_1.rb "[1]" test_ractor_1.rb:6: warning: Ractor is experimental, and the behavior may change in future versions of Ruby! Also there are many implementation issues. "[1, 3]" "[1, 3, 2]" "[1, 3, 2, 1]" ``` Below is a failing (aborting) case. ``` $ make run TESTRUN_SCRIPT=test_ractor_1.rb ./miniruby -I./lib -I. -I.ext/common -r./powerpc64le-linux-fake test_ractor_1.rb "[1]" test_ractor_1.rb:6: warning: Ractor is experimental, and the behavior may change in future versions of Ruby! Also there are many implementation issues. "[1, 3]" vm_core.h:2017: Assertion Failed: rb_current_execution_context:ec == rb_current_ec_noinline() ruby 3.5.0dev (2025-08-06T15:07:49Z master f3206cc79b) +PRISM [powerpc64le-linux] -- Control frame information ----------------------------------------------- c:0004 p:0003 s:0014 e:000013 METHOD <internal:ractor>:667 c:0003 p:0008 s:0010 e:000009 METHOD <internal:ractor>:313 c:0002 p:0004 s:0006 e:000005 BLOCK test_ractor_1.rb:6 [FINISH] c:0001 p:---- s:0003 e:000002 DUMMY [FINISH] -- Ruby level backtrace information ---------------------------------------- test_ractor_1.rb:6:in 'block (2 levels) in <main>' <internal:ractor>:313:in 'receive' <internal:ractor>:667:in 'receive' -- Threading information --------------------------------------------------- Total ractor count: 3 Ruby thread count for this ractor: 1 -- C level backtrace information ------------------------------------------- /home/jaruga/git/ruby/ruby/miniruby(rb_print_backtrace+0x8) [0x10a262075e10] vm_dump.c:843 /home/jaruga/git/ruby/ruby/miniruby(rb_vm_bugreport) vm_dump.c:1175 /home/jaruga/git/ruby/ruby/miniruby(rb_assert_failure_detail+0x12c) [0x10a261c62aa0] error.c:1215 /home/jaruga/git/ruby/ruby/miniruby(rb_assert_failure+0x1c) [0x10a261c62ae0] error.c:1191 /home/jaruga/git/ruby/ruby/miniruby(rb_current_execution_context+0x34) [0x10a261c66574] vm_core.h:2017 /home/jaruga/git/ruby/ruby/miniruby(ractor_basket_value+0x0) [0x10a261ee2720] ractor_sync.c:826 /home/jaruga/git/ruby/ruby/miniruby(ractor_basket_accept) ractor_sync.c:833 /home/jaruga/git/ruby/ruby/miniruby(ractor_try_receive) ractor_sync.c:1144 /home/jaruga/git/ruby/ruby/miniruby(ractor_receive) ractor_sync.c:1160 /home/jaruga/git/ruby/ruby/miniruby(ractor_port_receive) ractor_sync.c:142 /home/jaruga/git/ruby/ruby/miniruby(builtin_invoker0+0x24) [0x10a26201c3f4] vm_insnhelper.c:7344 /home/jaruga/git/ruby/ruby/miniruby(invoke_bf+0x128) [0x10a26202d968] vm_insnhelper.c:7485 /home/jaruga/git/ruby/ruby/miniruby(vm_invoke_builtin_delegate+0x1c) [0x10a262059e08] vm_insnhelper.c:7509 /home/jaruga/git/ruby/ruby/miniruby(vm_exec_core) insns.def:1698 /home/jaruga/git/ruby/ruby/miniruby(vm_exec_loop+0x0) [0x10a26204af08] vm.c:2621 /home/jaruga/git/ruby/ruby/miniruby(rb_vm_exec) vm.c:2624 /home/jaruga/git/ruby/ruby/miniruby(thread_do_start_proc+0x394) [0x10a261fd6154] thread.c:584 /home/jaruga/git/ruby/ruby/miniruby(thread_do_start+0x8) [0x10a261fd68c8] thread.c:626 /home/jaruga/git/ruby/ruby/miniruby(thread_start_func_2) thread.c:677 /home/jaruga/git/ruby/ruby/miniruby(thread_sched_lock_+0x0) [0x10a261fd7104] thread_pthread.c:2237 /home/jaruga/git/ruby/ruby/miniruby(co_start) thread_pthread_mn.c:460 /home/jaruga/git/ruby/ruby/miniruby(co_start+0x8) [0x10a261fd7028] thread_pthread_mn.c:439 -- Other runtime information ----------------------------------------------- * Loaded script: test_ractor_1.rb * Loaded features: 0 enumerator.so 1 thread.rb 2 fiber.so 3 rational.so 4 complex.so 5 pathname.so 6 ruby2_keywords.rb 7 set.rb 8 /home/jaruga/git/ruby/ruby/powerpc64le-linux-fake.rb * Process memory map: 10a261c30000-10a2622d0000 r-xp 00000000 08:01 1279300 /home/jaruga/git/ruby/ruby/miniruby 10a2622d0000-10a2622e0000 r--p 00690000 08:01 1279300 /home/jaruga/git/ruby/ruby/miniruby 10a2622e0000-10a2622f0000 rw-p 006a0000 08:01 1279300 /home/jaruga/git/ruby/ruby/miniruby 10a2622f0000-10a262300000 rw-p 00000000 00:00 0 10a279e90000-10a27a030000 rw-p 00000000 00:00 0 [heap] 68d2b0000000-68d2b0030000 rw-p 00000000 00:00 0 68d2b0030000-68d2b4000000 ---p 00000000 00:00 0 68d2b8000000-68d2b8030000 rw-p 00000000 00:00 0 68d2b8030000-68d2bc000000 ---p 00000000 00:00 0 68d2bc6f0000-68d2bc700000 ---p 00000000 00:00 0 68d2bc700000-68d2bc800000 rw-p 00000000 00:00 0 68d2bc800000-68d2bc910000 rw-p 00000000 00:00 0 [anon:Ruby:nt_alloc_thread_stack_chunk] 68d2bc910000-68d2bc920000 ---p 00000000 00:00 0 [anon:Ruby:nt_alloc_thread_stack_chunk] 68d2bc920000-68d2bcb20000 rw-p 00000000 00:00 0 [anon:Ruby:nt_alloc_thread_stack_chunk] 68d2bcb20000-68d2bcb30000 ---p 00000000 00:00 0 [anon:Ruby:nt_alloc_thread_stack_chunk] 68d2bcb30000-68d2dc800000 rw-p 00000000 00:00 0 [anon:Ruby:nt_alloc_thread_stack_chunk] 68d2dc800000-68d2dc810000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dc810000-68d2dc8c0000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dc8c0000-68d2dc8d0000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dc8d0000-68d2dc980000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dc980000-68d2dc990000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dc990000-68d2dca40000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dca40000-68d2dca50000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dca50000-68d2dcb00000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dcb00000-68d2dcb10000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dcb10000-68d2dcbc0000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dcbc0000-68d2dcbd0000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dcbd0000-68d2dcc80000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dcc80000-68d2dcc90000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dcc90000-68d2dcd40000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dcd40000-68d2dcd50000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dcd50000-68d2dce00000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dce00000-68d2dce10000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dce10000-68d2dcec0000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dcec0000-68d2dced0000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dced0000-68d2dcf80000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dcf80000-68d2dcf90000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dcf90000-68d2dd040000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd040000-68d2dd050000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd050000-68d2dd100000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd100000-68d2dd110000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd110000-68d2dd1c0000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd1c0000-68d2dd1d0000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd1d0000-68d2dd280000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd280000-68d2dd290000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd290000-68d2dd340000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd340000-68d2dd350000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd350000-68d2dd400000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd400000-68d2dd410000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd410000-68d2dd4c0000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd4c0000-68d2dd4d0000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd4d0000-68d2dd580000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd580000-68d2dd590000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd590000-68d2dd640000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd640000-68d2dd650000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd650000-68d2dd700000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd700000-68d2dd710000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd710000-68d2dd7c0000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd7c0000-68d2dd7d0000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd7d0000-68d2dd880000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd880000-68d2dd890000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd890000-68d2dd940000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd940000-68d2dd950000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd950000-68d2dda00000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dda00000-68d2dda10000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dda10000-68d2ddac0000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2ddac0000-68d2ddad0000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2ddad0000-68d2ddb80000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2ddb80000-68d2ddb90000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2ddb90000-68d2ddc40000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2ddc40000-68d2ddc50000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2ddc50000-68d2ddd00000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2ddd00000-68d2ddd10000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2ddd10000-68d2dddc0000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dddc0000-68d2dddd0000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dddd0000-68d2dde80000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dde80000-68d2dde90000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dde90000-68d2ddf40000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2ddf40000-68d2ddf50000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2ddf50000-68d2de000000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2de040000-68d2de060000 r-xp 00000000 08:01 13327 /usr/lib/powerpc64le-linux-gnu/libgcc_s.so.1 68d2de060000-68d2de070000 r--p 00010000 08:01 13327 /usr/lib/powerpc64le-linux-gnu/libgcc_s.so.1 68d2de070000-68d2de080000 rw-p 00020000 08:01 13327 /usr/lib/powerpc64le-linux-gnu/libgcc_s.so.1 68d2de080000-68d2de0b0000 rw-p 00000000 00:00 0 [anon:Ruby:GC:default:heap_page_body_allocate] 68d2de0b0000-68d2de0c0000 ---p 00000000 00:00 0 68d2de0c0000-68d2de1c0000 rw-p 00000000 00:00 0 68d2de1c0000-68d2de1f0000 rw-p 00000000 00:00 0 [anon:Ruby:GC:default:heap_page_body_allocate] 68d2de1f0000-68d2de200000 ---p 00000000 00:00 0 68d2de200000-68d2dea00000 rw-p 00000000 00:00 0 68d2dea00000-68d2f6a00000 rw-p 00000000 00:00 0 [anon:Ruby:Init_default_shapes:shape_cache] 68d2f6a00000-68d2f7e00000 rw-p 00000000 00:00 0 [anon:Ruby:Init_default_shapes:shape_list] 68d2f7e00000-68d2f80f0000 r--p 00000000 08:01 5476 /usr/lib/locale/locale-archive 68d2f80f0000-68d2f8200000 rw-p 00000000 00:00 0 68d2f8200000-68d2f8460000 r-xp 00000000 08:01 25968 /usr/lib/powerpc64le-linux-gnu/libc.so.6 68d2f8460000-68d2f8470000 r--p 00260000 08:01 25968 /usr/lib/powerpc64le-linux-gnu/libc.so.6 68d2f8470000-68d2f8480000 rw-p 00270000 08:01 25968 /usr/lib/powerpc64le-linux-gnu/libc.so.6 68d2f8490000-68d2f84c0000 rw-p 00000000 00:00 0 68d2f84c0000-68d2f84d0000 rw-p 00000000 00:00 0 [anon:Ruby:GC:default:heap_page_body_allocate] 68d2f84e0000-68d2f8550000 rw-p 00000000 00:00 0 [anon:Ruby:GC:default:heap_page_body_allocate] 68d2f8550000-68d2f85b0000 r--p 00000000 08:01 26004 /usr/lib/locale/C.utf8/LC_CTYPE 68d2f85b0000-68d2f86e0000 r-xp 00000000 08:01 25971 /usr/lib/powerpc64le-linux-gnu/libm.so.6 68d2f86e0000-68d2f86f0000 r--p 00130000 08:01 25971 /usr/lib/powerpc64le-linux-gnu/libm.so.6 68d2f86f0000-68d2f8700000 rw-p 00140000 08:01 25971 /usr/lib/powerpc64le-linux-gnu/libm.so.6 68d2f8700000-68d2f8740000 r-xp 00000000 08:01 5029 /usr/lib/powerpc64le-linux-gnu/libcrypt.so.1.1.0 68d2f8740000-68d2f8750000 r--p 00030000 08:01 5029 /usr/lib/powerpc64le-linux-gnu/libcrypt.so.1.1.0 68d2f8750000-68d2f8760000 rw-p 00040000 08:01 5029 /usr/lib/powerpc64le-linux-gnu/libcrypt.so.1.1.0 68d2f8760000-68d2f8800000 r-xp 00000000 08:01 27939 /usr/lib/powerpc64le-linux-gnu/libgmp.so.10.5.0 68d2f8800000-68d2f8810000 r--p 00090000 08:01 27939 /usr/lib/powerpc64le-linux-gnu/libgmp.so.10.5.0 68d2f8810000-68d2f8820000 rw-p 000a0000 08:01 27939 /usr/lib/powerpc64le-linux-gnu/libgmp.so.10.5.0 68d2f8820000-68d2f8850000 r-xp 00000000 08:01 23504 /usr/lib/powerpc64le-linux-gnu/libz.so.1.3 68d2f8850000-68d2f8860000 r--p 00020000 08:01 23504 /usr/lib/powerpc64le-linux-gnu/libz.so.1.3 68d2f8860000-68d2f8870000 rw-p 00030000 08:01 23504 /usr/lib/powerpc64le-linux-gnu/libz.so.1.3 68d2f8870000-68d2f8880000 r--s 00000000 08:01 25957 /usr/lib/powerpc64le-linux-gnu/gconv/gconv-modules.cache 68d2f8880000-68d2f88a0000 r--p 00000000 00:00 0 [vvar] 68d2f88a0000-68d2f88b0000 r-xp 00000000 00:00 0 [vdso] 68d2f88b0000-68d2f8900000 r-xp 00000000 08:01 25965 /usr/lib/powerpc64le-linux-gnu/ld64.so.2 68d2f8900000-68d2f8910000 r--p 00040000 08:01 25965 /usr/lib/powerpc64le-linux-gnu/ld64.so.2 68d2f8910000-68d2f8920000 rw-p 00050000 08:01 25965 /usr/lib/powerpc64le-linux-gnu/ld64.so.2 7fffe3520000-7fffe3550000 rw-p 00000000 00:00 0 [stack] make: *** [uncommon.mk:1430: run] Aborted (core dumped) ``` ## Debugging on gdb ``` $ make gdb TESTRUN_SCRIPT=test_ractor_1.rb gdb -x run.gdb --quiet --args ./miniruby -I./lib -I. -I.ext/common test_ractor_1.rb Reading symbols from ./miniruby... warning: File "/home/jaruga/git/ruby/ruby/.gdbinit" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load". To enable execution of this file add add-auto-load-safe-path /home/jaruga/git/ruby/ruby/.gdbinit line to your configuration file "/home/jaruga/.config/gdb/gdbinit". To completely disable this security protection add set auto-load safe-path / line to your configuration file "/home/jaruga/.config/gdb/gdbinit". For more information about this security protection see the "Auto-loading safe path" section in the GDB manual. E.g., run from the shell: info "(gdb)Auto-loading safe path" Breakpoint 1 at 0x32acc: file error.c, line 1190. Breakpoint 2 at 0x32d30: file error.c, line 1112. Breakpoint 3 at 0x108820: file debug.c, line 168. warning: ./breakpoints.gdb: No such file or directory This GDB supports auto-downloading debuginfo from the following URLs: <https://debuginfod.ubuntu.com> Enable debuginfod for this session? (y or [n]) [answered N; input not from terminal] Debuginfod has been disabled. To make this setting permanent, add 'set debuginfod enabled off' to .gdbinit. [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/powerpc64le-linux-gnu/libthread_db.so.1". [New Thread 0x7fffddfff100 (LWP 3470199)] "[1]" test_ractor_1.rb:6: warning: Ractor is experimental, and the behavior may change in future versions of Ruby! Also there are many implementation issues. [New Thread 0x7fffdd7ef100 (LWP 3470200)] [New Thread 0x7fffbbdff100 (LWP 3470201)] "[1, 3]" "[1, 3, 2]" [Switching to Thread 0x7fffbbdff100 (LWP 3470201)] Thread 4 "miniruby" hit Breakpoint 1, 0x0000000100032acc in rb_assert_failure ( file=file@entry=0x100514e48 "vm_core.h", line=line@entry=2017, name=name@entry=0x100573a28 <__func__.2> "rb_current_execution_context", expr=expr@entry=0x10050f5e0 "ec == rb_current_ec_noinline()") at error.c:1190 1190 { (gdb) r The program being debugged has been started already. Start it from the beginning? (y or n) y Starting program: /home/jaruga/git/ruby/ruby/miniruby -I./lib -I. -I.ext/common test_ractor_1.rb [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/powerpc64le-linux-gnu/libthread_db.so.1". [New Thread 0x7fffddfff100 (LWP 3470207)] "[1]" test_ractor_1.rb:6: warning: Ractor is experimental, and the behavior may change in future versions of Ruby! Also there are many implementation issues. [New Thread 0x7fffdd7ef100 (LWP 3470208)] [New Thread 0x7fffbbdff100 (LWP 3470209)] "[1, 3]" "[1, 3, 2]" [Switching to Thread 0x7fffbbdff100 (LWP 3470209)] Thread 4 "miniruby" hit Breakpoint 1, 0x0000000100032acc in rb_assert_failure ( file=file@entry=0x100514e48 "vm_core.h", line=line@entry=2017, name=name@entry=0x100573a28 <__func__.2> "rb_current_execution_context", expr=expr@entry=0x10050f5e0 "ec == rb_current_ec_noinline()") at error.c:1190 1190 { ``` ``` (gdb) bt #0 0x0000000100032acc in rb_assert_failure (file=file@entry=0x100514e48 "vm_core.h", line=line@entry=2017, name=name@entry=0x100573a28 <__func__.2> "rb_current_execution_context", expr=expr@entry=0x10050f5e0 "ec == rb_current_ec_noinline()") at error.c:1190 #1 0x0000000100036574 in rb_current_execution_context (expect_ec=true) at vm_core.h:2017 #2 0x00000001002b2720 in rb_current_execution_context (expect_ec=true) at ractor_sync.c:826 #3 rb_current_ractor_raw (expect=true) at vm_core.h:2039 #4 rb_current_ractor_raw (expect=<optimized out>) at vm_core.h:2033 #5 rb_current_ractor () at vm_core.h:2047 #6 rb_current_ractor () at vm_core.h:2045 #7 ractor_queue_deq (rq=0x10082d680, r=<optimized out>) at ractor_sync.c:339 #8 ractor_try_receive (ec=0x10080ed30, rp=<optimized out>, cr=<optimized out>) at ractor_sync.c:1137 #9 ractor_receive (rp=<optimized out>, ec=<optimized out>) at ractor_sync.c:1160 #10 ractor_port_receive (ec=0x10080ed30, ec@entry=<error reading variable: value has been optimized out>, self=<error reading variable: value has been optimized out>) at ractor_sync.c:142 #11 0x00000001003ec3f4 in builtin_invoker0 (ec=<optimized out>, self=<optimized out>, argv=<optimized out>, funcptr=<optimized out>) at vm_insnhelper.c:7344 #12 0x00000001003fd968 in invoke_bf (ec=0x10080ed30, reg_cfp=0x7fffbc11ff20, bf=0x1006a9678 <ractor_table+552>, argv=0x0) at vm_insnhelper.c:7485 #13 0x0000000100429e08 in vm_invoke_builtin_delegate (start_index=<optimized out>, bf=<optimized out>, cfp=<optimized out>, ec=<optimized out>) at vm_insnhelper.c:7509 #14 vm_exec_core (ec=0x10080ed30) at insns.def:1698 #15 0x000000010041af08 in rb_vm_exec (ec=0x10080ed30) at vm.c:2621 #16 0x00000001003a6154 in thread_do_start_proc (th=th@entry=0x10082d6a0) at thread.c:584 #17 0x00000001003a68c8 in thread_do_start (th=0x10082d6a0) at thread.c:626 #18 thread_start_func_2 (th=th@entry=0x10082d6a0, stack_start=<optimized out>) at thread.c:677 #19 0x00000001003a7104 in call_thread_start_func_2 (th=<optimized out>) at thread_pthread.c:2237 #20 co_start (from=<optimized out>, self=0x10082d960) at thread_pthread_mn.c:458 Backtrace stopped: previous frame identical to this frame (corrupt stack?) ``` In the stacktrace info, the ractor_sync.c:142 is below. https://github.com/ruby/ruby/blob/f3206cc79bec2fd852e81ec56de59f0a67ab32b7/r... The ractor_sync.c:826 is below. https://github.com/ruby/ruby/blob/f3206cc79bec2fd852e81ec56de59f0a67ab32b7/r... ## RubyCI Ubuntu (ppc64le) passing Interestingly, it seems that this core dump doesn't happen on the RubyCI Ubuntu (ppc64le) server, for example on the following log. I don't know why this core dump doesn't happen on the server. https://rubyci.s3.amazonaws.com/ppc64le/ruby-master/log/20250807T130006Z.log... -- https://bugs.ruby-lang.org/

Issue #21534 has been updated by jaruga (Jun Aruga). I noticed that the `cppflags=-DRUBY_DEBUG` used for the `configure` option caused the above error. I tested the following 2 cases at the latest master branch commit <c30d900547a65c7996a3f868aa17d2a842734071> on the RubyCI Ubuntu (ppc64le) server, and found the 1st case failed with the above error, and 2nd case passed. ``` $ uname -m ppc64le ``` ``` $ git clean -fdx $ ./autogen.sh $ ./configure cppflags=-DRUBY_DEBUG $ make -j4 $ make btest BTESTS=bootstraptest/test_ractor.rb => error ``` ``` $ git clean -fdx $ ./autogen.sh $ ./configure $ make -j4 $ make btest BTESTS=bootstraptest/test_ractor.rb ... PASS all 147 tests ``` I don't understand why the `cppflags=-DRUBY_DEBUG` is set there in the `ubuntu.yml`. https://github.com/ruby/ruby/blob/c30d900547a65c7996a3f868aa17d2a842734071/.... ---------------------------------------- Bug #21534: ppc64le bootstraptest/test_ractor.rb ractor_port_receive aborted (core dumped) https://bugs.ruby-lang.org/issues/21534#change-114271 * Author: jaruga (Jun Aruga) * Status: Open * Assignee: ractor * Backport: 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN ---------------------------------------- I am seeing the following errors in the Ubuntu 24.04 noble server "Ubuntu (ppc64le)" on RubyCI on the relatively latest master branch commit `f3206cc79bec2fd852e81ec56de59f0a67ab32b7`. Originally I found the errors at <https://github.com/ruby/ruby/pull/13972#issuecomment-3160768404>. ## Reproducing the errors ``` $ grep ^VERSION /etc/os-release VERSION_ID="24.04" VERSION="24.04.3 LTS (Noble Numbat)" VERSION_CODENAME=noble $ uname -m ppc64le $ uname -r 6.8.0-71-generic ``` ``` $ pwd /home/jaruga/git/ruby/ruby ``` The following `configure` script's options comes from the `.github/workflows/ubuntu.yml`. https://github.com/ruby/ruby/blob/24d0b458cd6ccde1e052c1db15af120def349693/.... ``` $ ./autogen.sh $ ./configure -C --disable-install-doc cppflags=-DRUBY_DEBUG $ make -j4 ``` Then the 2 assertions in the following tests always fail. ``` $ make btest BTESTS=bootstraptest/test_ractor.rb ... #65 test_ractor.rb:1016: ... #92 test_ractor.rb:1451: ... FAIL 2/147 tests failed make: *** [uncommon.mk:913: yes-btest] Error 1 ``` ``` $ make btest-ruby BTESTS=bootstraptest/test_ractor.rb ... #65 test_ractor.rb:1016: ... #92 test_ractor.rb:1451: ... FAIL 2/145 tests failed make: *** [uncommon.mk:921: yes-btest-ruby] Error 1 ``` And the `test_ractor_1.rb` is a minimal reproducer so far I found for the 1st failing assertion. ``` $ cat test_ractor_1.rb # Ractor.count counts = [] counts << Ractor.count p counts.inspect ractors = (1..2).map { Ractor.new { Ractor.receive } } counts << Ractor.count p counts.inspect ractors[0].send('End 0').join sleep 0.1 until ractors[0].inspect =~ /terminated/ counts << Ractor.count p counts.inspect ractors[1].send('End 1').join sleep 0.1 until ractors[1].inspect =~ /terminated/ counts << Ractor.count p counts.inspect ``` Then the following test fails once in 2 or 3 times. Below is a passing case. ``` $ make run TESTRUN_SCRIPT=test_ractor_1.rb ./miniruby -I./lib -I. -I.ext/common -r./powerpc64le-linux-fake test_ractor_1.rb "[1]" test_ractor_1.rb:6: warning: Ractor is experimental, and the behavior may change in future versions of Ruby! Also there are many implementation issues. "[1, 3]" "[1, 3, 2]" "[1, 3, 2, 1]" ``` Below is a failing (aborting) case. ``` $ make run TESTRUN_SCRIPT=test_ractor_1.rb ./miniruby -I./lib -I. -I.ext/common -r./powerpc64le-linux-fake test_ractor_1.rb "[1]" test_ractor_1.rb:6: warning: Ractor is experimental, and the behavior may change in future versions of Ruby! Also there are many implementation issues. "[1, 3]" vm_core.h:2017: Assertion Failed: rb_current_execution_context:ec == rb_current_ec_noinline() ruby 3.5.0dev (2025-08-06T15:07:49Z master f3206cc79b) +PRISM [powerpc64le-linux] -- Control frame information ----------------------------------------------- c:0004 p:0003 s:0014 e:000013 METHOD <internal:ractor>:667 c:0003 p:0008 s:0010 e:000009 METHOD <internal:ractor>:313 c:0002 p:0004 s:0006 e:000005 BLOCK test_ractor_1.rb:6 [FINISH] c:0001 p:---- s:0003 e:000002 DUMMY [FINISH] -- Ruby level backtrace information ---------------------------------------- test_ractor_1.rb:6:in 'block (2 levels) in <main>' <internal:ractor>:313:in 'receive' <internal:ractor>:667:in 'receive' -- Threading information --------------------------------------------------- Total ractor count: 3 Ruby thread count for this ractor: 1 -- C level backtrace information ------------------------------------------- /home/jaruga/git/ruby/ruby/miniruby(rb_print_backtrace+0x8) [0x10a262075e10] vm_dump.c:843 /home/jaruga/git/ruby/ruby/miniruby(rb_vm_bugreport) vm_dump.c:1175 /home/jaruga/git/ruby/ruby/miniruby(rb_assert_failure_detail+0x12c) [0x10a261c62aa0] error.c:1215 /home/jaruga/git/ruby/ruby/miniruby(rb_assert_failure+0x1c) [0x10a261c62ae0] error.c:1191 /home/jaruga/git/ruby/ruby/miniruby(rb_current_execution_context+0x34) [0x10a261c66574] vm_core.h:2017 /home/jaruga/git/ruby/ruby/miniruby(ractor_basket_value+0x0) [0x10a261ee2720] ractor_sync.c:826 /home/jaruga/git/ruby/ruby/miniruby(ractor_basket_accept) ractor_sync.c:833 /home/jaruga/git/ruby/ruby/miniruby(ractor_try_receive) ractor_sync.c:1144 /home/jaruga/git/ruby/ruby/miniruby(ractor_receive) ractor_sync.c:1160 /home/jaruga/git/ruby/ruby/miniruby(ractor_port_receive) ractor_sync.c:142 /home/jaruga/git/ruby/ruby/miniruby(builtin_invoker0+0x24) [0x10a26201c3f4] vm_insnhelper.c:7344 /home/jaruga/git/ruby/ruby/miniruby(invoke_bf+0x128) [0x10a26202d968] vm_insnhelper.c:7485 /home/jaruga/git/ruby/ruby/miniruby(vm_invoke_builtin_delegate+0x1c) [0x10a262059e08] vm_insnhelper.c:7509 /home/jaruga/git/ruby/ruby/miniruby(vm_exec_core) insns.def:1698 /home/jaruga/git/ruby/ruby/miniruby(vm_exec_loop+0x0) [0x10a26204af08] vm.c:2621 /home/jaruga/git/ruby/ruby/miniruby(rb_vm_exec) vm.c:2624 /home/jaruga/git/ruby/ruby/miniruby(thread_do_start_proc+0x394) [0x10a261fd6154] thread.c:584 /home/jaruga/git/ruby/ruby/miniruby(thread_do_start+0x8) [0x10a261fd68c8] thread.c:626 /home/jaruga/git/ruby/ruby/miniruby(thread_start_func_2) thread.c:677 /home/jaruga/git/ruby/ruby/miniruby(thread_sched_lock_+0x0) [0x10a261fd7104] thread_pthread.c:2237 /home/jaruga/git/ruby/ruby/miniruby(co_start) thread_pthread_mn.c:460 /home/jaruga/git/ruby/ruby/miniruby(co_start+0x8) [0x10a261fd7028] thread_pthread_mn.c:439 -- Other runtime information ----------------------------------------------- * Loaded script: test_ractor_1.rb * Loaded features: 0 enumerator.so 1 thread.rb 2 fiber.so 3 rational.so 4 complex.so 5 pathname.so 6 ruby2_keywords.rb 7 set.rb 8 /home/jaruga/git/ruby/ruby/powerpc64le-linux-fake.rb * Process memory map: 10a261c30000-10a2622d0000 r-xp 00000000 08:01 1279300 /home/jaruga/git/ruby/ruby/miniruby 10a2622d0000-10a2622e0000 r--p 00690000 08:01 1279300 /home/jaruga/git/ruby/ruby/miniruby 10a2622e0000-10a2622f0000 rw-p 006a0000 08:01 1279300 /home/jaruga/git/ruby/ruby/miniruby 10a2622f0000-10a262300000 rw-p 00000000 00:00 0 10a279e90000-10a27a030000 rw-p 00000000 00:00 0 [heap] 68d2b0000000-68d2b0030000 rw-p 00000000 00:00 0 68d2b0030000-68d2b4000000 ---p 00000000 00:00 0 68d2b8000000-68d2b8030000 rw-p 00000000 00:00 0 68d2b8030000-68d2bc000000 ---p 00000000 00:00 0 68d2bc6f0000-68d2bc700000 ---p 00000000 00:00 0 68d2bc700000-68d2bc800000 rw-p 00000000 00:00 0 68d2bc800000-68d2bc910000 rw-p 00000000 00:00 0 [anon:Ruby:nt_alloc_thread_stack_chunk] 68d2bc910000-68d2bc920000 ---p 00000000 00:00 0 [anon:Ruby:nt_alloc_thread_stack_chunk] 68d2bc920000-68d2bcb20000 rw-p 00000000 00:00 0 [anon:Ruby:nt_alloc_thread_stack_chunk] 68d2bcb20000-68d2bcb30000 ---p 00000000 00:00 0 [anon:Ruby:nt_alloc_thread_stack_chunk] 68d2bcb30000-68d2dc800000 rw-p 00000000 00:00 0 [anon:Ruby:nt_alloc_thread_stack_chunk] 68d2dc800000-68d2dc810000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dc810000-68d2dc8c0000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dc8c0000-68d2dc8d0000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dc8d0000-68d2dc980000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dc980000-68d2dc990000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dc990000-68d2dca40000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dca40000-68d2dca50000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dca50000-68d2dcb00000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dcb00000-68d2dcb10000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dcb10000-68d2dcbc0000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dcbc0000-68d2dcbd0000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dcbd0000-68d2dcc80000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dcc80000-68d2dcc90000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dcc90000-68d2dcd40000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dcd40000-68d2dcd50000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dcd50000-68d2dce00000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dce00000-68d2dce10000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dce10000-68d2dcec0000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dcec0000-68d2dced0000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dced0000-68d2dcf80000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dcf80000-68d2dcf90000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dcf90000-68d2dd040000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd040000-68d2dd050000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd050000-68d2dd100000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd100000-68d2dd110000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd110000-68d2dd1c0000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd1c0000-68d2dd1d0000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd1d0000-68d2dd280000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd280000-68d2dd290000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd290000-68d2dd340000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd340000-68d2dd350000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd350000-68d2dd400000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd400000-68d2dd410000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd410000-68d2dd4c0000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd4c0000-68d2dd4d0000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd4d0000-68d2dd580000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd580000-68d2dd590000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd590000-68d2dd640000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd640000-68d2dd650000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd650000-68d2dd700000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd700000-68d2dd710000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd710000-68d2dd7c0000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd7c0000-68d2dd7d0000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd7d0000-68d2dd880000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd880000-68d2dd890000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd890000-68d2dd940000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd940000-68d2dd950000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dd950000-68d2dda00000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dda00000-68d2dda10000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dda10000-68d2ddac0000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2ddac0000-68d2ddad0000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2ddad0000-68d2ddb80000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2ddb80000-68d2ddb90000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2ddb90000-68d2ddc40000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2ddc40000-68d2ddc50000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2ddc50000-68d2ddd00000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2ddd00000-68d2ddd10000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2ddd10000-68d2dddc0000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dddc0000-68d2dddd0000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dddd0000-68d2dde80000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dde80000-68d2dde90000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2dde90000-68d2ddf40000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2ddf40000-68d2ddf50000 ---p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2ddf50000-68d2de000000 rw-p 00000000 00:00 0 [anon:Ruby:fiber_pool_allocate_memory] 68d2de040000-68d2de060000 r-xp 00000000 08:01 13327 /usr/lib/powerpc64le-linux-gnu/libgcc_s.so.1 68d2de060000-68d2de070000 r--p 00010000 08:01 13327 /usr/lib/powerpc64le-linux-gnu/libgcc_s.so.1 68d2de070000-68d2de080000 rw-p 00020000 08:01 13327 /usr/lib/powerpc64le-linux-gnu/libgcc_s.so.1 68d2de080000-68d2de0b0000 rw-p 00000000 00:00 0 [anon:Ruby:GC:default:heap_page_body_allocate] 68d2de0b0000-68d2de0c0000 ---p 00000000 00:00 0 68d2de0c0000-68d2de1c0000 rw-p 00000000 00:00 0 68d2de1c0000-68d2de1f0000 rw-p 00000000 00:00 0 [anon:Ruby:GC:default:heap_page_body_allocate] 68d2de1f0000-68d2de200000 ---p 00000000 00:00 0 68d2de200000-68d2dea00000 rw-p 00000000 00:00 0 68d2dea00000-68d2f6a00000 rw-p 00000000 00:00 0 [anon:Ruby:Init_default_shapes:shape_cache] 68d2f6a00000-68d2f7e00000 rw-p 00000000 00:00 0 [anon:Ruby:Init_default_shapes:shape_list] 68d2f7e00000-68d2f80f0000 r--p 00000000 08:01 5476 /usr/lib/locale/locale-archive 68d2f80f0000-68d2f8200000 rw-p 00000000 00:00 0 68d2f8200000-68d2f8460000 r-xp 00000000 08:01 25968 /usr/lib/powerpc64le-linux-gnu/libc.so.6 68d2f8460000-68d2f8470000 r--p 00260000 08:01 25968 /usr/lib/powerpc64le-linux-gnu/libc.so.6 68d2f8470000-68d2f8480000 rw-p 00270000 08:01 25968 /usr/lib/powerpc64le-linux-gnu/libc.so.6 68d2f8490000-68d2f84c0000 rw-p 00000000 00:00 0 68d2f84c0000-68d2f84d0000 rw-p 00000000 00:00 0 [anon:Ruby:GC:default:heap_page_body_allocate] 68d2f84e0000-68d2f8550000 rw-p 00000000 00:00 0 [anon:Ruby:GC:default:heap_page_body_allocate] 68d2f8550000-68d2f85b0000 r--p 00000000 08:01 26004 /usr/lib/locale/C.utf8/LC_CTYPE 68d2f85b0000-68d2f86e0000 r-xp 00000000 08:01 25971 /usr/lib/powerpc64le-linux-gnu/libm.so.6 68d2f86e0000-68d2f86f0000 r--p 00130000 08:01 25971 /usr/lib/powerpc64le-linux-gnu/libm.so.6 68d2f86f0000-68d2f8700000 rw-p 00140000 08:01 25971 /usr/lib/powerpc64le-linux-gnu/libm.so.6 68d2f8700000-68d2f8740000 r-xp 00000000 08:01 5029 /usr/lib/powerpc64le-linux-gnu/libcrypt.so.1.1.0 68d2f8740000-68d2f8750000 r--p 00030000 08:01 5029 /usr/lib/powerpc64le-linux-gnu/libcrypt.so.1.1.0 68d2f8750000-68d2f8760000 rw-p 00040000 08:01 5029 /usr/lib/powerpc64le-linux-gnu/libcrypt.so.1.1.0 68d2f8760000-68d2f8800000 r-xp 00000000 08:01 27939 /usr/lib/powerpc64le-linux-gnu/libgmp.so.10.5.0 68d2f8800000-68d2f8810000 r--p 00090000 08:01 27939 /usr/lib/powerpc64le-linux-gnu/libgmp.so.10.5.0 68d2f8810000-68d2f8820000 rw-p 000a0000 08:01 27939 /usr/lib/powerpc64le-linux-gnu/libgmp.so.10.5.0 68d2f8820000-68d2f8850000 r-xp 00000000 08:01 23504 /usr/lib/powerpc64le-linux-gnu/libz.so.1.3 68d2f8850000-68d2f8860000 r--p 00020000 08:01 23504 /usr/lib/powerpc64le-linux-gnu/libz.so.1.3 68d2f8860000-68d2f8870000 rw-p 00030000 08:01 23504 /usr/lib/powerpc64le-linux-gnu/libz.so.1.3 68d2f8870000-68d2f8880000 r--s 00000000 08:01 25957 /usr/lib/powerpc64le-linux-gnu/gconv/gconv-modules.cache 68d2f8880000-68d2f88a0000 r--p 00000000 00:00 0 [vvar] 68d2f88a0000-68d2f88b0000 r-xp 00000000 00:00 0 [vdso] 68d2f88b0000-68d2f8900000 r-xp 00000000 08:01 25965 /usr/lib/powerpc64le-linux-gnu/ld64.so.2 68d2f8900000-68d2f8910000 r--p 00040000 08:01 25965 /usr/lib/powerpc64le-linux-gnu/ld64.so.2 68d2f8910000-68d2f8920000 rw-p 00050000 08:01 25965 /usr/lib/powerpc64le-linux-gnu/ld64.so.2 7fffe3520000-7fffe3550000 rw-p 00000000 00:00 0 [stack] make: *** [uncommon.mk:1430: run] Aborted (core dumped) ``` ## Debugging on gdb ``` $ make gdb TESTRUN_SCRIPT=test_ractor_1.rb gdb -x run.gdb --quiet --args ./miniruby -I./lib -I. -I.ext/common test_ractor_1.rb Reading symbols from ./miniruby... warning: File "/home/jaruga/git/ruby/ruby/.gdbinit" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load". To enable execution of this file add add-auto-load-safe-path /home/jaruga/git/ruby/ruby/.gdbinit line to your configuration file "/home/jaruga/.config/gdb/gdbinit". To completely disable this security protection add set auto-load safe-path / line to your configuration file "/home/jaruga/.config/gdb/gdbinit". For more information about this security protection see the "Auto-loading safe path" section in the GDB manual. E.g., run from the shell: info "(gdb)Auto-loading safe path" Breakpoint 1 at 0x32acc: file error.c, line 1190. Breakpoint 2 at 0x32d30: file error.c, line 1112. Breakpoint 3 at 0x108820: file debug.c, line 168. warning: ./breakpoints.gdb: No such file or directory This GDB supports auto-downloading debuginfo from the following URLs: <https://debuginfod.ubuntu.com> Enable debuginfod for this session? (y or [n]) [answered N; input not from terminal] Debuginfod has been disabled. To make this setting permanent, add 'set debuginfod enabled off' to .gdbinit. [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/powerpc64le-linux-gnu/libthread_db.so.1". [New Thread 0x7fffddfff100 (LWP 3470199)] "[1]" test_ractor_1.rb:6: warning: Ractor is experimental, and the behavior may change in future versions of Ruby! Also there are many implementation issues. [New Thread 0x7fffdd7ef100 (LWP 3470200)] [New Thread 0x7fffbbdff100 (LWP 3470201)] "[1, 3]" "[1, 3, 2]" [Switching to Thread 0x7fffbbdff100 (LWP 3470201)] Thread 4 "miniruby" hit Breakpoint 1, 0x0000000100032acc in rb_assert_failure ( file=file@entry=0x100514e48 "vm_core.h", line=line@entry=2017, name=name@entry=0x100573a28 <__func__.2> "rb_current_execution_context", expr=expr@entry=0x10050f5e0 "ec == rb_current_ec_noinline()") at error.c:1190 1190 { (gdb) r The program being debugged has been started already. Start it from the beginning? (y or n) y Starting program: /home/jaruga/git/ruby/ruby/miniruby -I./lib -I. -I.ext/common test_ractor_1.rb [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/powerpc64le-linux-gnu/libthread_db.so.1". [New Thread 0x7fffddfff100 (LWP 3470207)] "[1]" test_ractor_1.rb:6: warning: Ractor is experimental, and the behavior may change in future versions of Ruby! Also there are many implementation issues. [New Thread 0x7fffdd7ef100 (LWP 3470208)] [New Thread 0x7fffbbdff100 (LWP 3470209)] "[1, 3]" "[1, 3, 2]" [Switching to Thread 0x7fffbbdff100 (LWP 3470209)] Thread 4 "miniruby" hit Breakpoint 1, 0x0000000100032acc in rb_assert_failure ( file=file@entry=0x100514e48 "vm_core.h", line=line@entry=2017, name=name@entry=0x100573a28 <__func__.2> "rb_current_execution_context", expr=expr@entry=0x10050f5e0 "ec == rb_current_ec_noinline()") at error.c:1190 1190 { ``` ``` (gdb) bt #0 0x0000000100032acc in rb_assert_failure (file=file@entry=0x100514e48 "vm_core.h", line=line@entry=2017, name=name@entry=0x100573a28 <__func__.2> "rb_current_execution_context", expr=expr@entry=0x10050f5e0 "ec == rb_current_ec_noinline()") at error.c:1190 #1 0x0000000100036574 in rb_current_execution_context (expect_ec=true) at vm_core.h:2017 #2 0x00000001002b2720 in rb_current_execution_context (expect_ec=true) at ractor_sync.c:826 #3 rb_current_ractor_raw (expect=true) at vm_core.h:2039 #4 rb_current_ractor_raw (expect=<optimized out>) at vm_core.h:2033 #5 rb_current_ractor () at vm_core.h:2047 #6 rb_current_ractor () at vm_core.h:2045 #7 ractor_queue_deq (rq=0x10082d680, r=<optimized out>) at ractor_sync.c:339 #8 ractor_try_receive (ec=0x10080ed30, rp=<optimized out>, cr=<optimized out>) at ractor_sync.c:1137 #9 ractor_receive (rp=<optimized out>, ec=<optimized out>) at ractor_sync.c:1160 #10 ractor_port_receive (ec=0x10080ed30, ec@entry=<error reading variable: value has been optimized out>, self=<error reading variable: value has been optimized out>) at ractor_sync.c:142 #11 0x00000001003ec3f4 in builtin_invoker0 (ec=<optimized out>, self=<optimized out>, argv=<optimized out>, funcptr=<optimized out>) at vm_insnhelper.c:7344 #12 0x00000001003fd968 in invoke_bf (ec=0x10080ed30, reg_cfp=0x7fffbc11ff20, bf=0x1006a9678 <ractor_table+552>, argv=0x0) at vm_insnhelper.c:7485 #13 0x0000000100429e08 in vm_invoke_builtin_delegate (start_index=<optimized out>, bf=<optimized out>, cfp=<optimized out>, ec=<optimized out>) at vm_insnhelper.c:7509 #14 vm_exec_core (ec=0x10080ed30) at insns.def:1698 #15 0x000000010041af08 in rb_vm_exec (ec=0x10080ed30) at vm.c:2621 #16 0x00000001003a6154 in thread_do_start_proc (th=th@entry=0x10082d6a0) at thread.c:584 #17 0x00000001003a68c8 in thread_do_start (th=0x10082d6a0) at thread.c:626 #18 thread_start_func_2 (th=th@entry=0x10082d6a0, stack_start=<optimized out>) at thread.c:677 #19 0x00000001003a7104 in call_thread_start_func_2 (th=<optimized out>) at thread_pthread.c:2237 #20 co_start (from=<optimized out>, self=0x10082d960) at thread_pthread_mn.c:458 Backtrace stopped: previous frame identical to this frame (corrupt stack?) ``` In the stacktrace info, the ractor_sync.c:142 is below. https://github.com/ruby/ruby/blob/f3206cc79bec2fd852e81ec56de59f0a67ab32b7/r... The ractor_sync.c:826 is below. https://github.com/ruby/ruby/blob/f3206cc79bec2fd852e81ec56de59f0a67ab32b7/r... ## RubyCI Ubuntu (ppc64le) passing Interestingly, it seems that this core dump doesn't happen on the RubyCI Ubuntu (ppc64le) server, for example on the following log. I don't know why this core dump doesn't happen on the server. https://rubyci.s3.amazonaws.com/ppc64le/ruby-master/log/20250807T130006Z.log... -- https://bugs.ruby-lang.org/
participants (2)
-
jaruga (Jun Aruga)
-
luke-gru (Luke Gruber)