Project

General

Profile

Actions

Bug #19582

closed

Segmentation fault when running the tests for Ruby 3.2.2

Added by renodr (Douglas R. Reno) about 1 year ago. Updated 10 months ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:113141]

Description

When adding a package update to BLFS, our policy is to run the tests for the packages. When running the tests for Ruby-3.2.2, we're getting a segmentation fault that appears to happen in TestNumeric#test_step. I've attached a copy of Ruby's crash output. Note that Ruby reports itself as "Ruby 3.2.1" here for some reason, even if /usr/bin/ruby is moved out of the way. I'm assuming that this is because of the 'miniruby' program that the build system compiles.

Note that if we bypass this segmentation fault by removing the test from test/ruby/test_numeric.rb, we later get an error that reads:

/sources/ruby-3.2.2/ruby-3.2.2/tool/lib/leakchecker.rb:238:in `block in check_env': uninitialized constant Bundler::EnvironmentPreserver (NameError)

  next if k.start_with?(Bundler::EnvironmentPreserver::BUNDLER_PREFIX)

(Looking at Github, that would be added by commit 6d835901575d58e7db404665801a1c455ee982a8)

For package versions, we're running gcc-12.2.0, glibc-2.37, and Binutils-2.40. I noticed that it looked for rust when checking the configure output - we're running rustc-1.68.2. The base system is Linux From Scratch 11.3.

Some important information from the output:

[BUG] Segmentation fault at 0x0000000000000003
ruby 3.2.1 (2023-02-08 revision 31819e82c8) [x86_64-linux]

-- Control frame information -----------------------------------------------
c:0004 p:---- s:0012 e:000011 CFUNC :step
c:0003 p:---- s:0009 e:000008 CFUNC :each
c:0002 p:---- s:0006 e:000005 IFUNC
c:0001 p:---- s:0003 e:000002 DUMMY [FINISH]

-- Ruby level backtrace information ----------------------------------------
./test/runner.rb: TestNumeric#test_step:0:in `each'

./test/runner.rb: TestNumeric#test_step:0:in `step'

Thank you for your patience!


Files

ruby-tests.log (454 KB) ruby-tests.log Output from the Ruby Tests renodr (Douglas R. Reno), 04/06/2023 02:40 AM

Updated by hsbt (Hiroshi SHIBATA) about 1 year ago

  • Status changed from Open to Closed
  • Backport changed from 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN to 2.7: DONTNEED, 3.0: DONTNEED, 3.1: DONTNEED, 3.2: REQUIRED

Updated by mame (Yusuke Endoh) about 1 year ago

  • Status changed from Closed to Open

In terms of the SEGV issue, I think you are running the test suite of 3.2.2 by Ruby 3.2.1 for some reason. It looks like that the failing test was added in 3.2.2 for a SEGV bug of 3.2.1. (#19445)

Could you delete that build and retry building from scratch? If it still reproduce, please explain the exact steps of your build.

Note that Ruby reports itself as "Ruby 3.2.1" here for some reason, even if /usr/bin/ruby is moved out of the way. I'm assuming that this is because of the 'miniruby' program that the build system compiles.

If it is miniruby built from Ruby 3.2.2 source code, it should report 3.2.2.

Updated by mame (Yusuke Endoh) about 1 year ago

  • Status changed from Open to Closed

Oops, I didn't intend to reopen it

Updated by nagachika (Tomoyuki Chikanaga) 10 months ago

  • Backport changed from 2.7: DONTNEED, 3.0: DONTNEED, 3.1: DONTNEED, 3.2: REQUIRED to 2.7: DONTNEED, 3.0: DONTNEED, 3.1: DONTNEED, 3.2: DONE

ruby_3_2 9d8d0585ec35070099e4fdeef5ee18f6fbf339b6 merged revision(s) f6adc5be94a9f70a5b9897b81dabdeb49b573393,bccdc041665032b819fab1c04ed4dbdfeeeb366b.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0