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,RCVD_IN_DNSWL_MED, 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 BCF781F4B4 for ; Mon, 28 Dec 2020 06:48:04 +0000 (UTC) Received: from neon.ruby-lang.org (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id E8F2B120A67; Mon, 28 Dec 2020 15:47:08 +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 15369120A4F for ; Mon, 28 Dec 2020 15:47:04 +0900 (JST) Received: by filterdrecv-p3mdw1-7474cd8bfd-ntdvf with SMTP id filterdrecv-p3mdw1-7474cd8bfd-ntdvf-19-5FE97F94-A 2020-12-28 06:47:48.310824647 +0000 UTC m=+1496730.328085804 Received: from herokuapp.com (unknown) by geopod-ismtpd-5-7 (SG) with ESMTP id evMNOWwKTDCqgY2mmWJrXA for ; Mon, 28 Dec 2020 06:47:48.193 +0000 (UTC) Date: Mon, 28 Dec 2020 06:47:48 +0000 (UTC) From: marcandre-ruby-core@marc-andre.ca Message-ID: References: Mime-Version: 1.0 X-Redmine-MailingListIntegration-Message-Ids: 77671 X-Redmine-Project: ruby-master X-Redmine-Issue-Tracker: Bug X-Redmine-Issue-Id: 17477 X-Redmine-Issue-Author: kirs X-Redmine-Sender: marcandre 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?6=2FIMxCQLDposcQf5wmbDAtfaKduBAO0bKyhL3BGZtMQ5q7K2TvpbN6A7JIyt9E?= =?us-ascii?Q?aOV5NWQFeoJlXznQyjrC9p0WMoVkSBRtE4FQyU4?= =?us-ascii?Q?m=2F5gT=2FOcGTuTVM7+JTAloorQzEWLajIzyFj4MaY?= =?us-ascii?Q?Zd0=2FHkSgXoktFzFvJNBNTFHGQcEl1de7oBuzAtW?= =?us-ascii?Q?4PaakbyqjwCCLEMsGQgWYsl3=2F+=2Fv9NnY0Fpc7lk?= =?us-ascii?Q?5pGVZtrAj2MmTWn5sN8RNUorGkVhi636By2hSO?= To: ruby-core@ruby-lang.org X-Entity-ID: b/2+PoftWZ6GuOu3b0IycA== X-ML-Name: ruby-core X-Mail-Count: 101769 Subject: [ruby-core:101769] [Ruby master Bug#17477] Ractor and pp incompatibility 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="iso-8859-1" Content-Transfer-Encoding: quoted-printable Errors-To: ruby-core-bounces@ruby-lang.org Sender: "ruby-core" Issue #17477 has been updated by marcandre (Marc-Andre Lafortune). I wrote a similar opinion to Martin D=FCrst's in #17420. I propose that we = comment there (simply because the issue is older and more general) ---------------------------------------- Bug #17477: Ractor and pp incompatibility https://bugs.ruby-lang.org/issues/17477#change-89597 * Author: kirs (Kir Shatrov) * Status: Open * Priority: Normal * ruby -v: 3.0.0 * Backport: 2.5: UNKNOWN, 2.6: UNKNOWN, 2.7: UNKNOWN ---------------------------------------- ```ruby r =3D Ractor.new do pp("foobar") end Ractor.select(r) ``` fails with: ``` # terminated with exception (report_on_excep= tion is true): :164:in `ensure in require': can not access non-shareable objects in co= nstant Kernel::RUBYGEMS_ACTIVATION_MONITOR by non-main ractor. (Ractor::Iso= lationError) from :167:in `require' from notractor.rb:8:in `block in
' :37:in `require': can not access non-shareable objects in constant Kern= el::RUBYGEMS_ACTIVATION_MONITOR by non-main ractor. (Ractor::IsolationError) from notractor.rb:8:in `block in
' :345:in `select': thrown by remote Ractor. (Ractor::Remote= Error) from notractor.rb:11:in `
' :164:in `ensure in require': can not access non-shareable objects in co= nstant Kernel::RUBYGEMS_ACTIVATION_MONITOR by non-main ractor. (Ractor::Iso= lationError) from :167:in `require' from notractor.rb:8:in `block in
' :37:in `require': can not access non-shareable objects in constant Kern= el::RUBYGEMS_ACTIVATION_MONITOR by non-main ractor. (Ractor::IsolationError) from notractor.rb:8:in `block in
' ``` This is easy to fix by calling `require 'pp'` in the top from the main Ract= or - but I don't think it is expected for developers. We should optimize fo= r developer's happiness and either make it just work or make it clear that = everything should be required beforehand. -- = https://bugs.ruby-lang.org/ Unsubscribe: