Actions
Bug #18412
openSegfault in test_ractor.rb
Status:
Open
Assignee:
-
Target version:
-
ruby -v:
ruby 3.0.3p157 (2021-11-24 revision 3fb7d2cadc) [powerpc64le-linux]
Description
During build of Ruby 3.0.3 for Fedora, I sometimes bump into this issue:
... snip ...
test_attr.rb ..
test_autoload.rb ........
test_block.rb ..........................................................
test_class.rb ................................................
test_env.rb ..
test_eval.rb .....................................
test_exception.rb ..................................
test_fiber.rb .....
test_finalizer.rb .
test_flip.rb .
test_flow.rb ..............................................................
test_fork.rb ....
test_gc.rb ..
test_insns.rb ...............................................................................................................................................................................................................................................................................................................................................................................................
test_io.rb .........
test_jump.rb .............................
test_literal.rb ............................................................................................................................................................
test_literal_suffix.rb ................................................
test_load.rb ..
test_marshal.rb .
test_massign.rb ..................................
test_method.rb ...............................................................................................................................................................................................................................
test_objectspace.rb ......
test_proc.rb .....................................
test_ractor.rb .........................................................................................Fstderr output is not empty
<internal:ractor>:627: [BUG] Segmentation fault at 0x0000000000000038
ruby 3.0.3p157 (2021-11-24 revision 3fb7d2cadc) [powerpc64le-linux]
-- Control frame information -----------------------------------------------
c:0005 p:0003 s:0020 e:000019 METHOD <internal:ractor>:627
c:0004 p:0032 s:0013 e:000012 BLOCK bootstraptest.tmp.rb:6 [FINISH]
c:0003 p:---- s:0010 e:000009 CFUNC :loop
c:0002 p:0005 s:0006 e:000005 BLOCK bootstraptest.tmp.rb:4 [FINISH]
c:0001 p:---- s:0003 e:000002 (none) [FINISH]
-- Ruby level backtrace information ----------------------------------------
bootstraptest.tmp.rb:4:in `block (2 levels) in <main>'
bootstraptest.tmp.rb:4:in `loop'
bootstraptest.tmp.rb:6:in `block (3 levels) in <main>'
<internal:ractor>:627:in `yield'
-- C level backtrace information -------------------------------------------
/builddir/build/BUILD/ruby-3.0.3/libruby.so.3.0.3(rb_print_backtrace+0x24) [0x7fffb1dd3604] vm_dump.c:758
/builddir/build/BUILD/ruby-3.0.3/libruby.so.3.0.3(rb_vm_bugreport.constprop.0+0x5c0) [0x7fffb1df1780] vm_dump.c:998
/builddir/build/BUILD/ruby-3.0.3/libruby.so.3.0.3(rb_bug_for_fatal_signal+0xa4) [0x7fffb1bbdc74] error.c:786
/builddir/build/BUILD/ruby-3.0.3/libruby.so.3.0.3(sigsegv+0x68) [0x7fffb1d2a4a8] signal.c:963
[0x7fffb1f80464]
[0x7fffb191ad68]
/builddir/build/BUILD/ruby-3.0.3/libruby.so.3.0.3(rb_native_mutex_lock+0x18) [0x7fffb1d6f558] thread_pthread.c:397
/builddir/build/BUILD/ruby-3.0.3/libruby.so.3.0.3(ractor_select+0x480) [0x7fffb1cda060] ractor.c:61
/builddir/build/BUILD/ruby-3.0.3/libruby.so.3.0.3(builtin_inline_class_627.lto_priv.0+0x50) [0x7fffb1cdaa30] ractor.c:1286
/builddir/build/BUILD/ruby-3.0.3/libruby.so.3.0.3(builtin_invoker0.lto_priv.0+0x24) [0x7fffb1db5624] vm_insnhelper.c:5445
/builddir/build/BUILD/ruby-3.0.3/libruby.so.3.0.3(vm_exec_core.lto_priv.0+0x254c) [0x7fffb1dbfe6c] insns.def:1493
/builddir/build/BUILD/ruby-3.0.3/libruby.so.3.0.3(rb_vm_exec+0x130) [0x7fffb1ddc7e0] vm.c:2172
/builddir/build/BUILD/ruby-3.0.3/libruby.so.3.0.3(loop_i+0x2e4) [0x7fffb1dc7bd4] vm.c:1263
/builddir/build/BUILD/ruby-3.0.3/libruby.so.3.0.3(rb_vrescue2+0xec) [0x7fffb1bbc6cc] eval.c:1019
/builddir/build/BUILD/ruby-3.0.3/libruby.so.3.0.3(rb_rescue2+0x3c) [0x7fffb1bbc8bc] eval.c:996
/builddir/build/BUILD/ruby-3.0.3/libruby.so.3.0.3(rb_f_loop.lto_priv.0+0x58) [0x7fffb1dc87c8] vm_eval.c:1483
/builddir/build/BUILD/ruby-3.0.3/libruby.so.3.0.3(ractor_safe_call_cfunc_0.lto_priv.0+0x24) [0x7fffb1da7904] vm_insnhelper.c:2748
/builddir/build/BUILD/ruby-3.0.3/libruby.so.3.0.3(vm_call_cfunc_with_frame+0x150) [0x7fffb1db2650] vm_insnhelper.c:2931
/builddir/build/BUILD/ruby-3.0.3/libruby.so.3.0.3(vm_sendish.lto_priv.0+0x3dc) [0x7fffb1db7b0c] vm_insnhelper.c:4532
/builddir/build/BUILD/ruby-3.0.3/libruby.so.3.0.3(vm_exec_core.lto_priv.0+0x1890) [0x7fffb1dbf1b0] insns.def:770
/builddir/build/BUILD/ruby-3.0.3/libruby.so.3.0.3(rb_vm_exec+0x130) [0x7fffb1ddc7e0] vm.c:2172
/builddir/build/BUILD/ruby-3.0.3/libruby.so.3.0.3(vm_invoke_proc.lto_priv.0+0x2c0) [0x7fffb1dcfc90] vm.c:1263
/builddir/build/BUILD/ruby-3.0.3/libruby.so.3.0.3(thread_do_start_proc.lto_priv.0+0x5ac) [0x7fffb1d7852c] vm.c:1499
/builddir/build/BUILD/ruby-3.0.3/libruby.so.3.0.3(thread_start_func_2.constprop.0.isra.0+0x958) [0x7fffb1dfacf8] thread.c:759
/builddir/build/BUILD/ruby-3.0.3/libruby.so.3.0.3(thread_start_func_1+0x180) [0x7fffb1d70070] thread_pthread.c:994
[0x7fffb1916264]
[0x7fffb19c5f30]
-- Other runtime information -----------------------------------------------
* Loaded script: bootstraptest.tmp.rb
* Loaded features:
0 enumerator.so
1 thread.rb
2 rational.so
3 complex.so
4 ruby2_keywords.rb
5 /builddir/build/BUILD/ruby-3.0.3/.ext/powerpc64le-linux/enc/encdb.so
6 /builddir/build/BUILD/ruby-3.0.3/.ext/powerpc64le-linux/enc/trans/transdb.so
7 /builddir/build/BUILD/ruby-3.0.3/abrt.rb
* Process memory map:
102330000-102340000 r--p 00000000 fc:06 1076662947 /builddir/build/BUILD/ruby-3.0.3/ruby
102340000-102350000 r-xp 00010000 fc:06 1076662947 /builddir/build/BUILD/ruby-3.0.3/ruby
102350000-102360000 r--p 00020000 fc:06 1076662947 /builddir/build/BUILD/ruby-3.0.3/ruby
102360000-102370000 r--p 00020000 fc:06 1076662947 /builddir/build/BUILD/ruby-3.0.3/ruby
102370000-102380000 rw-p 00030000 fc:06 1076662947 /builddir/build/BUILD/ruby-3.0.3/ruby
134320000-134530000 rw-p 00000000 00:00 0 [heap]
7fff88000000-7fff88bd0000 rw-p 00000000 00:00 0
7fff88bd0000-7fff8c000000 ---p 00000000 00:00 0
7fff8c000000-7fff8cd90000 rw-p 00000000 00:00 0
7fff8cd90000-7fff90000000 ---p 00000000 00:00 0
7fff90000000-7fff901e0000 rw-p 00000000 00:00 0
7fff901e0000-7fff94000000 ---p 00000000 00:00 0
7fff94000000-7fff94be0000 rw-p 00000000 00:00 0
7fff94be0000-7fff98000000 ---p 00000000 00:00 0
7fff98000000-7fff99320000 rw-p 00000000 00:00 0
7fff99320000-7fff9c000000 ---p 00000000 00:00 0
7fff9c000000-7fff9cc40000 rw-p 00000000 00:00 0
7fff9cc40000-7fffa0000000 ---p 00000000 00:00 0
7fffa0000000-7fffa0d60000 rw-p 00000000 00:00 0
7fffa0d60000-7fffa4000000 ---p 00000000 00:00 0
7fffa7ed0000-7fffa7ee0000 ---p 00000000 00:00 0
7fffa7ee0000-7fffa8000000 rw-p 00000000 00:00 0
7fffa8000000-7fffa91a0000 rw-p 00000000 00:00 0
7fffa91a0000-7fffac000000 ---p 00000000 00:00 0
7fffada60000-7fffadaa0000 r--s 00000000 fc:06 1076662947 /builddir/build/BUILD/ruby-3.0.3/ruby
7fffadaa0000-7fffadab0000 r--p 00000000 fc:06 1614754146 /usr/lib64/libgcc_s-11-20211203.so.1
7fffadab0000-7fffadac0000 r-xp 00010000 fc:06 1614754146 /usr/lib64/libgcc_s-11-20211203.so.1
7fffadac0000-7fffadad0000 r--p 00020000 fc:06 1614754146 /usr/lib64/libgcc_s-11-20211203.so.1
7fffadad0000-7fffadae0000 r--p 00020000 fc:06 1614754146 /usr/lib64/libgcc_s-11-20211203.so.1
7fffadae0000-7fffadaf0000 rw-p 00030000 fc:06 1614754146 /usr/lib64/libgcc_s-11-20211203.so.1
7fffadaf0000-7fffadb00000 ---p 00000000 00:00 0
7fffadb00000-7fffadc20000 rw-p 00000000 00:00 0
7fffadc20000-7fffadc30000 ---p 00000000 00:00 0
7fffadc30000-7fffadd50000 rw-p 00000000 00:00 0
7fffadd50000-7fffadd60000 ---p 00000000 00:00 0
7fffadd60000-7fffade80000 rw-p 00000000 00:00 0
7fffade80000-7fffade90000 ---p 00000000 00:00 0
7fffade90000-7fffadfb0000 rw-p 00000000 00:00 0
7fffadfb0000-7fffadfc0000 ---p 00000000 00:00 0
7fffadfc0000-7fffae0e0000 rw-p 00000000 00:00 0
7fffae0e0000-7fffae0f0000 ---p 00000000 00:00 0
7fffae0f0000-7fffae210000 rw-p 00000000 00:00 0
7fffae210000-7fffae220000 ---p 00000000 00:00 0
7fffae220000-7fffae340000 rw-p 00000000 00:00 0
7fffae340000-7fffae350000 r--p 00000000 fc:06 1616770133 /builddir/build/BUILD/ruby-3.0.3/.ext/powerpc64le-linux/enc/trans/transdb.so
7fffae350000-7fffae360000 r-xp 00010000 fc:06 1616770133 /builddir/build/BUILD/ruby-3.0.3/.ext/powerpc64le-linux/enc/trans/transdb.so
7fffae360000-7fffae370000 r--p 00020000 fc:06 1616770133 /builddir/build/BUILD/ruby-3.0.3/.ext/powerpc64le-linux/enc/trans/transdb.so
7fffae370000-7fffae380000 r--p 00020000 fc:06 1616770133 /builddir/build/BUILD/ruby-3.0.3/.ext/powerpc64le-linux/enc/trans/transdb.so
7fffae380000-7fffae390000 rw-p 00000000 00:00 0
7fffae390000-7fffae3a0000 r--p 00000000 fc:06 1076646137 /builddir/build/BUILD/ruby-3.0.3/.ext/powerpc64le-linux/enc/encdb.so
7fffae3a0000-7fffae3b0000 r-xp 00010000 fc:06 1076646137 /builddir/build/BUILD/ruby-3.0.3/.ext/powerpc64le-linux/enc/encdb.so
7fffae3b0000-7fffae3c0000 r--p 00020000 fc:06 1076646137 /builddir/build/BUILD/ruby-3.0.3/.ext/powerpc64le-linux/enc/encdb.so
7fffae3c0000-7fffae3d0000 r--p 00020000 fc:06 1076646137 /builddir/build/BUILD/ruby-3.0.3/.ext/powerpc64le-linux/enc/encdb.so
7fffae3d0000-7fffae3e0000 rw-p 00000000 00:00 0
7fffae3e0000-7fffae3f0000 ---p 00000000 00:00 0
7fffae3f0000-7fffae460000 rw-p 00000000 00:00 0
7fffae460000-7fffae470000 ---p 00000000 00:00 0
7fffae470000-7fffae4e0000 rw-p 00000000 00:00 0
7fffae4e0000-7fffae4f0000 ---p 00000000 00:00 0
7fffae4f0000-7fffae560000 rw-p 00000000 00:00 0
7fffae560000-7fffae570000 ---p 00000000 00:00 0
7fffae570000-7fffae5e0000 rw-p 00000000 00:00 0
7fffae5e0000-7fffae5f0000 ---p 00000000 00:00 0
7fffae5f0000-7fffae660000 rw-p 00000000 00:00 0
7fffae660000-7fffae670000 ---p 00000000 00:00 0
7fffae670000-7fffae6e0000 rw-p 00000000 00:00 0
7fffae6e0000-7fffae6f0000 ---p 00000000 00:00 0
7fffae6f0000-7fffae760000 rw-p 00000000 00:00 0
7fffae760000-7fffae770000 ---p 00000000 00:00 0
7fffae770000-7fffae7e0000 rw-p 00000000 00:00 0
7fffae7e0000-7fffae7f0000 ---p 00000000 00:00 0
7fffae7f0000-7fffae860000 rw-p 00000000 00:00 0
7fffae860000-7fffae870000 ---p 00000000 00:00 0
7fffae870000-7fffae8e0000 rw-p 00000000 00:00 0
7fffae8e0000-7fffae8f0000 ---p 00000000 00:00 0
7fffae8f0000-7fffae960000 rw-p 00000000 00:00 0
7fffae960000-7fffae970000 ---p 00000000 00:00 0
7fffae970000-7fffae9e0000 rw-p 00000000 00:00 0
7fffae9e0000-7fffae9f0000 ---p 00000000 00:00 0
7fffae9f0000-7fffaea60000 rw-p 00000000 00:00 0
7fffaea60000-7fffaea70000 ---p 00000000 00:00 0
7fffaea70000-7fffaeae0000 rw-p 00000000 00:00 0
7fffaeae0000-7fffaeaf0000 ---p 00000000 00:00 0
7fffaeaf0000-7fffaeb60000 rw-p 00000000 00:00 0
7fffaeb60000-7fffaeb70000 ---p 00000000 00:00 0
7fffaeb70000-7fffaebe0000 rw-p 00000000 00:00 0
7fffaebe0000-7fffaebf0000 ---p 00000000 00:00 0
7fffaebf0000-7fffaec60000 rw-p 00000000 00:00 0
7fffaec60000-7fffaec70000 ---p 00000000 00:00 0
7fffaec70000-7fffaece0000 rw-p 00000000 00:00 0
7fffaece0000-7fffaecf0000 ---p 00000000 00:00 0
7fffaecf0000-7fffaed60000 rw-p 00000000 00:00 0
7fffaed60000-7fffaed70000 ---p 00000000 00:00 0
7fffaed70000-7fffaede0000 rw-p 00000000 00:00 0
7fffaede0000-7fffaedf0000 ---p 00000000 00:00 0
7fffaedf0000-7fffaee60000 rw-p 00000000 00:00 0
7fffaee60000-7fffaee70000 ---p 00000000 00:00 0
7fffaee70000-7fffaeee0000 rw-p 00000000 00:00 0
7fffaeee0000-7fffaeef0000 ---p 00000000 00:00 0
7fffaeef0000-7fffaef60000 rw-p 00000000 00:00 0
7fffaef60000-7fffaef70000 ---p 00000000 00:00 0
7fffaef70000-7fffaefe0000 rw-p 00000000 00:00 0
7fffaefe0000-7fffaeff0000 ---p 00000000 00:00 0
7fffaeff0000-7fffaf060000 rw-p 00000000 00:00 0
7fffaf060000-7fffaf070000 ---p 00000000 00:00 0
7fffaf070000-7fffaf0e0000 rw-p 00000000 00:00 0
7fffaf0e0000-7fffaf0f0000 ---p 00000000 00:00 0
7fffaf0f0000-7fffaf160000 rw-p 00000000 00:00 0
7fffaf160000-7fffaf170000 ---p 00000000 00:00 0
7fffaf170000-7fffaf1e0000 rw-p 00000000 00:00 0
7fffaf1e0000-7fffaf1f0000 ---p 00000000 00:00 0
7fffaf1f0000-7fffaf260000 rw-p 00000000 00:00 0
7fffaf260000-7fffaf270000 ---p 00000000 00:00 0
7fffaf270000-7fffaf2e0000 rw-p 00000000 00:00 0
7fffaf2e0000-7fffaf2f0000 ---p 00000000 00:00 0
7fffaf2f0000-7fffaf360000 rw-p 00000000 00:00 0
7fffaf360000-7fffaf370000 ---p 00000000 00:00 0
7fffaf370000-7fffb1570000 rw-p 00000000 00:00 0
7fffb1570000-7fffb1590000 r--p 00000000 fc:06 1615030600 /usr/lib64/libm.so.6
7fffb1590000-7fffb1650000 r-xp 00020000 fc:06 1615030600 /usr/lib64/libm.so.6
7fffb1650000-7fffb16b0000 r--p 000e0000 fc:06 1615030600 /usr/lib64/libm.so.6
7fffb16b0000-7fffb16c0000 r--p 00130000 fc:06 1615030600 /usr/lib64/libm.so.6
7fffb16c0000-7fffb16d0000 rw-p 00140000 fc:06 1615030600 /usr/lib64/libm.so.6
7fffb16d0000-7fffb16e0000 r--p 00000000 fc:06 1615031006 /usr/lib64/libcrypt.so.2.0.0
7fffb16e0000-7fffb1700000 r-xp 00010000 fc:06 1615031006 /usr/lib64/libcrypt.so.2.0.0
7fffb1700000-7fffb1720000 r--p 00030000 fc:06 1615031006 /usr/lib64/libcrypt.so.2.0.0
7fffb1720000-7fffb1730000 r--p 00040000 fc:06 1615031006 /usr/lib64/libcrypt.so.2.0.0
7fffb1730000-7fffb1740000 rw-p 00000000 00:00 0
7fffb1740000-7fffb1750000 r--p 00000000 fc:06 1615031014 /usr/lib64/libgmp.so.10.4.1
7fffb1750000-7fffb17d0000 r-xp 00010000 fc:06 1615031014 /usr/lib64/libgmp.so.10.4.1
7fffb17d0000-7fffb17f0000 r--p 00090000 fc:06 1615031014 /usr/lib64/libgmp.so.10.4.1
7fffb17f0000-7fffb1800000 r--p 000a0000 fc:06 1615031014 /usr/lib64/libgmp.so.10.4.1
7fffb1800000-7fffb1810000 rw-p 000b0000 fc:06 1615031014 /usr/lib64/libgmp.so.10.4.1
7fffb1810000-7fffb1830000 r-xp 00000000 fc:06 1615030899 /usr/lib64/libz.so.1.2.11
7fffb1830000-7fffb1840000 r--p 00010000 fc:06 1615030899 /usr/lib64/libz.so.1.2.11
7fffb1840000-7fffb1850000 rw-p 00020000 fc:06 1615030899 /usr/lib64/libz.so.1.2.11
7fffb1850000-7fffb1890000 r--p 00000000 fc:06 1615030597 /usr/lib64/libc.so.6
7fffb1890000-7fffb1a40000 r-xp 00040000 fc:06 1615030597 /usr/lib64/libc.so.6
7fffb1a40000-7fffb1ab0000 r--p 001f0000 fc:06 1615030597 /usr/lib64/libc.so.6
7fffb1ab0000-7fffb1ac0000 r--p 00250000 fc:06 1615030597 /usr/lib64/libc.so.6
7fffb1ac0000-7fffb1ad0000 rw-p 00260000 fc:06 1615030597 /usr/lib64/libc.so.6
7fffb1ae0000-7fffb1b20000 r--p 00000000 fc:06 1077936030 /builddir/build/BUILD/ruby-3.0.3/libruby.so.3.0.3
7fffb1b20000-7fffb1e10000 r-xp 00040000 fc:06 1077936030 /builddir/build/BUILD/ruby-3.0.3/libruby.so.3.0.3
7fffb1e10000-7fffb1f20000 r--p 00330000 fc:06 1077936030 /builddir/build/BUILD/ruby-3.0.3/libruby.so.3.0.3
7fffb1f20000-7fffb1f30000 ---p 00440000 fc:06 1077936030 /builddir/build/BUILD/ruby-3.0.3/libruby.so.3.0.3
7fffb1f30000-7fffb1f40000 r--p 00440000 fc:06 1077936030 /builddir/build/BUILD/ruby-3.0.3/libruby.so.3.0.3
7fffb1f40000-7fffb1f50000 rw-p 00450000 fc:06 1077936030 /builddir/build/BUILD/ruby-3.0.3/libruby.so.3.0.3
7fffb1f50000-7fffb1f60000 rw-p 00000000 00:00 0
7fffb1f60000-7fffb1f80000 r--p 00000000 00:00 0 [vvar]
7fffb1f80000-7fffb1f90000 r-xp 00000000 00:00 0 [vdso]
7fffb1f90000-7fffb1fa0000 r--p 00000000 fc:06 1615030592 /usr/lib64/ld64.so.2
7fffb1fa0000-7fffb1ff0000 r-xp 00010000 fc:06 1615030592 /usr/lib64/ld64.so.2
7fffb1ff0000-7fffb2000000 r--p 00060000 fc:06 1615030592 /usr/lib64/ld64.so.2
7fffb2000000-7fffb2010000 r--p 00060000 fc:06 1615030592 /usr/lib64/ld64.so.2
7fffb2010000-7fffb2020000 rw-p 00070000 fc:06 1615030592 /usr/lib64/ld64.so.2
7fffd3830000-7fffd4030000 rw-p 00000000 00:00 0 [stack]
test_string.rb .
test_struct.rb .
test_syntax.rb ............................................................................................................................................................
test_thread.rb .................................................
Fiber count: 10000 (skipping)
#1282 test_ractor.rb:1405:in `<top (required)>':
workers = (0...8).map do
Ractor.new do
loop do
10_000.times.map { Object.new }
Ractor.yield Time.now
end
end
end
1_000.times { idle_worker, tmp_reporter = Ractor.select(*workers) }
"ok"
#=> "" (expected "ok")
FAIL 1/1489 tests failed
make: *** [uncommon.mk:767: yes-btest-ruby] Error 1
... snip ...
It reminds me #18117, but that should be fixed, right?
Updated by xtkoba (Tee KOBAYASHI) almost 3 years ago
Presumably the same failure observed in CI for x86_64-linux-gnu: http://rubyci.s3.amazonaws.com/ubuntu/ruby-3.0/log/20211217T005904Z.log.html.gz
Actions
Like0
Like0