From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,UNPARSEABLE_RELAY shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from neon.ruby-lang.org (neon.ruby-lang.org [221.186.184.75]) by dcvr.yhbt.net (Postfix) with ESMTP id 481791F4B4 for ; Tue, 5 Jan 2021 01:34:18 +0000 (UTC) Received: from neon.ruby-lang.org (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id 5BB61120ADA; Tue, 5 Jan 2021 10:33:28 +0900 (JST) Received: from xtrwkhkc.outbound-mail.sendgrid.net (xtrwkhkc.outbound-mail.sendgrid.net [167.89.16.28]) by neon.ruby-lang.org (Postfix) with ESMTPS id AEE71120AD7 for ; Tue, 5 Jan 2021 10:33:26 +0900 (JST) Received: by filterdrecv-p3las1-685fdc5bbc-t824x with SMTP id filterdrecv-p3las1-685fdc5bbc-t824x-19-5FF3C214-2C 2021-01-05 01:34:12.838264118 +0000 UTC m=+2169115.986546295 Received: from herokuapp.com (unknown) by geopod-ismtpd-4-4 (SG) with ESMTP id IqTdtxZ_SliuhzIxGRKNtg for ; Tue, 05 Jan 2021 01:34:12.567 +0000 (UTC) Date: Tue, 05 Jan 2021 01:34:12 +0000 (UTC) From: ko1@atdot.net Message-ID: References: Mime-Version: 1.0 X-Redmine-MailingListIntegration-Message-Ids: 77826 X-Redmine-Project: ruby-master X-Redmine-Issue-Tracker: Bug X-Redmine-Issue-Id: 17489 X-Redmine-Issue-Author: kirs X-Redmine-Issue-Assignee: ko1 X-Redmine-Sender: ko1 X-Mailer: Redmine X-Redmine-Host: bugs.ruby-lang.org X-Redmine-Site: Ruby Issue Tracking System X-Auto-Response-Suppress: All Auto-Submitted: auto-generated X-SG-EID: =?us-ascii?Q?fVTMYOBjtdvXNcWwrscBhLsHItUXVK5L4mtnq0mdcRfYvUAUZbZbP+QWHDzJJ8?= =?us-ascii?Q?sU3H2bfhxXMDR8rmRaGV2Is5JbVMKeanFhZpQy6?= =?us-ascii?Q?GEfOBbrrHj+N00El+ZyFIJPfdY5Gqq+D3caO=2Fi1?= =?us-ascii?Q?u8c0q932bmV2hPcVVgq7JqG46E7P4gEkkuoRnxO?= =?us-ascii?Q?Jq7iv5d4QwclFewp6H98y=2FoR=2Fjz=2FMyK05gw=3D=3D?= To: ruby-core@ruby-lang.org X-Entity-ID: b/2+PoftWZ6GuOu3b0IycA== X-ML-Name: ruby-core X-Mail-Count: 101919 Subject: [ruby-core:101919] [Ruby master Bug#17489] Ractor segfaults X-BeenThere: ruby-core@ruby-lang.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Ruby developers List-Id: Ruby developers List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ruby-core-bounces@ruby-lang.org Sender: "ruby-core" Issue #17489 has been updated by ko1 (Koichi Sasada). Assignee set to ko1 (Koichi Sasada) Status changed from Open to Assigned Thank you. I can confirm the reproducing. This issue is maybe from the lack of synchronization for the constant table. ---------------------------------------- Bug #17489: Ractor segfaults https://bugs.ruby-lang.org/issues/17489#change-89765 * 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/