From: "vo.x (Vit Ondruch)" Date: 2022-02-09T16:37:37+00:00 Subject: [ruby-core:107530] [Ruby master Bug#18257] rb_mRubyVMFrozenCore is broken by GC run Issue #18257 has been updated by vo.x (Vit Ondruch). Subject changed from SystemTap/DTrace coredump to rb_mRubyVMFrozenCore is broken by GC run To demonstrate the issue without SystemTap using Ruby 3.1.0, I have created the following patch: ~~~ $ git diff diff --git a/gc.c b/gc.c index d77dc2cda4..6a00742209 100644 --- a/gc.c +++ b/gc.c @@ -5627,6 +5627,9 @@ gc_sweep_finish(rb_objspace_t *objspace) static int gc_sweep_step(rb_objspace_t *objspace, rb_size_pool_t *size_pool, rb_heap_t *heap) { + VALUE path = rb_class_path_cached(rb_mRubyVMFrozenCore); + printf("Before sweep: %s\n", RSTRING_PTR(path)); + struct heap_page *sweep_page = heap->sweeping_page; int unlink_limit = 3; @@ -5714,6 +5717,9 @@ gc_sweep_step(rb_objspace_t *objspace, rb_size_pool_t *size_pool, rb_heap_t *hea gc_prof_sweep_timer_stop(objspace); #endif + path = rb_class_path_cached(rb_mRubyVMFrozenCore); + printf("After sweep: %s\n", RSTRING_PTR(path)); + return heap->free_pages != NULL; } @@ -8138,6 +8144,9 @@ gc_marks_continue(rb_objspace_t *objspace, rb_size_pool_t *size_pool, rb_heap_t static void gc_marks(rb_objspace_t *objspace, int full_mark) { + VALUE path = rb_class_path_cached(rb_mRubyVMFrozenCore); + printf("Before mark: %s\n", RSTRING_PTR(path)); + gc_prof_mark_timer_start(objspace); /* setup marking */ @@ -8154,6 +8163,9 @@ gc_marks(rb_objspace_t *objspace, int full_mark) } #endif gc_prof_mark_timer_stop(objspace); + + path = rb_class_path_cached(rb_mRubyVMFrozenCore); + printf("After mark: %s\n", RSTRING_PTR(path)); } /* RGENGC */ ~~~ With simple test case, it produces this output: ~~~ $ ./miniruby -e "10000.times {[1].push[2]}" Before mark: RubyVM::FrozenCore Before sweep: RubyVM::FrozenCore After sweep: RubyVM::FrozenCore After mark: RubyVM::FrozenCore Before sweep: RubyVM::FrozenCore After sweep: RubyVM::FrozenCore RSTRING_PTR is returning NULL!! SIGSEGV is highly expected to follow immediately. If you could reproduce, attach your debugger here, and look at the passed string.Before mark: (null) RSTRING_PTR is returning NULL!! SIGSEGV is highly expected to follow immediately. If you could reproduce, attach your debugger here, and look at the passed string.Before sweep: (null) RSTRING_PTR is returning NULL!! SIGSEGV is highly expected to follow immediately. If you could reproduce, attach your debugger here, and look at the passed string.After sweep: (null) RSTRING_PTR is returning NULL!! SIGSEGV is highly expected to follow immediately. If you could reproduce, attach your debugger here, and look at the passed string.After mark: (null) RSTRING_PTR is returning NULL!! SIGSEGV is highly expected to follow immediately. If you could reproduce, attach your debugger here, and look at the passed string.Before sweep: (null) After sweep: RSTRING_PTR is returning NULL!! SIGSEGV is highly expected to follow immediately. If you could reproduce, attach your debugger here, and look at the passed string.Before mark: (null) RSTRING_PTR is returning NULL!! SIGSEGV is highly expected to follow immediately. If you could reproduce, attach your debugger here, and look at the passed string.Before sweep: (null) RSTRING_PTR is returning NULL!! SIGSEGV is highly expected to follow immediately. If you could reproduce, attach your debugger here, and look at the passed string.After sweep: (null) RSTRING_PTR is returning NULL!! SIGSEGV is highly expected to follow immediately. If you could reproduce, attach your debugger here, and look at the passed string.After mark: (null) RSTRING_PTR is returning NULL!! SIGSEGV is highly expected to follow immediately. If you could reproduce, attach your debugger here, and look at the passed string.Before sweep: (null) After sweep: ~~~ With more complex examples which are part of Ruby build: ~~~ $ ./miniruby -I./lib -I. -I.ext/common ./tool/generic_erb.rb -c -o encdb.h ./template/encdb.h.tmpl ./enc enc Before mark: RubyVM::FrozenCore Before sweep: RubyVM::FrozenCore After sweep: RubyVM::FrozenCore After mark: RubyVM::FrozenCore Before sweep: RubyVM::FrozenCore After sweep: RubyVM::FrozenCore Before mark: module_function :def_erb_method Before sweep: module_function :def_erb_method After sweep: module_function :def_erb_method After mark: module_function :def_erb_method Before sweep: module_function :def_erb_method After sweep: $ Before mark: end Before sweep: end After sweep: end After mark: end /builddir/build/BUILD/ruby-3.1.0/lib/erb.rb:474: [BUG] Segmentation fault at 0x0000000000009619 ruby 3.1.0p0 (2021-12-25 revision fb4df44d16) [x86_64-linux] -- Control frame information ----------------------------------------------- c:0014 p:---- s:0088 e:000087 CFUNC :scan c:0013 p:0008 s:0083 e:000082 METHOD /builddir/build/BUILD/ruby-3.1.0/lib/erb.rb:474 [FINISH] c:0012 p:---- s:0078 e:000077 CFUNC :call c:0011 p:0028 s:0073 e:000072 METHOD /builddir/build/BUILD/ruby-3.1.0/lib/erb.rb:417 c:0010 p:0009 s:0067 e:000066 BLOCK /builddir/build/BUILD/ruby-3.1.0/lib/erb.rb:407 [FINISH] c:0009 p:---- s:0063 e:000062 CFUNC :each_line c:0008 p:0015 s:0059 e:000058 METHOD /builddir/build/BUILD/ruby-3.1.0/lib/erb.rb:406 c:0007 p:0088 s:0054 E:0001a8 METHOD /builddir/build/BUILD/ruby-3.1.0/lib/erb.rb:593 c:0006 p:0140 s:0045 e:000044 METHOD /builddir/build/BUILD/ruby-3.1.0/lib/erb.rb:827 [FINISH] c:0005 p:---- s:0033 e:000032 CFUNC :new c:0004 p:0048 s:0027 e:000026 BLOCK ./tool/generic_erb.rb:36 [FINISH] c:0003 p:---- s:0022 e:000021 CFUNC :map c:0002 p:0106 s:0018 E:000f00 EVAL ./tool/generic_erb.rb:34 [FINISH] c:0001 p:0000 s:0003 E:0018d0 (none) [FINISH] -- Ruby level backtrace information ---------------------------------------- ./tool/generic_erb.rb:34:in `
' ./tool/generic_erb.rb:34:in `map' ./tool/generic_erb.rb:36:in `block in
' ./tool/generic_erb.rb:36:in `new' /builddir/build/BUILD/ruby-3.1.0/lib/erb.rb:827:in `initialize' /builddir/build/BUILD/ruby-3.1.0/lib/erb.rb:593:in `compile' /builddir/build/BUILD/ruby-3.1.0/lib/erb.rb:406:in `scan' /builddir/build/BUILD/ruby-3.1.0/lib/erb.rb:406:in `each_line' /builddir/build/BUILD/ruby-3.1.0/lib/erb.rb:407:in `block in scan' /builddir/build/BUILD/ruby-3.1.0/lib/erb.rb:417:in `percent_line' /builddir/build/BUILD/ruby-3.1.0/lib/erb.rb:417:in `call' /builddir/build/BUILD/ruby-3.1.0/lib/erb.rb:474:in `explicit_trim_line' /builddir/build/BUILD/ruby-3.1.0/lib/erb.rb:474:in `scan' -- Machine register context ------------------------------------------------ RIP: 0x00007f8be6ecd4bd RBP: 0x00007f8be6f465a0 RSP: 0x00007ffd889a0fb8 RAX: 0x0000000000000619 RBX: 0x0000000000000073 RCX: 0x00007f8be6f02460 RDX: 0x0000000000009619 RDI: 0x0000000000009619 RSI: 0x00007f8be6f024e0 R8: 0x00007f8be6f023e0 R9: 0x0000000000000000 R10: 0x0000000000000000 R11: 0x0000000000000000 R12: 0x000000000000000e R13: 0x00000000ffffffff R14: 0x0000000000009619 R15: 0x00007ffd889a1510 EFL: 0x0000000000010287 -- C level backtrace information ------------------------------------------- ./miniruby(rb_print_backtrace+0x19) [0x564965148c49] ./miniruby(rb_vm_bugreport+0x219) [0x56496514c7f9] ./miniruby(rb_bug_for_fatal_signal+0xf4) [0x564964f75204] ./miniruby(sigsegv+0x4f) [0x5649650bad7f] [0x7f8be6d94700] [0x7f8be6ecd4bd] [0x7f8be6dc44b1] [0x7f8be6e71b4b] ./miniruby(gc_sweep_step.isra.0+0x7b) [0x56496518797b] ./miniruby(heap_prepare.lto_priv.0+0x54) [0x564964f99754] ./miniruby(newobj_slowpath_wb_protected.constprop.0+0x136) [0x5649651715c6] ./miniruby(rb_wb_protected_newobj_of+0x8e) [0x564964f901de] ./miniruby(str_new0.lto_priv.0+0x6b) [0x5649650c4cbb] ./miniruby(rb_str_subseq+0x9f) [0x5649650cd8af] ./miniruby(scan_once+0x11b) [0x5649650ddeab] ./miniruby(rb_str_scan.lto_priv.0+0x108) [0x5649650de128] ./miniruby(vm_call_cfunc_with_frame+0x125) [0x564965125555] ./miniruby(vm_sendish.lto_priv.0+0x4ba) [0x564965126dea] ./miniruby(vm_exec_core.lto_priv.0+0x6bf) [0x56496512f9ff] ./miniruby(rb_vm_exec+0xc9) [0x564965146169] ./miniruby(rb_vm_call0+0xe4) [0x564965139e04] ./miniruby(rb_method_call_with_block_kw+0x7f) [0x56496505ba5f] ./miniruby(vm_call_cfunc_with_frame+0x125) [0x564965125555] ./miniruby(vm_sendish.lto_priv.0+0x4ba) [0x564965126dea] ./miniruby(vm_exec_core.lto_priv.0+0x6bf) [0x56496512f9ff] ./miniruby(rb_vm_exec+0xc9) [0x564965146169] ./miniruby(rb_yield+0x78) [0x564965136288] ./miniruby(rb_str_enumerate_lines+0x588) [0x5649650e0bb8] ./miniruby(vm_call_cfunc_with_frame+0x125) [0x564965125555] ./miniruby(vm_sendish.lto_priv.0+0x4ba) [0x564965126dea] ./miniruby(vm_exec_core.lto_priv.0+0x6bf) [0x56496512f9ff] ./miniruby(rb_vm_exec+0xc9) [0x564965146169] ./miniruby(rb_call0.lto_priv.0+0x1e1) [0x5649651387d1] ./miniruby(rb_obj_call_init_kw+0x85) [0x564964f7d5b5] ./miniruby(rb_class_new_instance_pass_kw+0x58) [0x56496502dfb8] ./miniruby(vm_call_cfunc_with_frame+0x125) [0x564965125555] ./miniruby(vm_sendish.lto_priv.0+0x4ba) [0x564965126dea] ./miniruby(vm_exec_core.lto_priv.0+0x82) [0x56496512f3c2] ./miniruby(rb_vm_exec+0xc9) [0x564965146169] ./miniruby(rb_yield+0x78) [0x564965136288] ./miniruby(rb_ary_collect.lto_priv.0+0x12c) [0x564964ef954c] ./miniruby(vm_call_cfunc_with_frame+0x125) [0x564965125555] ./miniruby(vm_sendish.lto_priv.0+0x4ba) [0x564965126dea] ./miniruby(vm_exec_core.lto_priv.0+0x6bf) [0x56496512f9ff] ./miniruby(rb_vm_exec+0xc9) [0x564965146169] ./miniruby(rb_ec_exec_node+0xa7) [0x564964f7e927] ./miniruby(ruby_run_node+0x69) [0x564964f83d79] ./miniruby(main+0x5f) [0x564964ef201f] ~~~ For my original case triggered by DTrace probe, I'll probably avoid reporting anything for `rb_mRubyVMFrozenCore` or I special case the class name there. ---------------------------------------- Bug #18257: rb_mRubyVMFrozenCore is broken by GC run https://bugs.ruby-lang.org/issues/18257#change-96442 * Author: vo.x (Vit Ondruch) * Status: Open * Priority: Normal * ruby -v: ruby 3.0.3p157 (2021-11-24 revision 3fb7d2cadc) [x86_64-linux] * Backport: 2.6: UNKNOWN, 2.7: UNKNOWN, 3.0: UNKNOWN ---------------------------------------- Testing Ruby with SystemTap on RHEL9 beta following these steps: ~~~ $ stap -v /usr/share/doc/ruby-doc/ruby-exercise.stp & $ ruby -e '[1, 2, 3].push(4)' ~~~ I get the following error: ~~~ /usr/share/rubygems/rubygems/errors.rb:181: [BUG] Segmentation fault at 0x0000000000000014 ruby 3.0.2p107 (2021-07-07 revision 0db68f0233) [powerpc64le-linux] -- Control frame information ----------------------------------------------- c:0008 p:0028 s:0032 e:000027 CLASS /usr/share/rubygems/rubygems/errors.rb:181 c:0007 p:0110 s:0025 e:000024 CLASS /usr/share/rubygems/rubygems/errors.rb:153 c:0006 p:0007 s:0022 e:000021 TOP /usr/share/rubygems/rubygems/errors.rb:9 [FINISH] c:0005 p:---- s:0019 e:000018 CFUNC :require c:0004 p:0037 s:0014 e:000013 TOP /usr/share/rubygems/rubygems.rb:19 [FINISH] c:0003 p:---- s:0011 e:000010 CFUNC :require c:0002 p:0012 s:0006 e:000005 TOP :2 [FINISH] c:0001 p:0000 s:0003 E:0026c0 (none) [FINISH] -- Ruby level backtrace information ---------------------------------------- :2:in `' :2:in `require' /usr/share/rubygems/rubygems.rb:19:in `' /usr/share/rubygems/rubygems.rb:19:in `require' /usr/share/rubygems/rubygems/errors.rb:9:in `' /usr/share/rubygems/rubygems/errors.rb:153:in `' /usr/share/rubygems/rubygems/errors.rb:181:in `' -- C level backtrace information ------------------------------------------- /lib64/libruby.so.3.0(0x7fffb3b06ba0) [0x7fffb3b06ba0] /lib64/libruby.so.3.0(0x7fffb38d9680) [0x7fffb38d9680] /lib64/libruby.so.3.0(0x7fffb3a4b9d8) [0x7fffb3a4b9d8] linux-vdso64.so.1(__kernel_sigtramp_rt64+0x0) [0x7fffb3ca0464] [0x7fffb3a67ff8] /lib64/libruby.so.3.0(rb_str_dup+0x130) [0x7fffb3a6b950] /lib64/libruby.so.3.0(rb_class_path+0x3c) [0x7fffb3ac72ac] /lib64/libruby.so.3.0(rb_dtrace_setup+0x134) [0x7fffb3ae46a4] [0x7fffb3ae4a00] [0x7fffb3ae7644] [0x7fffb3aeba5c] /lib64/libruby.so.3.0(rb_vm_exec+0x140) [0x7fffb3af1710] /lib64/libruby.so.3.0(rb_iseq_eval+0x164) [0x7fffb3af29f4] [0x7fffb394ce68] /lib64/libruby.so.3.0(rb_require_string+0x44) [0x7fffb394e7f4] /lib64/libruby.so.3.0(rb_f_require+0x1c) [0x7fffb394e88c] [0x7fffb3acf538] [0x7fffb3ae4900] [0x7fffb3ae7644] [0x7fffb3aeba5c] /lib64/libruby.so.3.0(rb_vm_exec+0x140) [0x7fffb3af1710] /lib64/libruby.so.3.0(rb_iseq_eval+0x164) [0x7fffb3af29f4] [0x7fffb394ce68] /lib64/libruby.so.3.0(rb_require_string+0x44) [0x7fffb394e7f4] /lib64/libruby.so.3.0(rb_f_require+0x1c) [0x7fffb394e88c] [0x7fffb3acf538] [0x7fffb3ae4900] [0x7fffb3ae7644] [0x7fffb3aeba5c] /lib64/libruby.so.3.0(rb_vm_exec+0x140) [0x7fffb3af1710] /lib64/libruby.so.3.0(rb_iseq_eval+0x164) [0x7fffb3af29f4] [0x7fffb3b15f60] [0x7fffb3a4826c] [0x7fffb3a499d8] /lib64/libruby.so.3.0(ruby_process_options+0x158) [0x7fffb3a4a778] /lib64/libruby.so.3.0(ruby_options+0xf4) [0x7fffb38e5904] [0x11a360a60] [0x7fffb35d7ca4] [0x7fffb35d7e80] -- Other runtime information ----------------------------------------------- * Loaded script: ruby * Loaded features: 0 enumerator.so 1 thread.rb 2 rational.so 3 complex.so 4 ruby2_keywords.rb 5 /usr/lib64/ruby/enc/encdb.so 6 /usr/lib64/ruby/enc/trans/transdb.so 7 /usr/lib64/ruby/rbconfig.rb 8 /usr/share/rubygems/rubygems/compatibility.rb 9 /usr/share/rubygems/rubygems/defaults.rb 10 /usr/share/rubygems/rubygems/deprecate.rb * Process memory map: 11a360000-11a370000 r-xp 00000000 fd:00 34097694 /usr/bin/ruby 11a370000-11a380000 r--p 00000000 fd:00 34097694 /usr/bin/ruby 11a380000-11a390000 rw-p 00010000 fd:00 34097694 /usr/bin/ruby 1000d490000-1000d6b0000 rw-p 00000000 00:00 0 [heap] 7fffaf470000-7fffaf8d0000 r--s 00000000 fd:00 67811909 /usr/lib64/libruby.so.3.0.2 7fffaf8d0000-7fffaf8f0000 r--s 00000000 fd:00 34097694 /usr/bin/ruby 7fffaf8f0000-7fffaf900000 r-xp 00000000 fd:00 100999014 /usr/lib64/ruby/enc/trans/transdb.so 7fffaf900000-7fffaf910000 r--p 00000000 fd:00 100999014 /usr/lib64/ruby/enc/trans/transdb.so 7fffaf910000-7fffaf920000 rw-p 00000000 00:00 0 7fffaf920000-7fffaf930000 r-xp 00000000 fd:00 67811915 /usr/lib64/ruby/enc/encdb.so 7fffaf930000-7fffaf940000 r--p 00000000 fd:00 67811915 /usr/lib64/ruby/enc/encdb.so 7fffaf940000-7fffaf950000 rw-p 00000000 00:00 0 7fffaf950000-7fffaf960000 ---p 00000000 00:00 0 7fffaf960000-7fffafa10000 rw-p 00000000 00:00 0 7fffafa10000-7fffafa20000 ---p 00000000 00:00 0 7fffafa20000-7fffafad0000 rw-p 00000000 00:00 0 7fffafad0000-7fffafae0000 ---p 00000000 00:00 0 7fffafae0000-7fffafb90000 rw-p 00000000 00:00 0 7fffafb90000-7fffafba0000 ---p 00000000 00:00 0 7fffafba0000-7fffafc50000 rw-p 00000000 00:00 0 7fffafc50000-7fffafc60000 ---p 00000000 00:00 0 7fffafc60000-7fffafd10000 rw-p 00000000 00:00 0 7fffafd10000-7fffafd20000 ---p 00000000 00:00 0 7fffafd20000-7fffafdd0000 rw-p 00000000 00:00 0 7fffafdd0000-7fffafde0000 ---p 00000000 00:00 0 7fffafde0000-7fffafe90000 rw-p 00000000 00:00 0 7fffafe90000-7fffafea0000 ---p 00000000 00:00 0 7fffafea0000-7fffaff50000 rw-p 00000000 00:00 0 7fffaff50000-7fffaff60000 ---p 00000000 00:00 0 7fffaff60000-7fffb0010000 rw-p 00000000 00:00 0 7fffb0010000-7fffb0020000 ---p 00000000 00:00 0 7fffb0020000-7fffb00d0000 rw-p 00000000 00:00 0 7fffb00d0000-7fffb00e0000 ---p 00000000 00:00 0 7fffb00e0000-7fffb0190000 rw-p 00000000 00:00 0 7fffb0190000-7fffb01a0000 ---p 00000000 00:00 0 7fffb01a0000-7fffb0250000 rw-p 00000000 00:00 0 7fffb0250000-7fffb0260000 ---p 00000000 00:00 0 7fffb0260000-7fffb0310000 rw-p 00000000 00:00 0 7fffb0310000-7fffb0320000 ---p 00000000 00:00 0 7fffb0320000-7fffb03d0000 rw-p 00000000 00:00 0 7fffb03d0000-7fffb03e0000 ---p 00000000 00:00 0 7fffb03e0000-7fffb0490000 rw-p 00000000 00:00 0 7fffb0490000-7fffb04a0000 ---p 00000000 00:00 0 7fffb04a0000-7fffb0550000 rw-p 00000000 00:00 0 7fffb0550000-7fffb0560000 ---p 00000000 00:00 0 7fffb0560000-7fffb0610000 rw-p 00000000 00:00 0 7fffb0610000-7fffb0620000 ---p 00000000 00:00 0 7fffb0620000-7fffb06d0000 rw-p 00000000 00:00 0 7fffb06d0000-7fffb06e0000 ---p 00000000 00:00 0 7fffb06e0000-7fffb0790000 rw-p 00000000 00:00 0 7fffb0790000-7fffb07a0000 ---p 00000000 00:00 0 7fffb07a0000-7fffb0850000 rw-p 00000000 00:00 0 7fffb0850000-7fffb0860000 ---p 00000000 00:00 0 7fffb0860000-7fffb0910000 rw-p 00000000 00:00 0 7fffb0910000-7fffb0920000 ---p 00000000 00:00 0 7fffb0920000-7fffb09d0000 rw-p 00000000 00:00 0 7fffb09d0000-7fffb09e0000 ---p 00000000 00:00 0 7fffb09e0000-7fffb0a90000 rw-p 00000000 00:00 0 7fffb0a90000-7fffb0aa0000 ---p 00000000 00:00 0 7fffb0aa0000-7fffb0b50000 rw-p 00000000 00:00 0 7fffb0b50000-7fffb0b60000 ---p 00000000 00:00 0 7fffb0b60000-7fffb0c10000 rw-p 00000000 00:00 0 7fffb0c10000-7fffb0c20000 ---p 00000000 00:00 0 7fffb0c20000-7fffb0cd0000 rw-p 00000000 00:00 0 7fffb0cd0000-7fffb0ce0000 ---p 00000000 00:00 0 7fffb0ce0000-7fffb0d90000 rw-p 00000000 00:00 0 7fffb0d90000-7fffb0da0000 ---p 00000000 00:00 0 7fffb0da0000-7fffb0e50000 rw-p 00000000 00:00 0 7fffb0e50000-7fffb0e60000 ---p 00000000 00:00 0 7fffb0e60000-7fffb0f10000 rw-p 00000000 00:00 0 7fffb0f10000-7fffb0f20000 ---p 00000000 00:00 0 7fffb0f20000-7fffb0fd0000 rw-p 00000000 00:00 0 7fffb0fd0000-7fffb0fe0000 ---p 00000000 00:00 0 7fffb0fe0000-7fffb1090000 rw-p 00000000 00:00 0 7fffb1090000-7fffb10a0000 ---p 00000000 00:00 0 7fffb10a0000-7fffb32e0000 rw-p 00000000 00:00 0 7fffb32e0000-7fffb3340000 r--p 00000000 fd:00 33555845 /usr/lib/locale/en_US.utf8/LC_CTYPE 7fffb3340000-7fffb3420000 r-xp 00000000 fd:00 67172714 /usr/lib64/libm.so.6 7fffb3420000-7fffb3430000 r--p 000d0000 fd:00 67172714 /usr/lib64/libm.so.6 7fffb3430000-7fffb3440000 rw-p 000e0000 fd:00 67172714 /usr/lib64/libm.so.6 7fffb3440000-7fffb3480000 r-xp 00000000 fd:00 67172871 /usr/lib64/libcrypt.so.2.0.0 7fffb3480000-7fffb3490000 r--p 00030000 fd:00 67172871 /usr/lib64/libcrypt.so.2.0.0 7fffb3490000-7fffb34a0000 rw-p 00000000 00:00 0 7fffb34a0000-7fffb3540000 r-xp 00000000 fd:00 67172912 /usr/lib64/libgmp.so.10.4.0 7fffb3540000-7fffb3550000 r--p 00090000 fd:00 67172912 /usr/lib64/libgmp.so.10.4.0 7fffb3550000-7fffb3560000 rw-p 000a0000 fd:00 67172912 /usr/lib64/libgmp.so.10.4.0 7fffb3560000-7fffb3580000 r-xp 00000000 fd:00 67172832 /usr/lib64/libz.so.1.2.11 7fffb3580000-7fffb3590000 r--p 00010000 fd:00 67172832 /usr/lib64/libz.so.1.2.11 7fffb3590000-7fffb35a0000 rw-p 00020000 fd:00 67172832 /usr/lib64/libz.so.1.2.11 7fffb35a0000-7fffb37e0000 r-xp 00000000 fd:00 67172711 /usr/lib64/libc.so.6 7fffb37e0000-7fffb37f0000 r--p 00230000 fd:00 67172711 /usr/lib64/libc.so.6 7fffb37f0000-7fffb3800000 rw-p 00240000 fd:00 67172711 /usr/lib64/libc.so.6 7fffb3800000-7fffb3c30000 r-xp 00000000 fd:00 67811909 /usr/lib64/libruby.so.3.0.2 7fffb3c30000-7fffb3c40000 ---p 00430000 fd:00 67811909 /usr/lib64/libruby.so.3.0.2 7fffb3c40000-7fffb3c50000 r--p 00430000 fd:00 67811909 /usr/lib64/libruby.so.3.0.2 7fffb3c50000-7fffb3c60000 rw-p 00440000 fd:00 67811909 /usr/lib64/libruby.so.3.0.2 7fffb3c60000-7fffb3c70000 rw-p 00000000 00:00 0 7fffb3c70000-7fffb3c80000 r--s 00000000 fd:00 100673889 /usr/lib64/gconv/gconv-modules.cache 7fffb3c80000-7fffb3ca0000 r--p 00000000 00:00 0 [vvar] 7fffb3ca0000-7fffb3cb0000 r-xp 00000000 00:00 0 [vdso] 7fffb3cb0000-7fffb3d00000 r-xp 00000000 fd:00 67172707 /usr/lib64/ld64.so.2 7fffb3d00000-7fffb3d10000 r--p 00040000 fd:00 67172707 /usr/lib64/ld64.so.2 7fffb3d10000-7fffb3d20000 rw-p 00050000 fd:00 67172707 /usr/lib64/ld64.so.2 7fffdee00000-7fffdf600000 rw-p 00000000 00:00 0 [stack] ~~~ This should be the full BT: ~~~ (gdb) bt #0 0x00007fffa5711550 in uleb128 (p=0x10039917f10) at addr2line.c:200 #1 di_read_die (reader=reader@entry=0x10039917eb8, die=die@entry=0x10039917dc8) at addr2line.c:1343 #2 0x00007fffa5714574 in debug_info_read (offset=, lines=, traces=, num_traces=, reader=) at addr2line.c:1630 #3 fill_lines (num_traces=num_traces@entry=39, traces=traces@entry=0x7fffa585d778 , check_debuglink=check_debuglink@entry=0, objp=objp@entry=0x10039919370, lines=lines@entry=0x100399756f0, offset=, offset@entry=0) at addr2line.c:1887 #4 0x00007fffa5714f28 in follow_debuglink (offset=0, lines=0x100399756f0, objp=0x10039919370, traces=, num_traces=39, debuglink=0x7fffa14e01e4 "ruby-3.0.2-155.el9.ppc64le.debug") at addr2line.c:574 #5 fill_lines (num_traces=num_traces@entry=39, traces=traces@entry=0x7fffa585d778 , check_debuglink=check_debuglink@entry=1, objp=0x10039919370, objp@entry=0x100399193f0, lines=lines@entry=0x100399756f0, offset=, offset@entry=-1) at addr2line.c:1925 #6 0x00007fffa571576c in rb_dump_backtrace_with_lines (num_traces=, traces=0x7fffa585d778 ) at addr2line.c:2286 #7 0x00007fffa5706bac in rb_print_backtrace () at vm_dump.c:760 #8 rb_vm_bugreport (ctx=) at vm_dump.c:998 #9 0x00007fffa54d9680 in rb_bug_for_fatal_signal (default_sighandler=0x0, sig=, ctx=0x100399197c0, fmt=0x7fffa574e8f0 "Segmentation fault at %p") at error.c:786 #10 0x00007fffa564b9d8 in sigsegv (sig=, info=0x1003991a540, ctx=0x100399197c0) at signal.c:960 #11 #12 0x00007fffa5667ff8 in str_new_frozen_buffer (klass=klass@entry=1100477014720, orig=orig@entry=1100476844400, copy_encoding=copy_encoding@entry=1) at string.c:1329 #13 0x00007fffa566b950 in str_new_frozen (orig=1100476844400, klass=1100477014720) at string.c:1297 #14 str_duplicate_setup (dup=1100478149120, str=1100476844400, klass=1100477014720) at string.c:1570 #15 str_duplicate (str=1100476844400, klass=1100477014720) at string.c:1602 #16 rb_str_dup (str=1100476844400) at string.c:1608 #17 0x00007fffa56c72ac in rb_class_path (klass=1100476844480) at variable.c:173 #18 0x00007fffa56e46a4 in rb_dtrace_setup (ec=, klass=1100476844480, id=159, args=0x7fffe9d953d8) at vm.c:449 #19 0x00007fffa56e4a00 in vm_call_cfunc_with_frame (ec=, reg_cfp=0x7fffa4ecfe50, calling=) at vm_insnhelper.c:2916 #20 0x00007fffa56e7644 in vm_sendish (ec=0x10039811cf0, reg_cfp=0x7fffa4ecfe50, cd=0x100399a8db0, block_handler=, method_explorer=) at vm_callinfo.h:336 #21 0x00007fffa56eba5c in vm_exec_core (ec=0x10039811cf0, initial=, initial@entry=0) at insns.def:789 #22 0x00007fffa56f1710 in rb_vm_exec (ec=0x10039811cf0, mjit_enable_p=) at vm.c:2172 #23 0x00007fffa56f29f4 in rb_iseq_eval (iseq=0x100398aa7c0) at vm.c:2409 #24 0x00007fffa554ce68 in load_iseq_eval (fname=1100477137480, ec=0x10039811cf0) at load.c:594 #25 require_internal (ec=ec@entry=0x10039811cf0, fname=, fname@entry=1100476430040, exception=exception@entry=1) at load.c:1065 #26 0x00007fffa554e7f4 in rb_require_string (fname=1100476430040) at load.c:1142 #27 0x00007fffa554e88c in rb_f_require (obj=, fname=) at load.c:838 #28 0x00007fffa56cf538 in ractor_safe_call_cfunc_1 (recv=, argc=, argv=, func=) at vm_insnhelper.c:2750 #29 0x00007fffa56e4900 in vm_call_cfunc_with_frame (ec=0x10039811cf0, reg_cfp=0x7fffa4ecff30, calling=) at vm_insnhelper.c:2926 #30 0x00007fffa56e7644 in vm_sendish (ec=0x10039811cf0, reg_cfp=0x7fffa4ecff30, cd=0x10039901e50, block_handler=, method_explorer=) at vm_callinfo.h:336 #31 0x00007fffa56eba5c in vm_exec_core (ec=0x10039811cf0, initial=, initial@entry=0) at insns.def:789 #32 0x00007fffa56f1710 in rb_vm_exec (ec=0x10039811cf0, mjit_enable_p=) at vm.c:2172 #33 0x00007fffa56f29f4 in rb_iseq_eval (iseq=0x1003981b9a8) at vm.c:2409 #34 0x00007fffa554ce68 in load_iseq_eval (fname=1100476613760, ec=0x10039811cf0) at load.c:594 #35 require_internal (ec=ec@entry=0x10039811cf0, fname=, fname@entry=1100476614040, exception=exception@entry=1) at load.c:1065 #36 0x00007fffa554e7f4 in rb_require_string (fname=1100476614040) at load.c:1142 #37 0x00007fffa554e88c in rb_f_require (obj=, fname=) at load.c:838 #38 0x00007fffa56cf538 in ractor_safe_call_cfunc_1 (recv=, argc=, argv=, func=) at vm_insnhelper.c:2750 #39 0x00007fffa56e4900 in vm_call_cfunc_with_frame (ec=0x10039811cf0, reg_cfp=0x7fffa4ecffa0, calling=) at vm_insnhelper.c:2926 #40 0x00007fffa56e7644 in vm_sendish (ec=0x10039811cf0, reg_cfp=0x7fffa4ecffa0, cd=0x10039970580, block_handler=, method_explorer=) at vm_callinfo.h:336 #41 0x00007fffa56eba5c in vm_exec_core (ec=0x10039811cf0, initial=, initial@entry=0) at insns.def:789 #42 0x00007fffa56f1710 in rb_vm_exec (ec=0x10039811cf0, mjit_enable_p=) at vm.c:2172 #43 0x00007fffa56f29f4 in rb_iseq_eval (iseq=0x100398489f8) at vm.c:2409 #44 0x00007fffa5715f60 in rb_load_with_builtin_functions (feature_name=0x7fffa57b61c0 "gem_prelude", table=0x0) at builtin.c:54 #45 0x00007fffa564826c in ruby_init_prelude () at ruby.c:1498 #46 ruby_opt_init (opt=0x7fffe9d98690) at ruby.c:1521 #47 ruby_opt_init (opt=0x7fffe9d98690) at ruby.c:1506 #48 0x00007fffa56499d8 in process_options (argc=0, argc@entry=3, argv=0x7fffe9d98f10, argv@entry=0x7fffe9d98ef8, opt=opt@entry=0x7fffe9d98690) at ruby.c:1951 #49 0x00007fffa564a778 in ruby_process_options (argc=, argv=0x7fffe9d98ef8) at ruby.c:230 #50 0x00007fffa54e5904 in ruby_options (argc=, argv=0x7fffe9d98ef8) at eval.c:138 #51 0x000000010b860a60 in main (argc=, argv=) at ./main.c:50 ~~~ -- https://bugs.ruby-lang.org/ Unsubscribe: