[ruby-core:120359] [Ruby master Bug#20976] ethon 0.15.0 began to segfault

Issue #20976 has been reported by mtasaka (Mamoru TASAKA). ---------------------------------------- Bug #20976: ethon 0.15.0 began to segfault https://bugs.ruby-lang.org/issues/20976 * Author: mtasaka (Mamoru TASAKA) * Status: Open * 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) -- https://bugs.ruby-lang.org/

Issue #20976 has been updated by mtasaka (Mamoru TASAKA). curl is using 8.11.1 . ---------------------------------------- Bug #20976: ethon 0.15.0 began to segfault https://bugs.ruby-lang.org/issues/20976#change-111138 * Author: mtasaka (Mamoru TASAKA) * Status: Open * 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) -- https://bugs.ruby-lang.org/

Issue #20976 has been updated by mtasaka (Mamoru TASAKA). Well, commit:fef8ecc708 also seems to cause segfault... ---------------------------------------- Bug #20976: ethon 0.15.0 began to segfault https://bugs.ruby-lang.org/issues/20976#change-111139 * Author: mtasaka (Mamoru TASAKA) * Status: Open * 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) -- https://bugs.ruby-lang.org/

Issue #20976 has been updated by luke-gru (Luke Gruber). @mtasaka can you please provide your Gemfile.lock? I'm getting issues with the gems after I run `bundle`, I think the versions in the Gemfile aren't constrained enough. ---------------------------------------- Bug #20976: ethon 0.15.0 began to segfault https://bugs.ruby-lang.org/issues/20976#change-111160 * Author: mtasaka (Mamoru TASAKA) * Status: Open * 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) -- https://bugs.ruby-lang.org/

Issue #20976 has been updated by mtasaka (Mamoru TASAKA). File Gemfile added I've attached Gemfile, however there is actually no version constraint actually. So what is installed is: ``` rubygem-diff-lcs-1.5.0 rubygem-ffi-1.17.0 rubygem-io-console-0.8.0 rubygem-irb-1.14.3 rubygem-json-2.9.1 rubygem-mime-types-3.4.1 rubygem-mime-types-data-3.2023.0218.1 rubygem-mustermann-3.0.3 rubygem-psych-5.2.2 rubygem-rack-2.2.4 rubygem-rack-protection-3.2.0 rubygem-rbs-3.8.0~20241223.1315git376ef474de rubygem-rdoc-6.10.0 rubygem-rspec-3.13.0 rubygem-rspec-core-3.13.2 rubygem-rspec-expectations-3.13.3 rubygem-rspec-mocks-3.13.2 rubygem-rspec-support-3.13.2 rubygem-sinatra-3.2.0 rubygem-tilt-2.2.0 rubygem-webrick-1.9.0 ``` ---------------------------------------- Bug #20976: ethon 0.15.0 began to segfault https://bugs.ruby-lang.org/issues/20976#change-111162 * Author: mtasaka (Mamoru TASAKA) * Status: Open * 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/

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/
participants (3)
-
alanwu (Alan Wu)
-
luke-gru (Luke Gruber)
-
mtasaka (Mamoru TASAKA)