Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segfault on 1.7.2 #369

Closed
Fryguy opened this issue Oct 15, 2024 · 12 comments
Closed

Segfault on 1.7.2 #369

Fryguy opened this issue Oct 15, 2024 · 12 comments

Comments

@Fryguy
Copy link

Fryguy commented Oct 15, 2024

Extracting the conversation from #368 (comment), we are getting a segfault that seems to have been fixed by #368 (v1.7.3), however I'm concerned that PR didn't actually fix it, or that something else is going on, so I'm opening this issue to continue the investigation.

This was only happening in our CentOS 8 VM with Red Hat's ruby 3.0.4, and we couldn't get it to happen on any other system, so it's been difficult to track down. Upgrading to msgpack 1.7.3 and the problem now goes away

The smallest reproduce I have so far is

require "bundler/inline"

gemfile do
  source "https://rubygems.org"
  gem "msgpack", "=1.7.2"
end

factory = MessagePack::Factory.new

input = {"x" => ""}
puts "input: #{input}"

packer = factory.packer
packer.pack(input)
storage = packer.to_s
puts "storage: #{storage.inspect}"

unpacker = factory.unpacker(freeze: true)
unpacker.feed(storage)
output = unpacker.unpack
puts "output: #{output}"

Full stack trace:

[root@192 ~]# ruby segfault4.rb
input: {"x"=>""}
storage: "\x81\xA1x\xA0"
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.
segfault4.rb:22: [BUG] Segmentation fault at 0x0000000000000000
ruby 3.0.4p208 (2022-04-12 revision 3fa771dded) [x86_64-linux]

-- Control frame information -----------------------------------------------
c:0003 p:---- s:0016 e:000015 CFUNC  :read
c:0002 p:0115 s:0012 E:001e70 EVAL   segfault4.rb:22 [FINISH]
c:0001 p:0000 s:0003 E:0017f0 (none) [FINISH]

-- Ruby level backtrace information ----------------------------------------
segfault4.rb:22:in `<main>'
segfault4.rb:22:in `read'

-- Machine register context ------------------------------------------------
 RIP: 0x00007f5c86124006 RBP: 0x0000000000000000 RSP: 0x00007ffcc06c24a8
 RAX: 0xfffffffffffffff9 RBX: 0x0000000000000000 RCX: 0x8080808080808080
 RDX: 0x8080808080808080 RDI: 0x0000000000000000 RSI: 0x0000000000000000
  R8: 0x00007f5c866e7f40  R9: 0x00007f5c84c7e220 R10: 0x00007f5c861a51b8
 R11: 0x0000000000000246 R12: 0x00005607f1372f50 R13: 0x00007f5c86129e40
 R14: 0x00007f5c864c3a98 R15: 0x00007f5c806b2c70 EFL: 0x0000000000010213

-- C level backtrace information -------------------------------------------
/lib64/libruby.so.3.0(0x7f5c86198cc9) [0x7f5c86198cc9]
/lib64/libruby.so.3.0(0x7f5c86198ef2) [0x7f5c86198ef2]
/lib64/libruby.so.3.0(0x7f5c85ffae64) [0x7f5c85ffae64]
/lib64/libruby.so.3.0(0x7f5c8611317f) [0x7f5c8611317f]
/lib64/libpthread.so.0(__restore_rt+0x0) [0x7f5c85b25d20]
/lib64/libruby.so.3.0(0x7f5c86124006) [0x7f5c86124006]
/lib64/libruby.so.3.0(0x7f5c86124137) [0x7f5c86124137]
/lib64/libruby.so.3.0(rb_enc_str_coderange+0x3b) [0x7f5c86127e1b]
/lib64/libruby.so.3.0(rb_str_hash+0x98) [0x7f5c86127ef8]
/lib64/libruby.so.3.0(rb_st_update+0x45) [0x7f5c8611e245]
/lib64/libruby.so.3.0(0x7f5c861232fe) [0x7f5c861232fe]
/lib64/libruby.so.3.0(rb_enc_interned_str+0x43) [0x7f5c8613d9c3]
/opt/manageiq/manageiq-gemset/extensions/x86_64-linux/3.0.0/msgpack-1.7.2/msgpack/msgpack.so(read_raw_body_begin+0x3a0) [0x7f5c7f5d8d60]
/opt/manageiq/manageiq-gemset/extensions/x86_64-linux/3.0.0/msgpack-1.7.2/msgpack/msgpack.so(0xf7fa) [0x7f5c7f5da7fa]
/opt/manageiq/manageiq-gemset/extensions/x86_64-linux/3.0.0/msgpack-1.7.2/msgpack/msgpack.so(0xff43) [0x7f5c7f5daf43]
/lib64/libruby.so.3.0(0x7f5c8617f5b1) [0x7f5c8617f5b1]
/lib64/libruby.so.3.0(0x7f5c861897d1) [0x7f5c861897d1]
/lib64/libruby.so.3.0(0x7f5c86189e24) [0x7f5c86189e24]
/lib64/libruby.so.3.0(0x7f5c8617e9da) [0x7f5c8617e9da]
/lib64/libruby.so.3.0(0x7f5c86182d49) [0x7f5c86182d49]
/lib64/libruby.so.3.0(rb_vm_exec+0x113) [0x7f5c86188693]
/lib64/libruby.so.3.0(0x7f5c86001086) [0x7f5c86001086]
/lib64/libruby.so.3.0(ruby_run_node+0x59) [0x7f5c86004e09]
ruby(0x5607ef60fa8f) [0x5607ef60fa8f]
/lib64/libc.so.6(__libc_start_main+0xe5) [0x7f5c84b287e5]
ruby(_start+0x2e) [0x5607ef60fade]

-- Other runtime information -----------------------------------------------

* Loaded script: segfault4.rb

* 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
   11 /usr/share/rubygems/rubygems/errors.rb
   12 /usr/share/rubygems/rubygems/exceptions.rb
   13 /usr/share/rubygems/rubygems/basic_specification.rb
   14 /usr/share/rubygems/rubygems/stub_specification.rb
   15 /usr/share/rubygems/rubygems/platform.rb
   16 /usr/share/rubygems/rubygems/version.rb
   17 /usr/share/rubygems/rubygems/requirement.rb
   18 /usr/share/rubygems/rubygems/text.rb
   19 /usr/share/rubygems/rubygems/user_interaction.rb
   20 /usr/share/rubygems/rubygems/specification_policy.rb
   21 /usr/share/rubygems/rubygems/util/list.rb
   22 /usr/share/rubygems/rubygems/specification.rb
   23 /usr/share/rubygems/rubygems/defaults/operating_system.rb
   24 /usr/share/rubygems/rubygems/util.rb
   25 /usr/share/rubygems/rubygems/dependency.rb
   26 /usr/share/rubygems/rubygems/core_ext/kernel_gem.rb
   27 /usr/lib64/ruby/monitor.so
   28 /usr/share/ruby/monitor.rb
   29 /usr/share/rubygems/rubygems/core_ext/kernel_require.rb
   30 /usr/share/rubygems/rubygems/core_ext/kernel_warn.rb
   31 /usr/share/rubygems/rubygems.rb
   32 /usr/share/rubygems/rubygems/path_support.rb
   33 /usr/share/ruby/did_you_mean/version.rb
   34 /usr/share/ruby/did_you_mean/core_ext/name_error.rb
   35 /usr/share/ruby/did_you_mean/levenshtein.rb
   36 /usr/share/ruby/did_you_mean/jaro_winkler.rb
   37 /usr/share/ruby/did_you_mean/spell_checker.rb
   38 /usr/share/ruby/did_you_mean/spell_checkers/name_error_checkers/class_name_checker.rb
   39 /usr/share/ruby/did_you_mean/spell_checkers/name_error_checkers/variable_name_checker.rb
   40 /usr/share/ruby/did_you_mean/spell_checkers/name_error_checkers.rb
   41 /usr/share/ruby/did_you_mean/spell_checkers/method_name_checker.rb
   42 /usr/share/ruby/did_you_mean/spell_checkers/key_error_checker.rb
   43 /usr/share/ruby/did_you_mean/spell_checkers/null_checker.rb
   44 /usr/share/ruby/did_you_mean/tree_spell_checker.rb
   45 /usr/share/ruby/did_you_mean/spell_checkers/require_path_checker.rb
   46 /usr/share/ruby/did_you_mean/formatters/plain_formatter.rb
   47 /usr/share/ruby/did_you_mean.rb
   48 /usr/share/rubygems/rubygems/bundler_version_finder.rb
   49 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/inline.rb
   50 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/vendor/fileutils/lib/fileutils.rb
   51 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/vendored_fileutils.rb
   52 /usr/lib64/ruby/pathname.so
   53 /usr/share/ruby/pathname.rb
   54 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/errors.rb
   55 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/environment_preserver.rb
   56 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/plugin/api.rb
   57 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/plugin.rb
   58 /usr/share/rubygems/rubygems/source/git.rb
   59 /usr/share/rubygems/rubygems/source/installed.rb
   60 /usr/share/rubygems/rubygems/source/specific_file.rb
   61 /usr/share/rubygems/rubygems/source/local.rb
   62 /usr/share/rubygems/rubygems/source/lock.rb
   63 /usr/share/rubygems/rubygems/source/vendor.rb
   64 /usr/share/rubygems/rubygems/source.rb
   65 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/match_metadata.rb
   66 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/gem_helpers.rb
   67 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/match_platform.rb
   68 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/force_platform.rb
   69 /usr/share/rubygems/rubygems/name_tuple.rb
   70 /usr/share/rubygems/rubygems/resolver/molinillo/lib/molinillo/gem_metadata.rb
   71 /usr/share/rubygems/rubygems/resolver/molinillo/lib/molinillo/delegates/specification_provider.rb
   72 /usr/share/rubygems/rubygems/resolver/molinillo/lib/molinillo/errors.rb
   73 /usr/share/rubygems/rubygems/tsort/lib/tsort.rb
   74 /usr/share/rubygems/rubygems/tsort.rb
   75 /usr/share/rubygems/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/action.rb
   76 /usr/share/rubygems/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/add_edge_no_circular.rb
   77 /usr/share/rubygems/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/add_vertex.rb
   78 /usr/share/rubygems/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/delete_edge.rb
   79 /usr/share/rubygems/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/detach_vertex_named.rb
   80 /usr/share/rubygems/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/set_payload.rb
   81 /usr/share/rubygems/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/tag.rb
   82 /usr/share/rubygems/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/log.rb
   83 /usr/share/rubygems/rubygems/resolver/molinillo/lib/molinillo/dependency_graph/vertex.rb
   84 /usr/share/rubygems/rubygems/resolver/molinillo/lib/molinillo/dependency_graph.rb
   85 /usr/share/rubygems/rubygems/resolver/molinillo/lib/molinillo/state.rb
   86 /usr/share/rubygems/rubygems/resolver/molinillo/lib/molinillo/modules/specification_provider.rb
   87 /usr/share/rubygems/rubygems/resolver/molinillo/lib/molinillo/delegates/resolution_state.rb
   88 /usr/share/rubygems/rubygems/resolver/molinillo/lib/molinillo/resolution.rb
   89 /usr/share/rubygems/rubygems/resolver/molinillo/lib/molinillo/resolver.rb
   90 /usr/share/rubygems/rubygems/resolver/molinillo/lib/molinillo/modules/ui.rb
   91 /usr/share/rubygems/rubygems/resolver/molinillo/lib/molinillo.rb
   92 /usr/share/rubygems/rubygems/resolver/molinillo.rb
   93 /usr/share/rubygems/rubygems/resolver/activation_request.rb
   94 /usr/share/rubygems/rubygems/resolver/conflict.rb
   95 /usr/share/rubygems/rubygems/resolver/dependency_request.rb
   96 /usr/share/rubygems/rubygems/resolver/requirement_list.rb
   97 /usr/share/rubygems/rubygems/resolver/stats.rb
   98 /usr/share/rubygems/rubygems/resolver/set.rb
   99 /usr/share/rubygems/rubygems/resolver/api_set.rb
  100 /usr/share/rubygems/rubygems/resolver/composed_set.rb
  101 /usr/share/rubygems/rubygems/resolver/best_set.rb
  102 /usr/share/rubygems/rubygems/resolver/current_set.rb
  103 /usr/share/rubygems/rubygems/resolver/git_set.rb
  104 /usr/share/rubygems/rubygems/resolver/index_set.rb
  105 /usr/share/rubygems/rubygems/resolver/installer_set.rb
  106 /usr/share/rubygems/rubygems/resolver/lock_set.rb
  107 /usr/share/rubygems/rubygems/resolver/vendor_set.rb
  108 /usr/share/rubygems/rubygems/resolver/source_set.rb
  109 /usr/share/rubygems/rubygems/resolver/specification.rb
  110 /usr/share/rubygems/rubygems/resolver/spec_specification.rb
  111 /usr/share/rubygems/rubygems/resolver/api_specification.rb
  112 /usr/share/rubygems/rubygems/resolver/git_specification.rb
  113 /usr/share/rubygems/rubygems/resolver/index_specification.rb
  114 /usr/share/rubygems/rubygems/resolver/installed_specification.rb
  115 /usr/share/rubygems/rubygems/resolver/local_specification.rb
  116 /usr/share/rubygems/rubygems/resolver/lock_specification.rb
  117 /usr/share/rubygems/rubygems/resolver/vendor_specification.rb
  118 /usr/share/rubygems/rubygems/resolver.rb
  119 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/rubygems_ext.rb
  120 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/rubygems_integration.rb
  121 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/version.rb
  122 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/constants.rb
  123 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/current_ruby.rb
  124 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/build_metadata.rb
  125 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler.rb
  126 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/ui.rb
  127 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/vendor/thor/lib/thor/command.rb
  128 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/vendor/thor/lib/thor/core_ext/hash_with_indifferent_access.rb
  129 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/vendor/thor/lib/thor/error.rb
  130 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/vendor/thor/lib/thor/invocation.rb
  131 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/vendor/thor/lib/thor/nested_context.rb
  132 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/vendor/thor/lib/thor/parser/argument.rb
  133 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/vendor/thor/lib/thor/parser/arguments.rb
  134 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/vendor/thor/lib/thor/parser/option.rb
  135 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/vendor/thor/lib/thor/parser/options.rb
  136 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/vendor/thor/lib/thor/parser.rb
  137 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/vendor/thor/lib/thor/shell.rb
  138 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/vendor/thor/lib/thor/line_editor/basic.rb
  139 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/vendor/thor/lib/thor/line_editor/readline.rb
  140 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/vendor/thor/lib/thor/line_editor.rb
  141 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/vendor/thor/lib/thor/util.rb
  142 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/vendor/thor/lib/thor/base.rb
  143 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/vendor/thor/lib/thor.rb
  144 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/vendored_thor.rb
  145 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/ui/shell.rb
  146 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/vendor/thor/lib/thor/shell/terminal.rb
  147 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/vendor/thor/lib/thor/shell/column_printer.rb
  148 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/vendor/thor/lib/thor/shell/table_printer.rb
  149 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/vendor/thor/lib/thor/shell/wrapped_printer.rb
  150 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/vendor/thor/lib/thor/shell/basic.rb
  151 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/vendor/thor/lib/thor/shell/color.rb
  152 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/ui/rg_proxy.rb
  153 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/shared_helpers.rb
  154 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/settings.rb
  155 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/feature_flag.rb
  156 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/settings/validator.rb
  157 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/dependency.rb
  158 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/ruby_dsl.rb
  159 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/dsl.rb
  160 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/plugin/dsl.rb
  161 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/source_list.rb
  162 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/source.rb
  163 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/source/metadata.rb
  164 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/plugin/source_list.rb
  165 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/plugin/installer.rb
  166 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/source/rubygems.rb
  167 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/plugin/installer/rubygems.rb
  168 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/checksum.rb
  169 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/uri_normalizer.rb
  170 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/vendor/uri/lib/uri/version.rb
  171 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/vendor/uri/lib/uri/rfc2396_parser.rb
  172 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/vendor/uri/lib/uri/rfc3986_parser.rb
  173 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/vendor/uri/lib/uri/common.rb
  174 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/vendor/uri/lib/uri/generic.rb
  175 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/vendor/uri/lib/uri/file.rb
  176 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/vendor/uri/lib/uri/ftp.rb
  177 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/vendor/uri/lib/uri/http.rb
  178 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/vendor/uri/lib/uri/https.rb
  179 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/vendor/uri/lib/uri/ldap.rb
  180 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/vendor/uri/lib/uri/ldaps.rb
  181 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/vendor/uri/lib/uri/mailto.rb
  182 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/vendor/uri/lib/uri/ws.rb
  183 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/vendor/uri/lib/uri/wss.rb
  184 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/vendor/uri/lib/uri.rb
  185 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/vendored_uri.rb
  186 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/source/path.rb
  187 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/source/git.rb
  188 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/lockfile_parser.rb
  189 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/definition.rb
  190 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/vendor/tsort/lib/tsort.rb
  191 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/vendored_tsort.rb
  192 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/spec_set.rb
  193 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/vendor/pub_grub/lib/pub_grub/package.rb
  194 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/vendor/pub_grub/lib/pub_grub/rubygems.rb
  195 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/vendor/pub_grub/lib/pub_grub/version_range.rb
  196 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/vendor/pub_grub/lib/pub_grub/version_constraint.rb
  197 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/vendor/pub_grub/lib/pub_grub/incompatibility.rb
  198 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/vendor/pub_grub/lib/pub_grub/basic_package_source.rb
  199 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/vendor/pub_grub/lib/pub_grub/static_package_source.rb
  200 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/vendor/pub_grub/lib/pub_grub/term.rb
  201 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/vendor/pub_grub/lib/pub_grub/version_union.rb
  202 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/vendor/pub_grub/lib/pub_grub/assignment.rb
  203 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/vendor/pub_grub/lib/pub_grub/partial_solution.rb
  204 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/vendor/pub_grub/lib/pub_grub/failure_writer.rb
  205 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/vendor/pub_grub/lib/pub_grub/solve_failure.rb
  206 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/vendor/pub_grub/lib/pub_grub/version_solver.rb
  207 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/vendor/pub_grub/lib/pub_grub/version.rb
  208 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/vendor/pub_grub/lib/pub_grub.rb
  209 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/vendored_pub_grub.rb
  210 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/resolver/package.rb
  211 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/resolver/base.rb
  212 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/resolver/spec_group.rb
  213 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/resolver/candidate.rb
  214 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/resolver/incompatibility.rb
  215 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/resolver/root.rb
  216 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/resolver.rb
  217 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/source_map.rb
  218 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/ruby_version.rb
  219 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/gem_version_promoter.rb
  220 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/source/gemspec.rb
  221 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/index.rb
  222 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/match_remote_metadata.rb
  223 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/remote_specification.rb
  224 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/stub_specification.rb
  225 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/lazy_specification.rb
  226 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/endpoint_specification.rb
  227 /opt/manageiq/manageiq-gemset/gems/bundler-2.5.21/lib/bundler/runtime.rb
  228 /opt/manageiq/manageiq-gemset/gems/msgpack-1.7.2/lib/msgpack/version.rb
  229 /opt/manageiq/manageiq-gemset/extensions/x86_64-linux/3.0.0/msgpack-1.7.2/msgpack/msgpack.so
  230 /opt/manageiq/manageiq-gemset/gems/msgpack-1.7.2/lib/msgpack/buffer.rb
  231 /opt/manageiq/manageiq-gemset/gems/msgpack-1.7.2/lib/msgpack/packer.rb
  232 /opt/manageiq/manageiq-gemset/gems/msgpack-1.7.2/lib/msgpack/unpacker.rb
  233 /opt/manageiq/manageiq-gemset/gems/msgpack-1.7.2/lib/msgpack/factory.rb
  234 /opt/manageiq/manageiq-gemset/gems/msgpack-1.7.2/lib/msgpack/symbol.rb
  235 /opt/manageiq/manageiq-gemset/gems/msgpack-1.7.2/lib/msgpack/core_ext.rb
  236 /opt/manageiq/manageiq-gemset/gems/msgpack-1.7.2/lib/msgpack/timestamp.rb
  237 /opt/manageiq/manageiq-gemset/gems/msgpack-1.7.2/lib/msgpack/time.rb
  238 /opt/manageiq/manageiq-gemset/gems/msgpack-1.7.2/lib/msgpack.rb

* Process memory map:

5607ef60f000-5607ef610000 r-xp 00000000 fd:00 8953300                    /usr/bin/ruby
5607ef810000-5607ef811000 r--p 00001000 fd:00 8953300                    /usr/bin/ruby
5607ef811000-5607ef812000 rw-p 00002000 fd:00 8953300                    /usr/bin/ruby
5607f1367000-5607f2106000 rw-p 00000000 00:00 0                          [heap]
7f5c7ede2000-7f5c7eff3000 r--s 00000000 fd:00 17289955                   /usr/lib64/libc-2.28.so
7f5c7eff3000-7f5c7f014000 r--s 00000000 fd:00 10084724                   /opt/manageiq/manageiq-gemset/extensions/x86_64-linux/3.0.0/msgpack-1.7.2/msgpack/msgpack.so
7f5c7f014000-7f5c7f039000 r--s 00000000 fd:00 17289969                   /usr/lib64/libpthread-2.28.so
7f5c7f039000-7f5c7f3b3000 r--s 00000000 fd:00 17637147                   /usr/lib64/libruby.so.3.0.4
7f5c7f3b3000-7f5c7f3ca000 r-xp 00000000 fd:00 16797830                   /usr/lib64/libgcc_s-8-20210514.so.1
7f5c7f3ca000-7f5c7f5c9000 ---p 00017000 fd:00 16797830                   /usr/lib64/libgcc_s-8-20210514.so.1
7f5c7f5c9000-7f5c7f5ca000 r--p 00016000 fd:00 16797830                   /usr/lib64/libgcc_s-8-20210514.so.1
7f5c7f5ca000-7f5c7f5cb000 rw-p 00017000 fd:00 16797830                   /usr/lib64/libgcc_s-8-20210514.so.1
7f5c7f5cb000-7f5c7f5df000 r-xp 00000000 fd:00 10084724                   /opt/manageiq/manageiq-gemset/extensions/x86_64-linux/3.0.0/msgpack-1.7.2/msgpack/msgpack.so
7f5c7f5df000-7f5c7f7df000 ---p 00014000 fd:00 10084724                   /opt/manageiq/manageiq-gemset/extensions/x86_64-linux/3.0.0/msgpack-1.7.2/msgpack/msgpack.so
7f5c7f7df000-7f5c7f7e0000 r--p 00014000 fd:00 10084724                   /opt/manageiq/manageiq-gemset/extensions/x86_64-linux/3.0.0/msgpack-1.7.2/msgpack/msgpack.so
7f5c7f7e0000-7f5c7f7e1000 rw-p 00015000 fd:00 10084724                   /opt/manageiq/manageiq-gemset/extensions/x86_64-linux/3.0.0/msgpack-1.7.2/msgpack/msgpack.so
7f5c7f7e1000-7f5c7f7e8000 r-xp 00000000 fd:00 497682                     /usr/lib64/ruby/pathname.so
7f5c7f7e8000-7f5c7f9e8000 ---p 00007000 fd:00 497682                     /usr/lib64/ruby/pathname.so
7f5c7f9e8000-7f5c7f9e9000 r--p 00007000 fd:00 497682                     /usr/lib64/ruby/pathname.so
7f5c7f9e9000-7f5c7f9ea000 rw-p 00000000 00:00 0
7f5c7f9ea000-7f5c7f9ec000 r-xp 00000000 fd:00 497678                     /usr/lib64/ruby/monitor.so
7f5c7f9ec000-7f5c7fbeb000 ---p 00002000 fd:00 497678                     /usr/lib64/ruby/monitor.so
7f5c7fbeb000-7f5c7fbec000 r--p 00001000 fd:00 497678                     /usr/lib64/ruby/monitor.so
7f5c7fbec000-7f5c7fbed000 rw-p 00000000 00:00 0
7f5c7fbed000-7f5c7fbf0000 r-xp 00000000 fd:00 497670                     /usr/lib64/ruby/enc/trans/transdb.so
7f5c7fbf0000-7f5c7fdef000 ---p 00003000 fd:00 497670                     /usr/lib64/ruby/enc/trans/transdb.so
7f5c7fdef000-7f5c7fdf0000 r--p 00002000 fd:00 497670                     /usr/lib64/ruby/enc/trans/transdb.so
7f5c7fdf0000-7f5c7fdf1000 rw-p 00000000 00:00 0
7f5c7fdf1000-7f5c7fdf3000 r-xp 00000000 fd:00 25747085                   /usr/lib64/ruby/enc/encdb.so
7f5c7fdf3000-7f5c7fff2000 ---p 00002000 fd:00 25747085                   /usr/lib64/ruby/enc/encdb.so
7f5c7fff2000-7f5c7fff3000 r--p 00001000 fd:00 25747085                   /usr/lib64/ruby/enc/encdb.so
7f5c7fff3000-7f5c81648000 rw-p 00000000 00:00 0
7f5c81648000-7f5c81649000 ---p 00000000 00:00 0
7f5c81649000-7f5c816ea000 rw-p 00000000 00:00 0
7f5c816ea000-7f5c816eb000 ---p 00000000 00:00 0
7f5c816eb000-7f5c8178c000 rw-p 00000000 00:00 0
7f5c8178c000-7f5c8178d000 ---p 00000000 00:00 0
7f5c8178d000-7f5c8182e000 rw-p 00000000 00:00 0
7f5c8182e000-7f5c8182f000 ---p 00000000 00:00 0
7f5c8182f000-7f5c818d0000 rw-p 00000000 00:00 0
7f5c818d0000-7f5c818d1000 ---p 00000000 00:00 0
7f5c818d1000-7f5c81972000 rw-p 00000000 00:00 0
7f5c81972000-7f5c81973000 ---p 00000000 00:00 0
7f5c81973000-7f5c81a14000 rw-p 00000000 00:00 0
7f5c81a14000-7f5c81a15000 ---p 00000000 00:00 0
7f5c81a15000-7f5c81ab6000 rw-p 00000000 00:00 0
7f5c81ab6000-7f5c81ab7000 ---p 00000000 00:00 0
7f5c81ab7000-7f5c81b58000 rw-p 00000000 00:00 0
7f5c81b58000-7f5c81b59000 ---p 00000000 00:00 0
7f5c81b59000-7f5c81bfa000 rw-p 00000000 00:00 0
7f5c81bfa000-7f5c81bfb000 ---p 00000000 00:00 0
7f5c81bfb000-7f5c81c9c000 rw-p 00000000 00:00 0
7f5c81c9c000-7f5c81c9d000 ---p 00000000 00:00 0
7f5c81c9d000-7f5c81d3e000 rw-p 00000000 00:00 0
7f5c81d3e000-7f5c81d3f000 ---p 00000000 00:00 0
7f5c81d3f000-7f5c81de0000 rw-p 00000000 00:00 0
7f5c81de0000-7f5c81de1000 ---p 00000000 00:00 0
7f5c81de1000-7f5c81e82000 rw-p 00000000 00:00 0
7f5c81e82000-7f5c81e83000 ---p 00000000 00:00 0
7f5c81e83000-7f5c81f24000 rw-p 00000000 00:00 0
7f5c81f24000-7f5c81f25000 ---p 00000000 00:00 0
7f5c81f25000-7f5c81fc6000 rw-p 00000000 00:00 0
7f5c81fc6000-7f5c81fc7000 ---p 00000000 00:00 0
7f5c81fc7000-7f5c82068000 rw-p 00000000 00:00 0
7f5c82068000-7f5c82069000 ---p 00000000 00:00 0
7f5c82069000-7f5c8210a000 rw-p 00000000 00:00 0
7f5c8210a000-7f5c8210b000 ---p 00000000 00:00 0
7f5c8210b000-7f5c821ac000 rw-p 00000000 00:00 0
7f5c821ac000-7f5c821ad000 ---p 00000000 00:00 0
7f5c821ad000-7f5c8224e000 rw-p 00000000 00:00 0
7f5c8224e000-7f5c8224f000 ---p 00000000 00:00 0
7f5c8224f000-7f5c822f0000 rw-p 00000000 00:00 0
7f5c822f0000-7f5c822f1000 ---p 00000000 00:00 0
7f5c822f1000-7f5c82392000 rw-p 00000000 00:00 0
7f5c82392000-7f5c82393000 ---p 00000000 00:00 0
7f5c82393000-7f5c82434000 rw-p 00000000 00:00 0
7f5c82434000-7f5c82435000 ---p 00000000 00:00 0
7f5c82435000-7f5c824d6000 rw-p 00000000 00:00 0
7f5c824d6000-7f5c824d7000 ---p 00000000 00:00 0
7f5c824d7000-7f5c82578000 rw-p 00000000 00:00 0
7f5c82578000-7f5c82579000 ---p 00000000 00:00 0
7f5c82579000-7f5c8261a000 rw-p 00000000 00:00 0
7f5c8261a000-7f5c8261b000 ---p 00000000 00:00 0
7f5c8261b000-7f5c826bc000 rw-p 00000000 00:00 0
7f5c826bc000-7f5c826bd000 ---p 00000000 00:00 0
7f5c826bd000-7f5c8275e000 rw-p 00000000 00:00 0
7f5c8275e000-7f5c8275f000 ---p 00000000 00:00 0
7f5c8275f000-7f5c82800000 rw-p 00000000 00:00 0
7f5c82800000-7f5c82801000 ---p 00000000 00:00 0
7f5c82801000-7f5c828a2000 rw-p 00000000 00:00 0
7f5c828a2000-7f5c828a3000 ---p 00000000 00:00 0
7f5c828a3000-7f5c82944000 rw-p 00000000 00:00 0
7f5c82944000-7f5c82945000 ---p 00000000 00:00 0
7f5c82945000-7f5c829e6000 rw-p 00000000 00:00 0
7f5c829e6000-7f5c829e7000 ---p 00000000 00:00 0
7f5c829e7000-7f5c84a88000 rw-p 00000000 00:00 0
7f5c84a8d000-7f5c84aee000 rw-p 00000000 00:00 0
7f5c84aee000-7f5c84cbb000 r-xp 00000000 fd:00 17289955                   /usr/lib64/libc-2.28.so
7f5c84cbb000-7f5c84eba000 ---p 001cd000 fd:00 17289955                   /usr/lib64/libc-2.28.so
7f5c84eba000-7f5c84ebe000 r--p 001cc000 fd:00 17289955                   /usr/lib64/libc-2.28.so
7f5c84ebe000-7f5c84ec0000 rw-p 001d0000 fd:00 17289955                   /usr/lib64/libc-2.28.so
7f5c84ec0000-7f5c84ec4000 rw-p 00000000 00:00 0
7f5c84ec4000-7f5c85045000 r-xp 00000000 fd:00 17289959                   /usr/lib64/libm-2.28.so
7f5c85045000-7f5c85244000 ---p 00181000 fd:00 17289959                   /usr/lib64/libm-2.28.so
7f5c85244000-7f5c85245000 r--p 00180000 fd:00 17289959                   /usr/lib64/libm-2.28.so
7f5c85245000-7f5c85246000 rw-p 00181000 fd:00 17289959                   /usr/lib64/libm-2.28.so
7f5c85246000-7f5c85266000 r-xp 00000000 fd:00 17290144                   /usr/lib64/libcrypt.so.1.1.0
7f5c85266000-7f5c85465000 ---p 00020000 fd:00 17290144                   /usr/lib64/libcrypt.so.1.1.0
7f5c85465000-7f5c85466000 r--p 0001f000 fd:00 17290144                   /usr/lib64/libcrypt.so.1.1.0
7f5c85466000-7f5c8546f000 rw-p 00000000 00:00 0
7f5c8546f000-7f5c85472000 r-xp 00000000 fd:00 17289957                   /usr/lib64/libdl-2.28.so
7f5c85472000-7f5c85671000 ---p 00003000 fd:00 17289957                   /usr/lib64/libdl-2.28.so
7f5c85671000-7f5c85672000 r--p 00002000 fd:00 17289957                   /usr/lib64/libdl-2.28.so
7f5c85672000-7f5c85673000 rw-p 00003000 fd:00 17289957                   /usr/lib64/libdl-2.28.so
7f5c85673000-7f5c85709000 r-xp 00000000 fd:00 17290312                   /usr/lib64/libgmp.so.10.3.2
7f5c85709000-7f5c85908000 ---p 00096000 fd:00 17290312                   /usr/lib64/libgmp.so.10.3.2
7f5c85908000-7f5c8590a000 r--p 00095000 fd:00 17290312                   /usr/lib64/libgmp.so.10.3.2
7f5c8590a000-7f5c8590b000 rw-p 00097000 fd:00 17290312                   /usr/lib64/libgmp.so.10.3.2
7f5c8590b000-7f5c85912000 r-xp 00000000 fd:00 17289973                   /usr/lib64/librt-2.28.so
7f5c85912000-7f5c85b11000 ---p 00007000 fd:00 17289973                   /usr/lib64/librt-2.28.so
7f5c85b11000-7f5c85b12000 r--p 00006000 fd:00 17289973                   /usr/lib64/librt-2.28.so
7f5c85b12000-7f5c85b13000 rw-p 00007000 fd:00 17289973                   /usr/lib64/librt-2.28.so
7f5c85b13000-7f5c85b2e000 r-xp 00000000 fd:00 17289969                   /usr/lib64/libpthread-2.28.so
7f5c85b2e000-7f5c85d2d000 ---p 0001b000 fd:00 17289969                   /usr/lib64/libpthread-2.28.so
7f5c85d2d000-7f5c85d2e000 r--p 0001a000 fd:00 17289969                   /usr/lib64/libpthread-2.28.so
7f5c85d2e000-7f5c85d2f000 rw-p 0001b000 fd:00 17289969                   /usr/lib64/libpthread-2.28.so
7f5c85d2f000-7f5c85d33000 rw-p 00000000 00:00 0
7f5c85d33000-7f5c85d49000 r-xp 00000000 fd:00 17290116                   /usr/lib64/libz.so.1.2.11
7f5c85d49000-7f5c85f49000 ---p 00016000 fd:00 17290116                   /usr/lib64/libz.so.1.2.11
7f5c85f49000-7f5c85f4a000 r--p 00016000 fd:00 17290116                   /usr/lib64/libz.so.1.2.11
7f5c85f4a000-7f5c85f4b000 rw-p 00000000 00:00 0
7f5c85f4b000-7f5c862a9000 r-xp 00000000 fd:00 17637147                   /usr/lib64/libruby.so.3.0.4
7f5c862a9000-7f5c864a9000 ---p 0035e000 fd:00 17637147                   /usr/lib64/libruby.so.3.0.4
7f5c864a9000-7f5c864b3000 r--p 0035e000 fd:00 17637147                   /usr/lib64/libruby.so.3.0.4
7f5c864b3000-7f5c864b4000 rw-p 00368000 fd:00 17637147                   /usr/lib64/libruby.so.3.0.4
7f5c864b4000-7f5c864c4000 rw-p 00000000 00:00 0
7f5c864c4000-7f5c864f3000 r-xp 00000000 fd:00 17289948                   /usr/lib64/ld-2.28.so
7f5c864f8000-7f5c8668d000 rw-p 00000000 00:00 0
7f5c8668d000-7f5c86694000 r--s 00000000 fd:00 17290069                   /usr/lib64/gconv/gconv-modules.cache
7f5c86694000-7f5c866e7000 r--p 00000000 fd:00 25694168                   /usr/lib/locale/C.utf8/LC_CTYPE
7f5c866e7000-7f5c866ed000 rw-p 00000000 00:00 0
7f5c866ef000-7f5c866f3000 r--s 00000000 fd:00 8953300                    /usr/bin/ruby
7f5c866f3000-7f5c866f4000 r--p 0002f000 fd:00 17289948                   /usr/lib64/ld-2.28.so
7f5c866f4000-7f5c866f6000 rw-p 00030000 fd:00 17289948                   /usr/lib64/ld-2.28.so
7ffcbfec6000-7ffcc06c5000 rw-p 00000000 00:00 0                          [stack]
7ffcc078a000-7ffcc078e000 r--p 00000000 00:00 0                          [vvar]
7ffcc078e000-7ffcc0790000 r-xp 00000000 00:00 0                          [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]


Aborted (core dumped)

Some system info:

[root@192 ~]# rpm -qa | grep ruby | sort
ruby-3.0.4-141.module_el8.6.0+1204+755ae676.x86_64
ruby-default-gems-3.0.4-141.module_el8.6.0+1204+755ae676.noarch
ruby-devel-3.0.4-141.module_el8.6.0+1204+755ae676.x86_64
rubygem-bigdecimal-3.0.0-141.module_el8.6.0+1204+755ae676.x86_64
rubygem-bundler-2.2.33-141.module_el8.6.0+1204+755ae676.noarch
rubygem-io-console-0.5.7-141.module_el8.6.0+1204+755ae676.x86_64
rubygem-irb-1.3.5-141.module_el8.6.0+1204+755ae676.noarch
rubygem-json-2.5.1-141.module_el8.6.0+1204+755ae676.x86_64
rubygem-psych-3.3.2-141.module_el8.6.0+1204+755ae676.x86_64
rubygem-rdoc-6.3.3-141.module_el8.6.0+1204+755ae676.noarch
rubygems-3.2.33-141.module_el8.6.0+1204+755ae676.noarch
ruby-libs-3.0.4-141.module_el8.6.0+1204+755ae676.x86_64

[root@192 ~]# cat /etc/redhat-release
CentOS Stream release 8

[root@192 ~]# uname -a
Linux 192.168.x.x.local 4.18.0-553.6.1.el8.x86_64 #1 SMP Thu May 30 04:13:58 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
@byroot
Copy link
Member

byroot commented Oct 15, 2024

So as mentioned on the other issue, I can't repro even with 3.0.3 even in docker.

But it's a debian base and on ARM64, not red-hat, so hard to tell what kind of patches may have been applied to ruby, or if the bug is x86 only, or dependent of some specific system tuning.

The RSTRING_PTR is returning NULL!! message makes me wonder if perhaps overcommit is disabled on that system? Which would cause a huge alloc to return NULL rather than a valid pointer? Just a guess.

@Fryguy
Copy link
Author

Fryguy commented Oct 15, 2024

Looks like overcommit is enabled

$ cat /proc/sys/vm/overcommit_memory 
0
$ cat /proc/sys/vm/overcommit_ratio
50
$ cat /proc/sys/vm/overcommit_kbytes
0

@byroot
Copy link
Member

byroot commented Oct 15, 2024

Yeah, probably isn't that. I'm trying to get some reproducer in Docker, using centos:8, but running in all sorts of issues (e.g. can't resolve mirrorlist.centos.org). Not being familiar at all with the RH/centos family of distros :/

@Fryguy
Copy link
Author

Fryguy commented Oct 15, 2024

Oh yeah, centos 8 is a pain because they just went into the vault. Unfortunately, we have to cut a new version of an older release, and that's what that release is on...it wasn't until cutting the release that we found this segfault.

I'm also trying to get a docker image - here's what I got so far, but it passes just fine (using ubi8)

FROM registry.access.redhat.com/ubi8/ubi

RUN dnf -y module enable ruby:3.0 && \
    dnf -y install ruby ruby-devel gcc make
RUN gem install msgpack -v 1.7.2
ADD segfault.rb /
ENTRYPOINT ["ruby", "segfault.rb"]

@byroot
Copy link
Member

byroot commented Oct 15, 2024

Ok, so I managed to get Ruby 3.0.4 installed from centos 8 after quite a lot of pain, but still doesn't reproduce for me (still on ARM64 though).

@Fryguy
Copy link
Author

Fryguy commented Oct 15, 2024

Not sure if this helps, but looking at the generated Makefiles for the failing 1.7.2 and the working 1.7.3 I noticed this:

diff --git a/opt/manageiq/manageiq-gemset/gems/msgpack-1.7.2/ext/msgpack/Makefile b/opt/manageiq/manageiq-gemset/gems/msgpack-1.7.3/ext/msgpack/Makefile
index 69a2a0c..9106c87 100644
--- a/opt/manageiq/manageiq-gemset/gems/msgpack-1.7.2/ext/msgpack/Makefile
+++ b/opt/manageiq/manageiq-gemset/gems/msgpack-1.7.3/ext/msgpack/Makefile
@@ -32,8 +32,8 @@ rubygemsdir = $(DESTDIR)/usr/share/rubygems
 vendorarchdir = $(DESTDIR)/usr/lib64/ruby/vendor_ruby
 vendorlibdir = $(vendordir)
 vendordir = $(DESTDIR)/usr/share/ruby/vendor_ruby
-sitearchdir = $(DESTDIR)./.gem.20241007-2975-tj4odq
-sitelibdir = $(DESTDIR)./.gem.20241007-2975-tj4odq
+sitearchdir = $(DESTDIR)./.gem.20241015-14952-yysfs2
+sitelibdir = $(DESTDIR)./.gem.20241015-14952-yysfs2
 sitedir = $(DESTDIR)/usr/local/share/ruby/site_ruby
 rubyarchdir = $(rubyarchprefix)
 rubylibdir = $(rubylibprefix)
@@ -84,7 +84,7 @@ debugflags = -ggdb3
 warnflags = -Wall -Wextra -Wdeprecated-declarations -Wduplicated-cond -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wwrite-strings -Wimplicit-fallthrough=0 -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-packed-bitfield-compat -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wsuggest-attribute=format -Wsuggest-attribute=noreturn -Wunused-variable
 cppflags =
 CCDLFLAGS = -fPIC
-CFLAGS   = $(CCDLFLAGS) -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fPIC -fvisibility=hidden -I.. -Wall -O3 -std=gnu99 -ggdb3 -DHASH_ASET_DEDUPE=1 -DSTR_UMINUS_DEDUPE_FROZEN=1 $(ARCH_FLAG)
+CFLAGS   = $(CCDLFLAGS) -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fPIC -fvisibility=hidden -I.. -Wall -O3 -std=gnu99 -ggdb3 -DRB_ENC_INTERNED_STR_NULL_CHECK=1 -DHASH_ASET_DEDUPE=1 -DSTR_UMINUS_DEDUPE_FROZEN=1 $(ARCH_FLAG)
 INCFLAGS = -I. -I$(arch_hdrdir) -I$(hdrdir)/ruby/backward -I$(hdrdir) -I$(srcdir)
 DEFS     =
 CPPFLAGS = -DHAVE_RB_ENC_INTERNED_STR -DHAVE_RB_PROC_CALL_WITH_BLOCK  $(DEFS) $(cppflags)
@@ -110,7 +110,6 @@ sitearch = $(arch)
 ruby_version = 3.0.0
 ruby = $(bindir)/$(RUBY_BASE_NAME)
 RUBY = $(ruby)
-BUILTRUBY = $(bindir)/$(RUBY_BASE_NAME)
 ruby_headers = $(hdrdir)/ruby.h $(hdrdir)/ruby/backward.h $(hdrdir)/ruby/ruby.h $(hdrdir)/ruby/defines.h $(hdrdir)/ruby/missing.h $(hdrdir)/ruby/intern.h $(hdrdir)/ruby/st.h $(hdrdir)/ruby/subst.h $(arch_hdrdir)/ruby/config.h

 RM = rm -f

That -DRB_ENC_INTERNED_STR_NULL_CHECK=1 feels suspicious. Not sure what causes that to appear.

@byroot
Copy link
Member

byroot commented Oct 15, 2024

RB_ENC_INTERNED_STR_NULL_CHECK

Oh yeah, I was suspecting that, and that will do it.

This flag is for a know Ruby 3.0 bug. We check the Ruby version for it, it was fixed in Ruby 3.0.5:

if RUBY_VERSION.start_with?('3.0.') && RUBY_VERSION <= '3.0.5'

If somehow your generated Makefile didn't set this flag, then an empty string combined with the freeze: true flag will run into exactly the bug you describe.

@byroot
Copy link
Member

byroot commented Oct 15, 2024

@Fryguy
Copy link
Author

Fryguy commented Oct 15, 2024

Awesome this helps a lot - It's very likely this, though I'm not sure why the gem we built is missing this for one but not the other...I can dig into this, but I'm suspecting this is the reason.

@Fryguy
Copy link
Author

Fryguy commented Oct 15, 2024

@byroot Thank you so much for digging into this with me...we understand what's happening now so I'm going to close this.

Our application has 2 deployable form factors, containerized and a virtual machine appliance. Our build process first builds our application and its dependencies into rpms from within a container env (which is ubi8) and those rpms are pushed to a yum repository. Later we install those rpms into the final deployable container image (which is ubi8) as well as a virtual machine appliance image (which is centos8-stream).

So, the weird part here is that centos8-stream is EOL, but Red Hat has been continuing to keep ubi8 up to date, and they are now out of sync. centos8-stream ships with Ruby 3.0.4 and ubi8 ships with Ruby 3.0.7. Thus, when we built msgpack it was built against Ruby 3.0.7, but then when we deployed in the appliance it was running with Ruby 3.0.4.

When I manually built 1.7.3 on the appliance during this investigation, what I actually did was align the Ruby versions unknowingly, which is why it worked. 1.7.3 wasn't the fix at all. In fact, I uninstalled the 1.7.2 gem, and just rebuilt it again on the appliance, and suddenly 1.7.2 worked, because, again, I just aligned the Ruby version.

It really was just a perfect storm where the Ruby versions just happened to straddle this exact bug 😭 .

Again thank you for helping us dig in!

@Fryguy Fryguy closed this as completed Oct 15, 2024
@byroot
Copy link
Member

byroot commented Oct 15, 2024

when we built msgpack it was built against Ruby 3.0.7, but then when we deployed in the appliance it was running with Ruby 3.0.4.

Ouch. Yeah, that hurt.

@delphaber
Copy link

I came here from #368 only to know how the episode on the odd segfault ended :D

Kudos to both of you for dedication on a single bug and for sharing this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants