From: "alanwu (Alan Wu) via ruby-core" <ruby-core@ml.ruby-lang.org>
To: ruby-core@ml.ruby-lang.org
Cc: "alanwu (Alan Wu)" <noreply@ruby-lang.org>
Subject: [ruby-core:120385] [Ruby master Bug#20976] ethon 0.15.0 began to segfault
Date: Tue, 24 Dec 2024 01:55:33 +0000 (UTC) [thread overview]
Message-ID: <redmine.journal-111164.20241224015550.830@ruby-lang.org> (raw)
In-Reply-To: <redmine.issue-20976.20241222004036.830@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/0b1c2278806502ecbc6814a245f6b11f5365e68c
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/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/
prev parent reply other threads:[~2024-12-24 1:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-22 0:40 [ruby-core:120359] " mtasaka (Mamoru TASAKA) via ruby-core
2024-12-22 0:42 ` [ruby-core:120360] " mtasaka (Mamoru TASAKA) via ruby-core
2024-12-22 1:03 ` [ruby-core:120361] " mtasaka (Mamoru TASAKA) via ruby-core
2024-12-23 19:12 ` [ruby-core:120382] " luke-gru (Luke Gruber) via ruby-core
2024-12-23 23:21 ` [ruby-core:120384] " mtasaka (Mamoru TASAKA) via ruby-core
2024-12-24 1:55 ` alanwu (Alan Wu) via ruby-core [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=redmine.journal-111164.20241224015550.830@ruby-lang.org \
--to=ruby-core@ml.ruby-lang.org \
--cc=noreply@ruby-lang.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).