Project

General

Profile

Actions

Bug #21607

open

require 'concurrent-ruby' causes segfault with Ruby 3.4.6 on linux/i686 built with GCC 15

Added by satadru (Satadru Pramanik) 1 day ago. Updated about 20 hours ago.

Status:
Open
Assignee:
Target version:
-
ruby -v:
ruby 3.4.6 (2025-09-16 revision dbd83256b1) +PRISM [i686-linux]
[ruby-core:123261]

Description

As mentioned at https://github.com/ruby/ruby/pull/14532#issuecomment-3288983469

chronos@buppie-i686:2.23 M58 /usr/local/lib/crew/packages (master >|SPARSE)$ ruby -e "require 'concurrent-ruby' ; puts 'success'"
Segmentation fault

This causes a segfault on i686 only on our Chromebrew/i686 systems. armv7l and x86_64 do not have this issue.

This may be linked to the update to prism 1.5.x?

Docker reproducer on our i686 ChromeOS Milestone 58 based container image:

docker run --init --platform linux/386 --rm --net=host -v $(pwd):/output -h $(hostname)-i686 --tmpfs /tmp --ulimit "nofile=$(ulimit -Sn):$(ulimit -Hn)" -it satmandu/crewbuild:alex-i686.m58

Note the lack of an issue with 3.4.5 with this command:

ruby -e "require 'concurrent-ruby' ; puts 'success'"

In that container, upgrade ruby to 3.4.6:

CREW_REPO=https://github.com/chromebrew/chromebrew.git CREW_BRANCH=updater-ruby_3.4.6 crew update
&& yes | crew upgrade

Then run the breaking command:

ruby -e "require 'concurrent-ruby' ; puts 'success'"

Note the segfault.


Files

i686-ruby-github-action-build-job-log.txt (298 KB) i686-ruby-github-action-build-job-log.txt satadru (Satadru Pramanik), 09/16/2025 04:37 PM

Updated by satadru (Satadru Pramanik) 1 day ago

Our build run for this build, including make check is here:

https://github.com/chromebrew/chromebrew/actions/runs/17767133141/job/50493282824

I have attached this log with extraneous information edited out.

Updated by k0kubun (Takashi Kokubun) 1 day ago

  • Assignee set to prism
  • Backport changed from 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN to 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: REQUIRED

Updated by luke-gru (Luke Gruber) 1 day ago

  • Assignee changed from prism to ractor

There appear to be issues with Ractors. I'm going to reassign this to the ractor team.

Updated by kddnewton (Kevin Newton) 1 day ago

Thanks @luke-gru (Luke Gruber) I was struggling to figure out what that had to do with prism at all, seeing as all the failures were ractor related.

Updated by luke-gru (Luke Gruber) 1 day ago

@kddnewton (Kevin Newton) I'm not sure it is related to ractors because maybe those tests always failed on this platform. I'm also seeing compile warnings like:

2025-09-16T13:34:45.1561568Z In function ‘iseq_set_local_table’,
2025-09-16T13:34:45.1562672Z     inlined from ‘rb_iseq_compile_node’ at compile.c:875:9:
2025-09-16T13:34:45.1586403Z compile.c:2185:25: warning: argument 1 value ‘4294967293’ exceeds maximum object size 2147483647 [-Walloc-size-larger-than=]
2025-09-16T13:34:45.1587570Z  2185 |         ID *ids = (ID *)ALLOC_N(ID, size);

No ractor-related changes have made it into the 3.4.6 release AFAIK.

Updated by satadru (Satadru Pramanik) about 24 hours ago

Hello all, a build from earlier this summer's 3.4 branch using the current bundled gems also gave the same error when I built that two days ago.

The only other difference might be that we are using GCC 15 now.

But I'd also note that this builds fine and appears to work without issue on 32-bit armv7l as well as on x86_64, and those builds use GCC 15 too.

Updated by luke-gru (Luke Gruber) about 23 hours ago

It would help us a lot if you could get the output from the crashing process. It should report a backtrace to stderr after the segfault right before the process ends.

Updated by satadru (Satadru Pramanik) about 23 hours ago · Edited

It doesn't appear to get to a backtrace:

chronos@buppie-i686:2.23 M58 /usr/local/lib/crew/packages (master <>|SPARSE)$ irb
irb(main):001> require 'concurrent-ruby'
Segmentation fault         (core dumped) irb
chronos@buppie-i686:2.23 M58 /usr/local/lib/crew/packages (master <>|SPARSE)$ ruby -e "require 'concurrent-ruby' ; puts 'success'"
Segmentation fault         (core dumped) ruby -e "require 'concurrent-ruby' ; puts 'success'"

Updated by Earlopain (Earlopain _) about 23 hours ago

It does not seem to be related to prism (or ruby at all?):

$ ruby -e "Fiber.new {}.resume"
Segmentation fault         (core dumped) ruby -e "Fiber.new {}.resume"
$ ruby --disable-gems -e "Fiber.new {}.resume"
Inconsistency detected by ld.so: dl-runtime.c: 79: _dl_fixup: Assertion `ELFW(R_TYPE)(reloc->r_info) == ELF_MACHINE_JMP_SLOT' failed!

There is no further output, that's all you get. Does look like something that might happen with a compiler upgrade.

Updated by satadru (Satadru Pramanik) about 23 hours ago

Hmm. Ok, I will try rebuilding with GCC 14, in case this is possibly a regression in GCC.

Updated by satadru (Satadru Pramanik) about 20 hours ago

I can confirm that building with GCC 14 resolves the issue. So this seems like a problem with building ruby for i686 with GCC 15.

Actions #13

Updated by satadru (Satadru Pramanik) about 20 hours ago

  • Subject changed from require 'concurrent-ruby' causes segfault with Ruby 3.4.6 on linux/i686 to require 'concurrent-ruby' causes segfault with Ruby 3.4.6 on linux/i686 built with GCC 15
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like1Like0Like1Like0