Project

General

Profile

Bug #21534

Updated by jaruga (Jun Aruga) about 19 hours ago

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/.github/workflows/ubuntu.yml#L92-L93 

 ``` 
 $ ./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/ractor_sync.c#L142 

 The ractor_sync.c:826 is below. 

 https://github.com/ruby/ruby/blob/f3206cc79bec2fd852e81ec56de59f0a67ab32b7/ractor_sync.c#L826 


 ## 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.html.gz 

Back