
Issue #20976 has been updated by alanwu (Alan Wu). Status changed from Open to Third Party's Issue ethon doesn't seem to be using the ffi gem correctly, since the following makes the spec you point to SEGV consistently, though in a different place than in the OP: ```patch diff --git a/spec/ethon/multi_spec.rb b/spec/ethon/multi_spec.rb index a483357..5712bdf 100644 --- a/spec/ethon/multi_spec.rb +++ b/spec/ethon/multi_spec.rb @@ -46,8 +46,9 @@ describe Ethon::Multi do describe "#socket_action" do let(:options) { { :execution_mode => :socket_action } } let(:select_state) { { :readers => [], :writers => [], :timeout => 0 } } - let(:multi) { + let(:multi) do multi = Ethon::Multi.new(options) + GC.stress = true multi.timerfunction = proc do |handle, timeout_ms, userp| timeout_ms = nil if timeout_ms == -1 select_state[:timeout] = timeout_ms @@ -73,7 +74,9 @@ describe Ethon::Multi do :ok end multi - } + ensure + GC.stress = false + end def fds_to_ios(fds) fds.map do |fd| ``` It could also be a bug in the `ffi` gem, but in any case this is highly unlikely to be an issue in ruby proper. ---------------------------------------- Bug #20976: ethon 0.15.0 began to segfault https://bugs.ruby-lang.org/issues/20976#change-111164 * Author: mtasaka (Mamoru TASAKA) * Status: Third Party's Issue * ruby -v: ruby 3.4.0dev (2024-12-21 master 6114094aa0) +PRISM [x86_64-linux] * Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN ---------------------------------------- Looks like ethon 0.15.0: https://github.com/typhoeus/ethon/tree/0b1c2278806502ecbc6814a245f6b11f5365e... began to segfault frequently (not always) with recent ruby 3.4.0dev. Looks like: commit:fef8ecc708 does not cause segfault commit:018b775039 seems to cause segfault: Trying with commit:6114094aa0 , segfaulting log is attached. ---Files-------------------------------- backtrace.log.txt (86 KB) Gemfile (819 Bytes) -- https://bugs.ruby-lang.org/