ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
From: "kirs (Kir Shatrov)" <noreply@ruby-lang.org>
To: ruby-core@ruby-lang.org
Subject: [ruby-core:108083] [Ruby master Bug#17489] Ractor segfaults
Date: Sat, 26 Mar 2022 09:50:52 +0000 (UTC)	[thread overview]
Message-ID: <redmine.journal-97043.20220326095051.8653@ruby-lang.org> (raw)
In-Reply-To: redmine.issue-17489.20201228212330.8653@ruby-lang.org

Issue #17489 has been updated by kirs (Kir Shatrov).


wanabe (_ wanabe) wrote in #note-6:
> It seems be a autoload on non-main Ractor problem [Bug #18120].
> This operation is prohibited after https://bugs.ruby-lang.org/projects/ruby-master/repository/git/revisions/397a509b6d0d1470df8c290d7c4adef78f1532ee and does not result in a BUG thereafter.

That's great news!

I wish I knew how to close this ticket. Not sure I have permissions to do that...?

----------------------------------------
Bug #17489: Ractor segfaults
https://bugs.ruby-lang.org/issues/17489#change-97043

* Author: kirs (Kir Shatrov)
* Status: Assigned
* Priority: Normal
* Assignee: ko1 (Koichi Sasada)
* ruby -v: 3.0.0p0 (2020-12-25 revision 95aff21468) [x86_64-darwin19]
* Backport: 2.5: UNKNOWN, 2.6: UNKNOWN, 2.7: UNKNOWN
----------------------------------------
I was able to boil it down to this script:

```ruby
require 'bundler/inline'

gemfile do
  source 'https://rubygems.org'
  gem "sinatra", "~> 2.1"
end

require 'sinatra'

class App < Sinatra::Base
  get '/' do
    200
  end
end

module Sinatra
  class Base
    class << self
      # patch it to avoid hitting other unsafe things
      def setup_default_middleware(builder)
        builder.use Rack::NullLogger
      end
    end
  end
end

workers = 2.times.map do
  Ractor.new { App.new }
end

Ractor.select(*workers)
```

Even though the code doesn't make a lot of sense and Sinatra has other stuff that's not compatible with Ractor, I would not expect user-level Ruby code to segfault.


I have attached the crash report and stderr output.

---Files--------------------------------
segfault.dump (44.8 KB)
ruby_2020-12-29-002108_Kirs-MacBook-Pro-2.crash (27.9 KB)


-- 
https://bugs.ruby-lang.org/

  parent reply	other threads:[~2022-03-26  9:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-28 21:23 [ruby-core:101797] [Ruby master Bug#17489] Ractor segfaults shatrov
2021-01-05  1:34 ` [ruby-core:101919] " ko1
2021-01-05 21:25 ` [ruby-core:101940] " yura.des
2022-03-25 11:29 ` [ruby-core:108066] " wanabe (_ wanabe)
2022-03-26  9:50 ` kirs (Kir Shatrov) [this message]
2022-03-26 20:36 ` [ruby-core:108086] " wanabe (_ wanabe)

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-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.ruby-lang.org/en/community/mailing-lists/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=redmine.journal-97043.20220326095051.8653@ruby-lang.org \
    --to=ruby-core@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 read-only IMAP folder(s) and NNTP newsgroup(s).