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.6 required=3.0 tests=AWL,BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED,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 DB1A61F4B4 for ; Tue, 29 Dec 2020 09:12:13 +0000 (UTC) Received: from neon.ruby-lang.org (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id A8EBD120A1D; Tue, 29 Dec 2020 18:11:22 +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 85EE9120A06 for ; Tue, 29 Dec 2020 18:11:20 +0900 (JST) Received: by filterdrecv-p3las1-685fdc5bbc-dhm6v with SMTP id filterdrecv-p3las1-685fdc5bbc-dhm6v-19-5FEAF2E2-26 2020-12-29 09:12:02.755246263 +0000 UTC m=+1591784.049499574 Received: from herokuapp.com (unknown) by ismtpd0039p1mdw1.sendgrid.net (SG) with ESMTP id 8jNfy5LxT7K7GdRSGNYMKw for ; Tue, 29 Dec 2020 09:12:02.588 +0000 (UTC) Date: Tue, 29 Dec 2020 09:12:02 +0000 (UTC) From: shatrov@me.com Message-ID: References: Mime-Version: 1.0 X-Redmine-MailingListIntegration-Message-Ids: 77707 X-Redmine-Project: ruby-master X-Redmine-Issue-Tracker: Bug X-Redmine-Issue-Id: 17477 X-Redmine-Issue-Author: kirs X-Redmine-Sender: kirs 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?h605rtfxHUz9JKWQv8rL01lKGkbDwBVz=2FBYWeiTyV=2FrgBnkW3jVES6AlVLtmDH?= =?us-ascii?Q?6plm5qYHnCEy3aFbPvmj8RHx9j8EUWV5IJHZq9B?= =?us-ascii?Q?I+guFOjkH1MLEH=2FqBpwFzFAliWWOgMIuVRrEdYw?= =?us-ascii?Q?t5SNe4O+YXeQ9fp4aHR2f0vy4h5gifXIsjiZA=2Fi?= =?us-ascii?Q?N6bF=2Fw8qfWt7moXHozGHnzStm3aKCrVh+hA=3D=3D?= To: ruby-core@ruby-lang.org X-Entity-ID: b/2+PoftWZ6GuOu3b0IycA== X-ML-Name: ruby-core X-Mail-Count: 101805 Subject: [ruby-core:101805] [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 kirs (Kir Shatrov). marcandre (Marc-Andre Lafortune) wrote in #note-4: > I wrote a similar opinion to Martin D=FCrst's in #17420. I propose that w= e comment there (simply because the issue is older and more general) Thanks, I wasn't aware of #17420. Should I close this ticket? ---------------------------------------- Bug #17477: Ractor and pp incompatibility https://bugs.ruby-lang.org/issues/17477#change-89632 * 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: