ml.ruby-lang.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

ruby-core

Thread Start a new thread
Download
Threads by month
  • ----- 2025 -----
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
ruby-core@ml.ruby-lang.org

March 2024

  • 5 participants
  • 258 discussions
[ruby-core:115226] [Ruby master Bug#19984] `make test-bundler-parallel` fails with ` --enable-shared`
by vo.x (Vit Ondruch) 08 Oct '24

08 Oct '24
Issue #19984 has been reported by vo.x (Vit Ondruch). ---------------------------------------- Bug #19984: `make test-bundler-parallel` fails with ` --enable-shared` https://bugs.ruby-lang.org/issues/19984 * Author: vo.x (Vit Ondruch) * Status: Open * Priority: Normal * ruby -v: ruby 3.3.0dev (2023-11-01 master a1e24ab484) [x86_64-linux] * Backport: 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN ---------------------------------------- ~~~ + ./configure --enable-shared checking for ruby... false ... snip ... config.status: creating Makefile --- Configuration summary for ruby version 3.3.0 * Installation prefix: /usr/local * exec prefix: ${prefix} * arch: x86_64-linux * site arch: ${arch} * RUBY_BASE_NAME: ruby * enable shared: yes * ruby lib prefix: ${libdir}/${RUBY_BASE_NAME} * site libraries path: ${rubylibprefix}/${sitearch} * vendor path: ${rubylibprefix}/vendor_ruby * target OS: linux * compiler: gcc * with thread: pthread * with coroutine: amd64 * enable shared libs: yes * dynamic library ext: so * CFLAGS: ${optflags} ${debugflags} ${warnflags} * LDFLAGS: -L. -Wl,-z,relro -Wl,--as-needed -Wl,-z,now \ -specs=/usr/lib/rpm/redhat/redhat-hardened-ld \ -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 \ -Wl,--build-id=sha1 -fstack-protector-strong \ -rdynamic -Wl,-export-dynamic -Wl,--no-as-needed * DLDFLAGS: -Wl,-z,relro -Wl,--as-needed -Wl,-z,now \ -specs=/usr/lib/rpm/redhat/redhat-hardened-ld \ -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 \ -Wl,--build-id=sha1 \ -Wl,--compress-debug-sections=zlib * optflags: -O3 -fno-fast-math * debugflags: -ggdb3 * warnflags: -Wall -Wextra -Wdeprecated-declarations \ -Wdiv-by-zero -Wduplicated-cond \ -Wimplicit-function-declaration -Wimplicit-int \ -Wpointer-arith -Wwrite-strings \ -Wold-style-definition -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 \ -Wmisleading-indentation -Wundef * strip command: strip -S -x * install doc: rdoc * YJIT support: yes * RJIT support: yes * man page type: doc --- $ make -O -j8 V=1 VERBOSE=1 'COPY=cp -p' BASERUBY = echo executable host ruby is required. use --with-baseruby option.; false CC = gcc LD = ld LDSHARED = gcc -shared CFLAGS = -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Werror=implicit-function-declaration -Werror=implicit-int -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fPIC -m64 XCFLAGS = -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fno-strict-overflow -fvisibility=hidden -fexcess-precision=standard -DRUBY_EXPORT -I. -I.ext/include/x86_64-linux -I./include -I. -I./prism -I./enc/unicode/15.0.0 CPPFLAGS = DLDFLAGS = -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -Wl,--compress-debug-sections=zlib -Wl,-soname,libruby.so.3.3 -fstack-protector-strong -m64 SOLIBS = -lz -lrt -lrt -lgmp -ldl -lcrypt -lm -lpthread LANG = C.UTF-8 LC_ALL = LC_CTYPE = MFLAGS = -j8 -Otarget --jobserver-auth=fifo:/tmp/GMfifo10180 --sync-mutex=fnm:/tmp/GmCLOiGB RUSTC = rustc YJIT_RUSTC_ARGS = --crate-name=yjit --crate-type=staticlib --edition=2021 -g -C lto=thin -C opt-level=3 -C overflow-checks=on '--out-dir=/builddir/build/BUILD/ruby-3.3.0-a1e24ab484/yjit/target/release/' ./yjit/src/lib.rs gcc (GCC) 13.2.1 20231011 (Red Hat 13.2.1-4) Copyright (C) 2023 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. gcc -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Werror=implicit-function-declaration -Werror=implicit-int -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fPIC -m64 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fno-strict-overflow -fvisibility=hidden -fexcess-precision=standard -DRUBY_EXPORT -I. -I.ext/include/x86_64-linux -I./include -I. -I./prism -I./enc/unicode/15.0.0 -o dmyext.o -c dmyext.c ... snip ... $ make test-bundler-parallel BASERUBY = echo executable host ruby is required. use --with-baseruby option.; false CC = gcc LD = ld LDSHARED = gcc -shared CFLAGS = -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Werror=implicit-function-declaration -Werror=implicit-int -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fPIC -m64 XCFLAGS = -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fno-strict-overflow -fvisibility=hidden -fexcess-precision=standard -DRUBY_EXPORT -I. -I.ext/include/x86_64-linux -I./include -I. -I./prism -I./enc/unicode/15.0.0 CPPFLAGS = DLDFLAGS = -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -Wl,--compress-debug-sections=zlib -Wl,-soname,libruby.so.3.3 -fstack-protector-strong -m64 SOLIBS = -lz -lrt -lrt -lgmp -ldl -lcrypt -lm -lpthread LANG = C.UTF-8 LC_ALL = LC_CTYPE = MFLAGS = RUSTC = rustc YJIT_RUSTC_ARGS = --crate-name=yjit --crate-type=staticlib --edition=2021 -g -C lto=thin -C opt-level=3 -C overflow-checks=on '--out-dir=/builddir/build/BUILD/ruby-3.3.0-a1e24ab484/yjit/target/release/' ./yjit/src/lib.rs gcc (GCC) 13.2.1 20231011 (Red Hat 13.2.1-4) Copyright (C) 2023 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. generating enc.mk making srcs under enc make[1]: Entering directory '/builddir/build/BUILD/ruby-3.3.0-a1e24ab484' make[1]: Nothing to be done for 'srcs'. make[1]: Leaving directory '/builddir/build/BUILD/ruby-3.3.0-a1e24ab484' generating transdb.h transdb.h unchanged generating makefiles ext/configure-ext.mk ext/configure-ext.mk updated make[1]: Entering directory '/builddir/build/BUILD/ruby-3.3.0-a1e24ab484' make[1]: Leaving directory '/builddir/build/BUILD/ruby-3.3.0-a1e24ab484' generating makefile exts.mk exts.mk unchanged make[1]: Entering directory '/builddir/build/BUILD/ruby-3.3.0-a1e24ab484' make[2]: Entering directory '/builddir/build/BUILD/ruby-3.3.0-a1e24ab484/ext/bigdecimal' installing default bigdecimal libraries make[2]: Leaving directory '/builddir/build/BUILD/ruby-3.3.0-a1e24ab484/ext/bigdecimal' make[2]: Entering directory '/builddir/build/BUILD/ruby-3.3.0-a1e24ab484/ext/coverage' installing default coverage libraries make[2]: Leaving directory '/builddir/build/BUILD/ruby-3.3.0-a1e24ab484/ext/coverage' make[2]: Entering directory '/builddir/build/BUILD/ruby-3.3.0-a1e24ab484/ext/date' installing default date_core libraries make[2]: Leaving directory '/builddir/build/BUILD/ruby-3.3.0-a1e24ab484/ext/date' make[2]: Entering directory '/builddir/build/BUILD/ruby-3.3.0-a1e24ab484/ext/digest' installing digest libraries installing default digest libraries make[2]: Leaving directory '/builddir/build/BUILD/ruby-3.3.0-a1e24ab484/ext/digest' make[2]: Entering directory '/builddir/build/BUILD/ruby-3.3.0-a1e24ab484/ext/digest/sha2' installing default sha2 libraries make[2]: Leaving directory '/builddir/build/BUILD/ruby-3.3.0-a1e24ab484/ext/digest/sha2' make[2]: Entering directory '/builddir/build/BUILD/ruby-3.3.0-a1e24ab484/ext/fiddle' installing default fiddle libraries make[2]: Leaving directory '/builddir/build/BUILD/ruby-3.3.0-a1e24ab484/ext/fiddle' make[2]: Entering directory '/builddir/build/BUILD/ruby-3.3.0-a1e24ab484/ext/io/console' installing default console libraries make[2]: Leaving directory '/builddir/build/BUILD/ruby-3.3.0-a1e24ab484/ext/io/console' make[2]: Entering directory '/builddir/build/BUILD/ruby-3.3.0-a1e24ab484/ext/json' installing default libraries make[2]: Leaving directory '/builddir/build/BUILD/ruby-3.3.0-a1e24ab484/ext/json' make[2]: Entering directory '/builddir/build/BUILD/ruby-3.3.0-a1e24ab484/ext/monitor' installing default monitor libraries make[2]: Leaving directory '/builddir/build/BUILD/ruby-3.3.0-a1e24ab484/ext/monitor' make[2]: Entering directory '/builddir/build/BUILD/ruby-3.3.0-a1e24ab484/ext/nkf' installing default nkf libraries make[2]: Leaving directory '/builddir/build/BUILD/ruby-3.3.0-a1e24ab484/ext/nkf' make[2]: Entering directory '/builddir/build/BUILD/ruby-3.3.0-a1e24ab484/ext/objspace' installing default objspace libraries make[2]: Leaving directory '/builddir/build/BUILD/ruby-3.3.0-a1e24ab484/ext/objspace' make[2]: Entering directory '/builddir/build/BUILD/ruby-3.3.0-a1e24ab484/ext/openssl' installing default openssl libraries make[2]: Leaving directory '/builddir/build/BUILD/ruby-3.3.0-a1e24ab484/ext/openssl' make[2]: Entering directory '/builddir/build/BUILD/ruby-3.3.0-a1e24ab484/ext/pathname' installing default pathname libraries make[2]: Leaving directory '/builddir/build/BUILD/ruby-3.3.0-a1e24ab484/ext/pathname' make[2]: Entering directory '/builddir/build/BUILD/ruby-3.3.0-a1e24ab484/ext/psych' installing default psych libraries make[2]: Leaving directory '/builddir/build/BUILD/ruby-3.3.0-a1e24ab484/ext/psych' make[2]: Entering directory '/builddir/build/BUILD/ruby-3.3.0-a1e24ab484/ext/pty' installing default pty libraries make[2]: Leaving directory '/builddir/build/BUILD/ruby-3.3.0-a1e24ab484/ext/pty' make[2]: Entering directory '/builddir/build/BUILD/ruby-3.3.0-a1e24ab484/ext/ripper' installing default ripper libraries make[2]: Leaving directory '/builddir/build/BUILD/ruby-3.3.0-a1e24ab484/ext/ripper' make[2]: Entering directory '/builddir/build/BUILD/ruby-3.3.0-a1e24ab484/ext/rubyvm' installing default libraries make[2]: Leaving directory '/builddir/build/BUILD/ruby-3.3.0-a1e24ab484/ext/rubyvm' make[2]: Entering directory '/builddir/build/BUILD/ruby-3.3.0-a1e24ab484/ext/socket' installing default socket libraries make[2]: Leaving directory '/builddir/build/BUILD/ruby-3.3.0-a1e24ab484/ext/socket' make[2]: Entering directory '/builddir/build/BUILD/ruby-3.3.0-a1e24ab484/ext/syslog' installing default syslog libraries make[2]: Leaving directory '/builddir/build/BUILD/ruby-3.3.0-a1e24ab484/ext/syslog' make[2]: Entering directory '/builddir/build/BUILD/ruby-3.3.0-a1e24ab484/.bundle/gems/debug-1.8.0/ext/debug' make[2]: Leaving directory '/builddir/build/BUILD/ruby-3.3.0-a1e24ab484/.bundle/gems/debug-1.8.0/ext/debug' make[2]: Entering directory '/builddir/build/BUILD/ruby-3.3.0-a1e24ab484/.bundle/gems/racc-1.7.1/ext/racc/cparse' make[2]: Leaving directory '/builddir/build/BUILD/ruby-3.3.0-a1e24ab484/.bundle/gems/racc-1.7.1/ext/racc/cparse' make[2]: Entering directory '/builddir/build/BUILD/ruby-3.3.0-a1e24ab484/.bundle/gems/rbs-3.2.2/ext/rbs_extension' make[2]: Leaving directory '/builddir/build/BUILD/ruby-3.3.0-a1e24ab484/.bundle/gems/rbs-3.2.2/ext/rbs_extension' make[2]: Entering directory '/builddir/build/BUILD/ruby-3.3.0-a1e24ab484' make[2]: 'ruby' is up to date. make[2]: Leaving directory '/builddir/build/BUILD/ruby-3.3.0-a1e24ab484' make[1]: Leaving directory '/builddir/build/BUILD/ruby-3.3.0-a1e24ab484' make[1]: Entering directory '/builddir/build/BUILD/ruby-3.3.0-a1e24ab484' make[1]: Nothing to be done for 'note'. make[1]: Leaving directory '/builddir/build/BUILD/ruby-3.3.0-a1e24ab484' making enc make[1]: Entering directory '/builddir/build/BUILD/ruby-3.3.0-a1e24ab484' make[1]: Nothing to be done for 'enc'. make[1]: Leaving directory '/builddir/build/BUILD/ruby-3.3.0-a1e24ab484' making trans make[1]: Entering directory '/builddir/build/BUILD/ruby-3.3.0-a1e24ab484' make[1]: Nothing to be done for './enc/trans'. make[1]: Leaving directory '/builddir/build/BUILD/ruby-3.3.0-a1e24ab484' making encs make[1]: Entering directory '/builddir/build/BUILD/ruby-3.3.0-a1e24ab484' make[1]: Nothing to be done for 'encs'. make[1]: Leaving directory '/builddir/build/BUILD/ruby-3.3.0-a1e24ab484' generating x86_64-linux-fake.rb x86_64-linux-fake.rb updated ./miniruby -I./lib -I. -I.ext/common ./tool/runruby.rb --extout=.ext -- --disable-gems -C . -Ilib \ -e 'ENV["GEM_HOME"] = File.expand_path(".bundle")' \ -e 'ENV["BUNDLE_APP_CONFIG"] = File.expand_path(".bundle")' \ -e 'ENV["BUNDLE_PATH__SYSTEM"] = "true"' \ -e 'ENV["BUNDLE_WITHOUT"] = "lint doc"' \ -e 'load "spec/bundler/support/bundle.rb"' -- install --quiet --gemfile=tool/bundler/dev_gems.rb ./miniruby -I./lib -I. -I.ext/common ./tool/runruby.rb --extout=.ext -- --disable-gems \ -r./x86_64-linux-fake \ -e "ARGV[-1] = File.expand_path(ARGV[-1])" \ -e "exec(*ARGV)" -- \ ./miniruby -I./lib -I. -I.ext/common ./tool/runruby.rb --extout=.ext -- --disable-gems -I./spec/bundler \ -e "ENV['PARALLEL_TESTS_EXECUTABLE'] = ARGV.shift" \ -e "load ARGV.shift" \ "./miniruby -I./lib -I. -I.ext/common ./tool/runruby.rb --extout=.ext -- --disable-gems -C . -Ispec/bundler:spec/lib .bundle/bin/rspec" \ ./.bundle/bin/parallel_rspec \ -o "--require spec_helper --require formatter_overrides" \ --runtime-log ./tmp/parallel_runtime_rspec.log ./spec/bundler/ 8 processes for 169 specs, ~ 21 specs per process An error occurred in a `before(:suite)` hook. Failure/Error: raise <<~ERROR Invoking `#{cmd}` failed with output: ---------------------------------------------------------------------- #{command_execution.stdboth} ---------------------------------------------------------------------- ERROR RuntimeError: Invoking `/builddir/build/BUILD/ruby-3.3.0-a1e24ab484/ruby -rrubygems /builddir/build/BUILD/ruby-3.3.0-a1e24ab484/bin/gem --backtrace build lib/bundler/bundler.gemspec` failed with output: ---------------------------------------------------------------------- /builddir/build/BUILD/ruby-3.3.0-a1e24ab484/ruby: error while loading shared libraries: libruby.so.3.3: cannot open shared object file: No such file or directory ---------------------------------------------------------------------- # ./spec/bundler/support/helpers.rb:202:in `sys_exec' # ./spec/bundler/support/helpers.rb:165:in `gem_command' # ./spec/bundler/support/helpers.rb:343:in `with_built_bundler' # ./spec/bundler/support/helpers.rb:304:in `block (2 levels) in system_gems' # ./spec/bundler/support/helpers.rb:300:in `each' # ./spec/bundler/support/helpers.rb:300:in `block in system_gems' # ./spec/bundler/support/helpers.rb:357:in `block in with_gem_path_as' # ./spec/bundler/support/helpers.rb:371:in `without_env_side_effects' # ./spec/bundler/support/helpers.rb:352:in `with_gem_path_as' # ./spec/bundler/support/helpers.rb:298:in `system_gems' # ./spec/bundler/spec_helper.rb:92:in `block (2 levels) in <top (required)>' Finished in 0.36529 seconds (files took 0.67828 seconds to load) 0 examples, 0 failures, 1 error occurred outside of examples An error occurred in a `before(:suite)` hook. Failure/Error: raise <<~ERROR Invoking `#{cmd}` failed with output: ---------------------------------------------------------------------- #{command_execution.stdboth} ---------------------------------------------------------------------- ERROR RuntimeError: Invoking `/builddir/build/BUILD/ruby-3.3.0-a1e24ab484/ruby -rrubygems /builddir/build/BUILD/ruby-3.3.0-a1e24ab484/bin/gem --backtrace build lib/bundler/bundler.gemspec` failed with output: ---------------------------------------------------------------------- /builddir/build/BUILD/ruby-3.3.0-a1e24ab484/ruby: error while loading shared libraries: libruby.so.3.3: cannot open shared object file: No such file or directory ---------------------------------------------------------------------- # ./spec/bundler/support/helpers.rb:202:in `sys_exec' # ./spec/bundler/support/helpers.rb:165:in `gem_command' # ./spec/bundler/support/helpers.rb:343:in `with_built_bundler' # ./spec/bundler/support/helpers.rb:304:in `block (2 levels) in system_gems' # ./spec/bundler/support/helpers.rb:300:in `each' # ./spec/bundler/support/helpers.rb:300:in `block in system_gems' # ./spec/bundler/support/helpers.rb:357:in `block in with_gem_path_as' # ./spec/bundler/support/helpers.rb:371:in `without_env_side_effects' # ./spec/bundler/support/helpers.rb:352:in `with_gem_path_as' # ./spec/bundler/support/helpers.rb:298:in `system_gems' # ./spec/bundler/spec_helper.rb:92:in `block (2 levels) in <top (required)>' Finished in 0.4346 seconds (files took 0.62401 seconds to load) 0 examples, 0 failures, 1 error occurred outside of examples An error occurred in a `before(:suite)` hook. Failure/Error: raise <<~ERROR Invoking `#{cmd}` failed with output: ---------------------------------------------------------------------- #{command_execution.stdboth} ---------------------------------------------------------------------- ERROR RuntimeError: Invoking `/builddir/build/BUILD/ruby-3.3.0-a1e24ab484/ruby -rrubygems /builddir/build/BUILD/ruby-3.3.0-a1e24ab484/bin/gem --backtrace build lib/bundler/bundler.gemspec` failed with output: ---------------------------------------------------------------------- /builddir/build/BUILD/ruby-3.3.0-a1e24ab484/ruby: error while loading shared libraries: libruby.so.3.3: cannot open shared object file: No such file or directory ---------------------------------------------------------------------- # ./spec/bundler/support/helpers.rb:202:in `sys_exec' # ./spec/bundler/support/helpers.rb:165:in `gem_command' # ./spec/bundler/support/helpers.rb:343:in `with_built_bundler' # ./spec/bundler/support/helpers.rb:304:in `block (2 levels) in system_gems' # ./spec/bundler/support/helpers.rb:300:in `each' # ./spec/bundler/support/helpers.rb:300:in `block in system_gems' # ./spec/bundler/support/helpers.rb:357:in `block in with_gem_path_as' # ./spec/bundler/support/helpers.rb:371:in `without_env_side_effects' # ./spec/bundler/support/helpers.rb:352:in `with_gem_path_as' # ./spec/bundler/support/helpers.rb:298:in `system_gems' # ./spec/bundler/spec_helper.rb:92:in `block (2 levels) in <top (required)>' Finished in 0.37847 seconds (files took 0.71128 seconds to load) 0 examples, 0 failures, 1 error occurred outside of examples An error occurred in a `before(:suite)` hook. Failure/Error: raise <<~ERROR Invoking `#{cmd}` failed with output: ---------------------------------------------------------------------- #{command_execution.stdboth} ---------------------------------------------------------------------- ERROR RuntimeError: Invoking `/builddir/build/BUILD/ruby-3.3.0-a1e24ab484/ruby -rrubygems /builddir/build/BUILD/ruby-3.3.0-a1e24ab484/bin/gem --backtrace build lib/bundler/bundler.gemspec` failed with output: ---------------------------------------------------------------------- /builddir/build/BUILD/ruby-3.3.0-a1e24ab484/ruby: error while loading shared libraries: libruby.so.3.3: cannot open shared object file: No such file or directory ---------------------------------------------------------------------- # ./spec/bundler/support/helpers.rb:202:in `sys_exec' # ./spec/bundler/support/helpers.rb:165:in `gem_command' # ./spec/bundler/support/helpers.rb:343:in `with_built_bundler' # ./spec/bundler/support/helpers.rb:304:in `block (2 levels) in system_gems' # ./spec/bundler/support/helpers.rb:300:in `each' # ./spec/bundler/support/helpers.rb:300:in `block in system_gems' # ./spec/bundler/support/helpers.rb:357:in `block in with_gem_path_as' # ./spec/bundler/support/helpers.rb:371:in `without_env_side_effects' # ./spec/bundler/support/helpers.rb:352:in `with_gem_path_as' # ./spec/bundler/support/helpers.rb:298:in `system_gems' # ./spec/bundler/spec_helper.rb:92:in `block (2 levels) in <top (required)>' Finished in 0.32898 seconds (files took 0.78975 seconds to load) 0 examples, 0 failures, 1 error occurred outside of examples An error occurred in a `before(:suite)` hook. Failure/Error: raise <<~ERROR Invoking `#{cmd}` failed with output: ---------------------------------------------------------------------- #{command_execution.stdboth} ---------------------------------------------------------------------- ERROR RuntimeError: Invoking `/builddir/build/BUILD/ruby-3.3.0-a1e24ab484/ruby -rrubygems /builddir/build/BUILD/ruby-3.3.0-a1e24ab484/bin/gem --backtrace build lib/bundler/bundler.gemspec` failed with output: ---------------------------------------------------------------------- /builddir/build/BUILD/ruby-3.3.0-a1e24ab484/ruby: error while loading shared libraries: libruby.so.3.3: cannot open shared object file: No such file or directory ---------------------------------------------------------------------- # ./spec/bundler/support/helpers.rb:202:in `sys_exec' # ./spec/bundler/support/helpers.rb:165:in `gem_command' # ./spec/bundler/support/helpers.rb:343:in `with_built_bundler' # ./spec/bundler/support/helpers.rb:304:in `block (2 levels) in system_gems' # ./spec/bundler/support/helpers.rb:300:in `each' # ./spec/bundler/support/helpers.rb:300:in `block in system_gems' # ./spec/bundler/support/helpers.rb:357:in `block in with_gem_path_as' # ./spec/bundler/support/helpers.rb:371:in `without_env_side_effects' # ./spec/bundler/support/helpers.rb:352:in `with_gem_path_as' # ./spec/bundler/support/helpers.rb:298:in `system_gems' # ./spec/bundler/spec_helper.rb:92:in `block (2 levels) in <top (required)>' Finished in 0.41138 seconds (files took 0.77373 seconds to load) 0 examples, 0 failures, 1 error occurred outside of examples An error occurred in a `before(:suite)` hook. Failure/Error: raise <<~ERROR Invoking `#{cmd}` failed with output: ---------------------------------------------------------------------- #{command_execution.stdboth} ---------------------------------------------------------------------- ERROR RuntimeError: Invoking `/builddir/build/BUILD/ruby-3.3.0-a1e24ab484/ruby -rrubygems /builddir/build/BUILD/ruby-3.3.0-a1e24ab484/bin/gem --backtrace build lib/bundler/bundler.gemspec` failed with output: ---------------------------------------------------------------------- /builddir/build/BUILD/ruby-3.3.0-a1e24ab484/ruby: error while loading shared libraries: libruby.so.3.3: cannot open shared object file: No such file or directory ---------------------------------------------------------------------- # ./spec/bundler/support/helpers.rb:202:in `sys_exec' # ./spec/bundler/support/helpers.rb:165:in `gem_command' # ./spec/bundler/support/helpers.rb:343:in `with_built_bundler' # ./spec/bundler/support/helpers.rb:304:in `block (2 levels) in system_gems' # ./spec/bundler/support/helpers.rb:300:in `each' # ./spec/bundler/support/helpers.rb:300:in `block in system_gems' # ./spec/bundler/support/helpers.rb:357:in `block in with_gem_path_as' # ./spec/bundler/support/helpers.rb:371:in `without_env_side_effects' # ./spec/bundler/support/helpers.rb:352:in `with_gem_path_as' # ./spec/bundler/support/helpers.rb:298:in `system_gems' # ./spec/bundler/spec_helper.rb:92:in `block (2 levels) in <top (required)>' Finished in 0.46772 seconds (files took 0.7346 seconds to load) 0 examples, 0 failures, 1 error occurred outside of examples An error occurred in a `before(:suite)` hook. Failure/Error: raise <<~ERROR Invoking `#{cmd}` failed with output: ---------------------------------------------------------------------- #{command_execution.stdboth} ---------------------------------------------------------------------- ERROR RuntimeError: Invoking `/builddir/build/BUILD/ruby-3.3.0-a1e24ab484/ruby -rrubygems /builddir/build/BUILD/ruby-3.3.0-a1e24ab484/bin/gem --backtrace build lib/bundler/bundler.gemspec` failed with output: ---------------------------------------------------------------------- /builddir/build/BUILD/ruby-3.3.0-a1e24ab484/ruby: error while loading shared libraries: libruby.so.3.3: cannot open shared object file: No such file or directory ---------------------------------------------------------------------- # ./spec/bundler/support/helpers.rb:202:in `sys_exec' # ./spec/bundler/support/helpers.rb:165:in `gem_command' # ./spec/bundler/support/helpers.rb:343:in `with_built_bundler' # ./spec/bundler/support/helpers.rb:304:in `block (2 levels) in system_gems' # ./spec/bundler/support/helpers.rb:300:in `each' # ./spec/bundler/support/helpers.rb:300:in `block in system_gems' # ./spec/bundler/support/helpers.rb:357:in `block in with_gem_path_as' # ./spec/bundler/support/helpers.rb:371:in `without_env_side_effects' # ./spec/bundler/support/helpers.rb:352:in `with_gem_path_as' # ./spec/bundler/support/helpers.rb:298:in `system_gems' # ./spec/bundler/spec_helper.rb:92:in `block (2 levels) in <top (required)>' Finished in 0.35757 seconds (files took 0.73007 seconds to load) 0 examples, 0 failures, 1 error occurred outside of examples An error occurred in a `before(:suite)` hook. Failure/Error: raise <<~ERROR Invoking `#{cmd}` failed with output: ---------------------------------------------------------------------- #{command_execution.stdboth} ---------------------------------------------------------------------- ERROR RuntimeError: Invoking `/builddir/build/BUILD/ruby-3.3.0-a1e24ab484/ruby -rrubygems /builddir/build/BUILD/ruby-3.3.0-a1e24ab484/bin/gem --backtrace build lib/bundler/bundler.gemspec` failed with output: ---------------------------------------------------------------------- /builddir/build/BUILD/ruby-3.3.0-a1e24ab484/ruby: error while loading shared libraries: libruby.so.3.3: cannot open shared object file: No such file or directory ---------------------------------------------------------------------- # ./spec/bundler/support/helpers.rb:202:in `sys_exec' # ./spec/bundler/support/helpers.rb:165:in `gem_command' # ./spec/bundler/support/helpers.rb:343:in `with_built_bundler' # ./spec/bundler/support/helpers.rb:304:in `block (2 levels) in system_gems' # ./spec/bundler/support/helpers.rb:300:in `each' # ./spec/bundler/support/helpers.rb:300:in `block in system_gems' # ./spec/bundler/support/helpers.rb:357:in `block in with_gem_path_as' # ./spec/bundler/support/helpers.rb:371:in `without_env_side_effects' # ./spec/bundler/support/helpers.rb:352:in `with_gem_path_as' # ./spec/bundler/support/helpers.rb:298:in `system_gems' # ./spec/bundler/spec_helper.rb:92:in `block (2 levels) in <top (required)>' Finished in 0.24372 seconds (files took 1.05 seconds to load) 0 examples, 0 failures, 1 error occurred outside of examples Tests Failed 8 errors, 0 examples, 0 failures Took 1 seconds make: *** [uncommon.mk:1626: yes-test-bundler-parallel] Error 1 ~~~ -- https://bugs.ruby-lang.org/
3 6
0 0
[ruby-core:117161] [Ruby master Bug#20337] Complex#inspect mutates the string returned by `real.inspect`
by Eregon (Benoit Daloze) 20 Sep '24

20 Sep '24
Issue #20337 has been reported by Eregon (Benoit Daloze). ---------------------------------------- Bug #20337: Complex#inspect mutates the string returned by `real.inspect` https://bugs.ruby-lang.org/issues/20337 * Author: Eregon (Benoit Daloze) * Status: Open * ruby -v: ruby 3.2.2 (2023-03-30 revision e51014f9c0) [x86_64-linux] * Backport: 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN ---------------------------------------- ``` irb(main):001:0> n = Numeric.new => #<Numeric:0x00007f81b2308578> irb(main):004:0> class Numeric; def inspect = super.freeze; end => :inspect irb(main):006:0> Complex(n, 1).inspect (irb):6:in `inspect': can't modify frozen String: "#<Numeric:0x00007f81b2308578>" (FrozenError) from (irb):6:in `<main>' from /home/eregon/.rubies/ruby-3.2.2/lib/ruby/gems/3.2.0/gems/irb-1.6.2/exe/irb:11:in `<top (required)>' from /home/eregon/.rubies/ruby-3.2.2/bin/irb:25:in `load' from /home/eregon/.rubies/ruby-3.2.2/bin/irb:25:in `<main>' ``` It feels wrong to mutate the result of inspect at least in general, for instance `true.inspect` is frozen. Discovered by https://github.com/ruby/spec/pull/1142 -- https://bugs.ruby-lang.org/
2 2
0 0
[ruby-core:116799] [Ruby master Bug#20271] Issue with moving embedded string across ractors
by luke-gru (Luke Gruber) 20 Sep '24

20 Sep '24
Issue #20271 has been reported by luke-gru (Luke Gruber). ---------------------------------------- Bug #20271: Issue with moving embedded string across ractors https://bugs.ruby-lang.org/issues/20271 * Author: luke-gru (Luke Gruber) * Status: Open * Priority: Normal * Backport: 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN ---------------------------------------- When embedded strings are moved, the embedded bytes aren't copied over to the new embedded string. This shows itself when an embedded string has more than 16 characters, and can also be a problem when the MovedObject has been garbage collected and another object has taken its place in the ruby heap. For example: ```ruby r = Ractor.new { foo = receive puts foo foo } obj = "12345678" * 3 puts obj r.send(obj, move: true) r.take ``` ``` 123456781234567812345678 1234567812345678 ``` -- https://bugs.ruby-lang.org/
2 2
0 0
[ruby-core:116779] [Ruby master Bug#20267] Hashes that use ar_table aren't moved properly across ractors
by luke-gru (Luke Gruber) 20 Sep '24

20 Sep '24
Issue #20267 has been reported by luke-gru (Luke Gruber). ---------------------------------------- Bug #20267: Hashes that use ar_table aren't moved properly across ractors https://bugs.ruby-lang.org/issues/20267 * Author: luke-gru (Luke Gruber) * Status: Open * Priority: Normal * Backport: 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN ---------------------------------------- This crashes in debug build and gives weird results in non debug build, because the ar_table values aren't copied over to the new "embedded" hash during a move across ractors. ```ruby r = Ractor.new { hash = receive puts hash } obj = { "1" => 1, "2" => 2, "3" => 3, } puts obj r.send(obj, move: true) r.take ``` Crash log: ``` /home/lukeg/workspace/ruby-build/miniruby(sigsegv+0x4d) [0x5641e67d105d] ../ruby/signal.c:926 /lib/x86_64-linux-gnu/libc.so.6(0x7fb4baa42520) [0x7fb4baa42520] /home/lukeg/workspace/ruby-build/miniruby(RB_BUILTIN_TYPE+0x0) [0x5641e6778db0] ../ruby/ractor.c:3128 /home/lukeg/workspace/ruby-build/miniruby(rbimpl_RB_TYPE_P_fastpath) ../ruby/include/ruby/internal/value_type.h:351 /home/lukeg/workspace/ruby-build/miniruby(RB_TYPE_P) ../ruby/include/ruby/internal/value_type.h:378 /home/lukeg/workspace/ruby-build/miniruby(RB_FL_ABLE) ../ruby/include/ruby/internal/fl_type.h:449 /home/lukeg/workspace/ruby-build/miniruby(RB_FL_TEST_RAW) ../ruby/include/ruby/internal/fl_type.h:471 /home/lukeg/workspace/ruby-build/miniruby(rb_ractor_shareable_p) ../ruby/include/ruby/ractor.h:256 /home/lukeg/workspace/ruby-build/miniruby(reset_belonging_enter) ../ruby/ractor.c:3121 ``` -- https://bugs.ruby-lang.org/
2 2
0 0
[ruby-core:113052] [Ruby master Bug#19562] Setting default_(in|ex)ternal encoding after running an Ractor freezes ruby
by larskanis (Lars Kanis) 20 Sep '24

20 Sep '24
Issue #19562 has been reported by larskanis (Lars Kanis). ---------------------------------------- Bug #19562: Setting default_(in|ex)ternal encoding after running an Ractor freezes ruby https://bugs.ruby-lang.org/issues/19562 * Author: larskanis (Lars Kanis) * Status: Open * Priority: Normal * ruby -v: ruby 3.2.1 (2023-02-08 revision 31819e82c8) [x86_64-linux] * Backport: 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN ---------------------------------------- The following command blocks infinitely and must be killed with "kill -9" ``` ruby -e "Ractor.new{}.take; Encoding.default_external = Encoding::ISO8859_2" ``` Backtrace is: ``` #0 futex_wait (private=0, expected=2, futex_word=0x55555555abd0) at ../sysdeps/nptl/futex-internal.h:146 #1 __GI___lll_lock_wait (futex=futex@entry=0x55555555abd0, private=0) at ./nptl/lowlevellock.c:49 #2 0x00007ffff760a082 in lll_mutex_lock_optimized (mutex=0x55555555abd0) at ./nptl/pthread_mutex_lock.c:48 #3 ___pthread_mutex_lock (mutex=mutex@entry=0x55555555abd0) at ./nptl/pthread_mutex_lock.c:93 #4 0x00007ffff7c5a40d in rb_native_mutex_lock (lock=lock@entry=0x55555555abd0) at ruby-3.2.1/thread_pthread.c:556 #5 0x00007ffff7cc5376 in vm_lock_enter (cr=0x55555555deb0, vm=0x55555555aba0, locked=locked@entry=false, no_barrier=no_barrier@entry=false, lev=0x55555555ac00) at vm_sync.c:56 #6 0x00007ffff7cc5747 in rb_vm_lock_body () at vm_sync.c:175 #7 0x00007ffff7bc02c2 in rb_vm_lock (line=1829, file=0x7ffff7e209cb "ractor.c") at ruby-3.2.1/vm_sync.h:57 #8 ractor_check_blocking (remained_thread_cnt=<optimized out>, file=0x7ffff7e209cb "ractor.c", line=1865, cr=0x55555555deb0) at ractor.c:1829 #9 ractor_check_blocking (line=1865, file=0x7ffff7e209cb "ractor.c", remained_thread_cnt=<optimized out>, cr=0x55555555deb0) at ractor.c:1811 #10 rb_ractor_blocking_threads_inc (cr=0x55555555deb0, file=file@entry=0x7ffff7e29b04 "thread.c", line=line@entry=1488) at ractor.c:1865 #11 0x00007ffff7c60977 in blocking_region_begin (th=0x55555555d070, region=0x7fffffffd220, ubf=0x7ffff7c5b300 <ubf_select>, arg=0x55555555d070, fail_if_interrupted=<optimized out>) at thread.c:1488 #12 0x00007ffff7c61edf in rb_nogvl (func=0x7ffff7ac66e0 <no_gvl_stat>, data1=0x7fffffffd2a0, ubf=<optimized out>, data2=0x55555555d070, flags=<optimized out>) at thread.c:1548 #13 0x00007ffff7acdfbc in stat_without_gvl (st=0x7fffffffd2b0, path=0x7ffff27dfe88 "ruby-3.2.1/lib/ruby/3.2.0/x86_64-linux/enc/iso_8859_2.so") at file.c:1171 #14 rb_check_realpath_internal (basedir=basedir@entry=4, path=path@entry=140737261984200, origenc=0x555555565030, mode=mode@entry=RB_REALPATH_STRICT) at file.c:4491 #15 0x00007ffff7acebaa in rb_realpath_internal (basedir=basedir@entry=4, path=path@entry=140737261984200, strict=strict@entry=1) at file.c:4536 #16 0x00007ffff7b2cdd4 in require_internal (ec=0x55555555e1f0, fname=<optimized out>, exception=1, warn=<optimized out>) at load.c:1195 #17 0x00007ffff7aa0a17 in load_encoding (name=0x5555556049b0 "ISO-8859-2") at encoding.c:779 #18 0x00007ffff7aa2ef8 in check_encoding (enc=0x5555556049d0) at encoding.c:191 #19 enc_check_encoding (obj=140737335533800) at encoding.c:202 #20 rb_to_encoding (enc=enc@entry=140737335533800) at encoding.c:307 #21 0x00007ffff7aa4049 in enc_set_default_encoding (name=0x7ffff7de6287 "external", encoding=140737335533800, def=0x7ffff7fb00c0 <default_external>) at encoding.c:1563 #22 rb_enc_set_default_external (encoding=140737335533800) at encoding.c:1637 #23 0x00007ffff7aa411f in set_default_external (klass=<optimized out>, encoding=140737335533800) at encoding.c:1658 #24 0x00007ffff7c99037 in vm_call_cfunc_with_frame (ec=0x55555555e1f0, reg_cfp=0x7ffff6f7df90, calling=<optimized out>) at ruby-3.2.1/vm_insnhelper.c:3268 #25 0x00007ffff7ca9564 in vm_sendish (method_explorer=<optimized out>, block_handler=<optimized out>, cd=<optimized out>, reg_cfp=<optimized out>, ec=<optimized out>) at ruby-3.2.1/vm_callinfo.h:367 #26 vm_exec_core (ec=0x55555555e1f0, initial=128) at ruby-3.2.1/insns.def:820 #27 0x00007ffff7caee93 in rb_vm_exec (ec=0x55555555e1f0, jit_enable_p=true) at vm.c:2374 #28 0x00007ffff7abfbf1 in rb_ec_exec_node (ec=ec@entry=0x55555555e1f0, n=n@entry=0x7ffff796c2c0) at eval.c:289 #29 0x00007ffff7ac60b3 in ruby_run_node (n=0x7ffff796c2c0) at eval.c:330 #30 0x0000555555555187 in rb_main (argv=0x7fffffffdb98, argc=3) at ./main.c:38 #31 main (argc=<optimized out>, argv=<optimized out>) at ./main.c:57 ``` When the encoding was already loaded before running `Ractor.new`, then it works and doesn't block: ``` ruby -e "''.encode(Encoding::ISO8859_2); Ractor.new{}.take; Encoding.default_internal = Encoding::ISO8859_2" ``` When the encoding is not assigned as default encoding, but used otherwise, it works too: ``` ruby -e "Ractor.new{}.take; ''.encode(Encoding::ISO8859_2)" ``` -- https://bugs.ruby-lang.org/
3 2
0 0
[ruby-core:111144] [Ruby master Feature#19171] Update Unicode data to Unicode Version 15.1
by duerst 20 Sep '24

20 Sep '24
Issue #19171 has been reported by duerst (Martin Dürst). ---------------------------------------- Feature #19171: Update Unicode data to Unicode Version 15.1 https://bugs.ruby-lang.org/issues/19171 * Author: duerst (Martin Dürst) * Status: Open * Priority: Normal * Assignee: duerst (Martin Dürst) ---------------------------------------- According to http://blog.unicode.org/2022/11/the-unicode-standard-2023-release.html, Unicode plans to release Version 15.1 in September 2023. According to https://www.unicode.org/versions/beta.html, public alpha review starts Feb. 7, 2023, and ends April 4, 2023. Because alpha review may not include all the files we use, it may be difficult for us to participate. Public beta review is planned to start May 23, 2023, ending July 4, 2023. At this point, we should be able to test things. -- https://bugs.ruby-lang.org/
2 1
0 0
[ruby-core:116581] [Ruby master Bug#20237] Unable to unshare(CLONE_NEWUSER) in Linux because of timer thread
by hanazuki (Kasumi Hanazuki) 16 Sep '24

16 Sep '24
Issue #20237 has been reported by hanazuki (Kasumi Hanazuki). ---------------------------------------- Bug #20237: Unable to unshare(CLONE_NEWUSER) in Linux because of timer thread https://bugs.ruby-lang.org/issues/20237 * Author: hanazuki (Kasumi Hanazuki) * Status: Open * Priority: Normal * ruby -v: ruby 3.4.0dev (2024-02-04T16:05:02Z master 8bc6fff322) [x86_64-linux] * Backport: 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN ---------------------------------------- ## Backgrounds [unshare(2)](https://man7.org/linux/man-pages/man2/unshare.2.html) is a syscall in Linux to move the calling process into a fresh execution context. With `unshare(CLONE_NEWUSER)` you can move a process into a new [user_namespace(7)](https://man7.org/linux/man-pages/man7/user_namespaces.7.…, where the process gains the full capability on the resources within the namespace. This is fundamental for Linux containers to achieve privilege separation. `unshare(CLONE_NEWUSER)` requires the calling process to be single-threaded (or no background threads are running). So, it is often invoked after `fork(2)` as forking propagates only the calling thread to the child process. ## Problem It becomes a problem that Ruby 3.3 on Linux uses timer threads even for a single-`Thread`ed application. Because `Kernel#fork` spawns a thread in the child process before the control returns to the user code, there is no chance to call `unshare(CLONE_NEWUSER)` in Ruby. The following snippet is a reproducer of this problem. This program first forks and then shows the user namespace to which the process belongs before and after calling unshare(2). It also shows the threads of the child process after forking. ```ruby p(RUBY_DESCRIPTION:) require 'fiddle/import' module C extend Fiddle::Importer dlload 'libc.so.6' extern 'int unshare(int flags)' CLONE_NEWUSER = 0x10000000 def self.raise_system_call_error raise SystemCallError.new(Fiddle.last_error) end end pid = fork do system("ps -O tid -T -p #$$") system("ls -l /proc/self/ns/user") if C.unshare(C::CLONE_NEWUSER) != 0 C.raise_system_call_error # => EINVAL with Ruby 3.3 end system("ls -l /proc/self/ns/user") end p Process.wait2(pid) ``` The program successfully changes the user namespace with Ruby 3.2, but it raises EINVAL with Ruby 3.3. You can see Ruby 3.3 has two threads running after forking. ``` % rbenv shell 3.2 && ruby ./test.rb {:RUBY_DESCRIPTION=>"ruby 3.2.3 (2024-01-18 revision 52bb2ac0a6) [x86_64-linux]"} PID TID S TTY TIME COMMAND 1585787 1585787 S pts/12 00:00:00 ruby ./test.rb lrwxrwxrwx 1 kasumi kasumi 0 Feb 5 02:25 /proc/self/ns/user -> 'user:[4026531837]' lrwxrwxrwx 1 nobody nogroup 0 Feb 5 02:25 /proc/self/ns/user -> 'user:[4026532675]' [1585787, #<Process::Status: pid 1585787 exit 0>] % rbenv shell 3.3 && ruby ./test.rb {:RUBY_DESCRIPTION=>"ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [x86_64-linux]"} PID TID S TTY TIME COMMAND 1585849 1585849 S pts/12 00:00:00 ruby ./test.rb 1585849 1585851 S pts/12 00:00:00 ruby ./test.rb lrwxrwxrwx 1 kasumi kasumi 0 Feb 5 02:25 /proc/self/ns/user -> 'user:[4026531837]' ./test.rb:10:in `raise_system_call_error': Invalid argument (Errno::EINVAL) from ./test.rb:24:in `block in <main>' from ./test.rb:19:in `fork' from ./test.rb:19:in `<main>' [1585849, #<Process::Status: pid 1585849 exit 1>] % rbenv shell master && ruby ./test.rb {:RUBY_DESCRIPTION=>"ruby 3.4.0dev (2024-02-04T16:05:02Z master 8bc6fff322) [x86_64-linux]"} PID TID S TTY TIME COMMAND 1585965 1585965 S pts/12 00:00:00 ruby ./test.rb 1585965 1585967 S pts/12 00:00:00 ruby ./test.rb lrwxrwxrwx 1 kasumi kasumi 0 Feb 5 02:25 /proc/self/ns/user -> 'user:[4026531837]' ./test.rb:10:in `raise_system_call_error': Invalid argument (Errno::EINVAL) from ./test.rb:24:in `block in <main>' from ./test.rb:19:in `fork' from ./test.rb:19:in `<main>' [1585965, #<Process::Status: pid 1585965 exit 1>] ``` ## Workaround My workaround is to rebuild ruby with `rb_thread_stop_timer_thread` and `rb_thread_start_timer_thread` exported, and use a C-ext that stops the timer thread before calling `unshare`. This seems not robust because the process cannot know when the terminated thread is reclaimed by the kernel, after which the process is considered single-threaded. ```c #define _GNU_SOURCE 1 #include <sched.h> #include <ruby/ruby.h> static VALUE Unshare_s_unshare(VALUE _self, VALUE rflags) { int const flags = NUM2INT(rflags); rb_thread_stop_timer_thread(); usleep(1000); // FIXME: It takes some time for the kernel to remove the stopped thread? int const ret = unshare(flags); rb_thread_start_timer_thread(); if(ret != 0) rb_sys_fail_str(rb_sprintf("unshare(%#x)", flags)); return Qnil; } RUBY_FUNC_EXPORTED void Init_unshare(void) { VALUE rb_mUnshare = rb_define_module("Unshare"); rb_define_singleton_method(rb_mUnshare, "unshare", Unshare_s_unshare, 1); rb_define_const(rb_mUnshare, "CLONE_NEWUSER", INT2FIX(CLONE_NEWUSER)); } ``` ## Questions - Is this a limitation of Ruby? - Is it safe (or even possible) to stop the timer thread during execution? - If so, can we export it as the public API? - But it may not so useful for this problem as explained in the workaround. - Is it guaranteed that no other threads are running after forks? - Are there any better ways to solve this issue? - Can we somehow delay the start of the timer thread after forking, or hook into `fork` to run some code in the child process immediately after it spawns. - Can they be Ruby API instead of C API? -- https://bugs.ruby-lang.org/
4 9
0 0
[ruby-core:117210] [Ruby master Bug#20344] argument stack underflow (-1)
by nobu (Nobuyoshi Nakada) 02 Sep '24

02 Sep '24
Issue #20344 has been reported by nobu (Nobuyoshi Nakada). ---------------------------------------- Bug #20344: argument stack underflow (-1) https://bugs.ruby-lang.org/issues/20344 * Author: nobu (Nobuyoshi Nakada) * Status: Open * Backport: 3.0: REQUIRED, 3.1: REQUIRED, 3.2: REQUIRED, 3.3: REQUIRED ---------------------------------------- This file produces argument stack underflow, since ruby 2.5. ```ruby proc do next if true case nil when "a" next when "b" when "c" proc {} end next unless true end ``` ``` -- raw disasm-------- trace: 100 0000 nop ( 1) <L000> [sp: 0, unremovable: 1, refcnt: 5] trace: 1 <L004> [sp: 0, unremovable: 0, refcnt: 1] adjust: [label: 0] 0001 putnil ( 2) 0002 leave ( 13) <L008> [sp: 1, unremovable: 0, refcnt: 1] adjust: [label: 0] 0003 putnil ( 6) 0004 leave ( 13) adjust: [label: 8] 0005 jump <L005> ( 5) 0007 pop ( 7) 0008 jump <L005> ( 7) * 0010 pop ( 8) trace: 1 <L011> [sp: -1, unremovable: 1, refcnt: 1] 0011 putself ( 9) 0012 send <calldata:proc, 0>, nil ( 9) <L012> [sp: -1, unremovable: 0, refcnt: 2] 0015 pop ( 9) <L005> [sp: 1, unremovable: 0, refcnt: 2] trace: 1 0016 putnil ( 12) <L001> [sp: -1, unremovable: 0, refcnt: 3] trace: 200 0017 leave ( 13) --------------------- ``` -- https://bugs.ruby-lang.org/
3 2
0 0
[ruby-core:114645] [Ruby master Bug#19865] Segfault when calling user signal handlers during VM shutdown
by ivoanjo (Ivo Anjo) 27 Aug '24

27 Aug '24
Issue #19865 has been reported by ivoanjo (Ivo Anjo). ---------------------------------------- Bug #19865: Segfault when calling user signal handlers during VM shutdown https://bugs.ruby-lang.org/issues/19865 * Author: ivoanjo (Ivo Anjo) * Status: Open * Priority: Normal * ruby -v: ruby 3.2.2 (2023-03-30 revision e51014f9c0) [x86_64-linux] * Backport: 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN ---------------------------------------- Howdy 👋! I work for Datadog [on the `ddtrace` gem](https://github.com/DataDog/dd-trace-rb) . I've found this issue while investigating a [customer crash report](https://github.com/DataDog/dd-trace-rb/issues/2980). ### Background The original issue was found in a production app. A number of things need to be in play to cause it. The [`ruby-odbc`](https://rubygems.org/gems/ruby-odbc) gem provides a way of accessing databases through the ODBC API. It wraps a database connection as a Data object, with a free function that, prior to freeing the native resources, disconnects from the database if the connection was still active. Because disconnecting from the database is a blocking operation, the gem (reasonably, in my opinion), releases the global VM lock before disconnecting. The trigger for the crash is: 1. The app in question used puma, and puma installs a `Signal.trap('TERM')` 2. The database object was still connected when the app started to shut down 3. A VM shutdown starts... 4. Half-way through shutdown, the VM received a SIGTERM signal, and queued it for processing 5. The VM calls the free function on all objects 6. The ruby-odbc gem sees there's an active database connection, and tries to release the GVL to call the blocking disconnect 7. Before releasing the GVL, the VM checks for pending interruptions 8. The VM tries to run the Ruby-level signal handler method half-way through VM shutdown, when you can no longer run Ruby code 9. Segfault ### How to reproduce (Ruby version & script) I was able to reproduce on a minimal example on Ruby 3.2.2 (`ruby 3.2.2 (2023-03-30 revision e51014f9c0) [x86_64-linux]`) and recent master (`ruby 3.3.0dev (2023-08-17T07:30:01Z master d26b015e83) [x86_64-linux]`). I've put the test-case up on github as well <https://github.com/DataDog/signal-bug-testcase>, but here's the important bits: `signal-bug-testcase.rb`: ```ruby require 'signal_bug_testcase' Signal.trap("TERM") { puts "Hello, world" } FOO = SignalBugTestcase.new ``` `signal_bug_testcase.c`: ```ruby #include <ruby.h> #include <ruby/thread.h> #include <signal.h> #include <unistd.h> typedef struct { int dummy; } BugTestcase; void *test_nogvl(void *unused) { fprintf(stderr, "GVL released!\n"); return NULL; } static void bug_testcase_free(void* ptr) { fprintf(stderr, "Free getting called! Sending signal...\n"); kill(getpid(), SIGTERM); fprintf(stderr, "SIGTERM signal queued, trying to release GVL...\n"); rb_thread_call_without_gvl(test_nogvl, NULL, NULL, NULL); fprintf(stderr, "After releasing GVL!\n"); free(ptr); } const rb_data_type_t bug_testcase_data_type = { .wrap_struct_name = "SignalBugTestcase", .function = { NULL, bug_testcase_free, NULL }, .flags = RUBY_TYPED_FREE_IMMEDIATELY }; VALUE bug_testcase_alloc(VALUE klass) { BugTestcase* obj = calloc(1, sizeof(BugTestcase)); return TypedData_Make_Struct(klass, BugTestcase, &bug_testcase_data_type, obj); } void Init_signal_bug_testcase(void) { VALUE cBugTestcase = rb_define_class("SignalBugTestcase", rb_cObject); rb_define_alloc_func(cBugTestcase, bug_testcase_alloc); } ``` ### Expectation and result No segfault happens. Interestingly, on Ruby 2.7, the VM exits half-way through but doesn't always segfault, but running it a few times always triggers the issue. On 3.2+ it crashes every time for me. I suspect the right thing here is to no longer accept/try to run any Ruby-level signal handlers after VM shutdown starts. Here's what I see with this test-case: ``` $ bundle exec ruby lib/signal-bug-testcase.rb Free getting called! Sending signal... SIGTERM signal queued, trying to release GVL... lib/signal-bug-testcase.rb:3: [BUG] Segmentation fault at 0x0000000000000007 ruby 3.2.2 (2023-03-30 revision e51014f9c0) [x86_64-linux] -- Control frame information ----------------------------------------------- c:0003 p:---- s:0011 e:000010 CFUNC :puts c:0002 p:0005 s:0006 e:000005 BLOCK lib/signal-bug-testcase.rb:3 [FINISH] c:0001 p:0000 s:0003 E:0001a0 DUMMY [FINISH] -- Ruby level backtrace information ---------------------------------------- lib/signal-bug-testcase.rb:3:in `block in <main>' lib/signal-bug-testcase.rb:3:in `puts' -- Machine register context ------------------------------------------------ RIP: 0x000070aa64cedbe7 RBP: 0x000070aa648e8fd0 RSP: 0x00007ffc5c057608 RAX: 0x0000000000004171 RBX: 0x00007ffc5c057630 RCX: 0x0000000000000001 RDX: 0x00007ffc5c057630 RDI: 0x0000000000000007 RSI: 0x0000000000004171 R8: 0x000000000000021b R9: 0x0000000000000000 R10: 0x000070aa63eff048 R11: 0x0000000000000000 R12: 0x000070aa648e8fd0 R13: 0x0000000000004171 R14: 0x0000000000000007 R15: 0x000070aa648e8ff0 EFL: 0x0000000000010202 -- C level backtrace information ------------------------------------------- ruby-3.2.2/lib/libruby.so.3.2(rb_print_backtrace+0xd) [0x70aa64d5bb5f] ruby-3.2.2/vm_dump.c:785 ruby-3.2.2/lib/libruby.so.3.2(rb_vm_bugreport) ruby-3.2.2/vm_dump.c:1080 ruby-3.2.2/lib/libruby.so.3.2(rb_bug_for_fatal_signal+0xf4) [0x70aa64b52164] ruby-3.2.2/error.c:813 ruby-3.2.2/lib/libruby.so.3.2(sigsegv+0x4d) [0x70aa64cab0fd] ruby-3.2.2/signal.c:964 /lib/x86_64-linux-gnu/libc.so.6(0x70aa64642520) [0x70aa64642520] ruby-3.2.2/lib/libruby.so.3.2(hash_table_index+0x0) [0x70aa64cedbe7] ruby-3.2.2/symbol.h:72 ruby-3.2.2/lib/libruby.so.3.2(rb_id_table_lookup) ruby-3.2.2/id_table.c:230 ruby-3.2.2/lib/libruby.so.3.2(cached_callable_method_entry+0x24) [0x70aa64d356bb] ruby-3.2.2/vm_method.c:1295 ruby-3.2.2/lib/libruby.so.3.2(callable_method_entry_or_negative) ruby-3.2.2/vm_method.c:1365 ruby-3.2.2/lib/libruby.so.3.2(callable_method_entry) ruby-3.2.2/vm_method.c:1402 ruby-3.2.2/lib/libruby.so.3.2(rb_callable_method_entry) ruby-3.2.2/vm_method.c:1409 ruby-3.2.2/lib/libruby.so.3.2(gccct_method_search_slowpath+0x38) [0x70aa64d36258] ruby-3.2.2/vm_eval.c:434 ruby-3.2.2/lib/libruby.so.3.2(rb_call0+0x267) [0x70aa64d4e877] ruby-3.2.2/vm_eval.c:483 ruby-3.2.2/lib/libruby.so.3.2(rb_call+0x32) [0x70aa64d4f406] ruby-3.2.2/vm_eval.c:877 ruby-3.2.2/lib/libruby.so.3.2(rb_funcallv_kw) ruby-3.2.2/vm_eval.c:1074 ruby-3.2.2/lib/libruby.so.3.2(vm_call_cfunc_with_frame+0x127) [0x70aa64d30277] ruby-3.2.2/vm_insnhelper.c:3268 ruby-3.2.2/lib/libruby.so.3.2(vm_sendish+0x97) [0x70aa64d407a4] ruby-3.2.2/vm_insnhelper.c:5080 ruby-3.2.2/lib/libruby.so.3.2(vm_exec_core) ruby-3.2.2/insns.def:820 ruby-3.2.2/lib/libruby.so.3.2(rb_vm_exec+0xd3) [0x70aa64d460d3] ruby-3.2.2/vm.c:2374 ruby-3.2.2/lib/libruby.so.3.2(rb_vm_invoke_proc+0x5f) [0x70aa64d4bfcf] ruby-3.2.2/vm.c:1603 ruby-3.2.2/lib/libruby.so.3.2(vm_call0_body+0x5df) [0x70aa64d4c5cf] ruby-3.2.2/vm_eval.c:274 ruby-3.2.2/lib/libruby.so.3.2(vm_call0_cc+0x77) [0x70aa64d4e7e7] ruby-3.2.2/vm_eval.c:87 ruby-3.2.2/lib/libruby.so.3.2(rb_call0) ruby-3.2.2/vm_eval.c:551 ruby-3.2.2/lib/libruby.so.3.2(rb_call+0x32) [0x70aa64d4f406] ruby-3.2.2/vm_eval.c:877 ruby-3.2.2/lib/libruby.so.3.2(rb_funcallv_kw) ruby-3.2.2/vm_eval.c:1074 ruby-3.2.2/lib/libruby.so.3.2(rb_eval_cmd_kw+0x142) [0x70aa64d4f562] ruby-3.2.2/vm_eval.c:1923 ruby-3.2.2/lib/libruby.so.3.2(signal_exec+0xf6) [0x70aa64caae16] ruby-3.2.2/signal.c:1064 ruby-3.2.2/lib/libruby.so.3.2(rb_threadptr_execute_interrupts+0x36b) [0x70aa64cf7078] ruby-3.2.2/thread.c:2334 ruby-3.2.2/lib/libruby.so.3.2(rb_threadptr_execute_interrupts) ruby-3.2.2/thread.c:2291 ruby-3.2.2/lib/libruby.so.3.2(rb_vm_check_ints+0xb) [0x70aa64cf7ac5] ruby-3.2.2/vm_core.h:1994 ruby-3.2.2/lib/libruby.so.3.2(rb_vm_check_ints) ruby-3.2.2/vm_core.h:1985 ruby-3.2.2/lib/libruby.so.3.2(unblock_function_set) ruby-3.2.2/thread.c:320 ruby-3.2.2/lib/libruby.so.3.2(blocking_region_begin) ruby-3.2.2/thread.c:1485 ruby-3.2.2/lib/libruby.so.3.2(rb_nogvl+0xbf) [0x70aa64cf90cf] ruby-3.2.2/thread.c:1548 signal-bug-testcase-2/lib/signal_bug_testcase.so(fprintf+0x0) [0x70aa6518f299] ../../../../ext/signal_bug_testcase/signal_bug_testcase.c:17 signal-bug-testcase-2/lib/signal_bug_testcase.so(bug_testcase_free) ../../../../ext/signal_bug_testcase/signal_bug_testcase.c:18 ruby-3.2.2/lib/libruby.so.3.2(run_final+0xf) [0x70aa64b73172] ruby-3.2.2/gc.c:4388 ruby-3.2.2/lib/libruby.so.3.2(finalize_list) ruby-3.2.2/gc.c:4407 ruby-3.2.2/lib/libruby.so.3.2(finalize_deferred_heap_pages) ruby-3.2.2/gc.c:4436 ruby-3.2.2/lib/libruby.so.3.2(rb_objspace_call_finalizer+0x350) [0x70aa64b80d70] ruby-3.2.2/gc.c:4573 ruby-3.2.2/lib/libruby.so.3.2(rb_ec_finalize+0x2a) [0x70aa64b5d6d1] ruby-3.2.2/eval.c:168 ruby-3.2.2/lib/libruby.so.3.2(rb_ec_cleanup) ruby-3.2.2/eval.c:262 ruby-3.2.2/lib/libruby.so.3.2(ruby_run_node+0x9d) [0x70aa64b5d91d] ruby-3.2.2/eval.c:330 ruby-3.2.2/bin/ruby(rb_main+0x21) [0x5d5d1295f187] ./main.c:38 ruby-3.2.2/bin/ruby(main) ./main.c:57 /lib/x86_64-linux-gnu/libc.so.6(__libc_start_call_main+0x80) [0x70aa64629d90] ../sysdeps/nptl/libc_start_call_main.h:58 /lib/x86_64-linux-gnu/libc.so.6(call_init+0x0) [0x70aa64629e40] ../csu/libc-start.c:392 /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main_impl) ../csu/libc-start.c:379 /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main) (null):0 [0x5d5d1295f1d5] ``` ---Files-------------------------------- signal-bug-testcase-main.zip (7.73 KB) -- https://bugs.ruby-lang.org/
2 3
0 0
[ruby-core:111272] [Ruby master Bug#19231] Integer#step and Float::INFINITY - inconsistent behaviour when called with and without a block
by andrykonchin (Andrew Konchin) 01 Aug '24

01 Aug '24
Issue #19231 has been reported by andrykonchin (Andrew Konchin). ---------------------------------------- Bug #19231: Integer#step and Float::INFINITY - inconsistent behaviour when called with and without a block https://bugs.ruby-lang.org/issues/19231 * Author: andrykonchin (Andrew Konchin) * Status: Open * Priority: Normal * ruby -v: 3.1.2 * Backport: 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN ---------------------------------------- The initial issue was reported here https://github.com/oracle/truffleruby/issues/2797. `0.step(Float::INFINITY, 10)` returns: - `Integers` when called with a block - `Floats` when called without a block I would expect `Floats` to be returned in both cases. Examples: ```ruby 0.step(100.0, 10).take(1).map(&:class) # => [Float] ``` ```ruby 0.step(Float::INFINITY, 10) { |offset| p offset.class; break } # Integer ``` When `to` argument is a finite `Float` value then calling with a block returns `Floats` as well: ```ruby 0.step(100.0, 10) { |offset| p offset.class; break } # Float ``` Wondering whether it's intentional behaviour. I've found a related issue https://bugs.ruby-lang.org/issues/15518. -- https://bugs.ruby-lang.org/
6 6
0 0
  • ← Newer
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • ...
  • 26
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.