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 2581E1F4B4 for ; Tue, 5 Jan 2021 01:41:32 +0000 (UTC) Received: from neon.ruby-lang.org (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id 4F83D120AEF; Tue, 5 Jan 2021 10:40:42 +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 12224120A99 for ; Tue, 5 Jan 2021 10:40:39 +0900 (JST) Received: by filterdrecv-p3mdw1-7474cd8bfd-jwhj5 with SMTP id filterdrecv-p3mdw1-7474cd8bfd-jwhj5-21-5FF3C3BC-30 2021-01-05 01:41:16.926795002 +0000 UTC m=+2169546.638151615 Received: from herokuapp.com (unknown) by geopod-ismtpd-5-0 (SG) with ESMTP id V_Typ37NQHi7xlsh1FZplg for ; Tue, 05 Jan 2021 01:41:16.849 +0000 (UTC) Date: Tue, 05 Jan 2021 01:41:16 +0000 (UTC) From: ko1@atdot.net Message-ID: References: Mime-Version: 1.0 X-Redmine-MailingListIntegration-Message-Ids: 77828 X-Redmine-Project: ruby-master X-Redmine-Issue-Tracker: Bug X-Redmine-Issue-Id: 17477 X-Redmine-Issue-Author: kirs 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?fVTMYOBjtdvXNcWwrscBhLsHItUXVK5L4mtnq0mdcRc=2FyIK2niG5oMZT4e=2FYdd?= =?us-ascii?Q?FLmHcgs65ixEArIXr+RDFkd9L3IsfCnJUzQD0rc?= =?us-ascii?Q?4prS57oKEYgkH7W9FfuA1q0UfgVa4gxqD5AekKg?= =?us-ascii?Q?HZKm5uMu8DSBTv+GaF9kVCChmVO5AXOtxqmdzV7?= =?us-ascii?Q?pj25Fovl0O28qYo7sSnTOYfEikD1zG=2F8gYQ=3D=3D?= To: ruby-core@ruby-lang.org X-Entity-ID: b/2+PoftWZ6GuOu3b0IycA== X-ML-Name: ruby-core X-Mail-Count: 101921 Subject: [ruby-core:101921] [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="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ruby-core-bounces@ruby-lang.org Sender: "ruby-core" Issue #17477 has been updated by ko1 (Koichi Sasada). Status changed from Open to Closed continue to discuss on #17420. ---------------------------------------- Bug #17477: Ractor and pp incompatibility https://bugs.ruby-lang.org/issues/17477#change-89767 * Author: kirs (Kir Shatrov) * Status: Closed * Priority: Normal * ruby -v: 3.0.0 * Backport: 2.5: UNKNOWN, 2.6: UNKNOWN, 2.7: UNKNOWN ---------------------------------------- ```ruby r = Ractor.new do pp("foobar") end Ractor.select(r) ``` fails with: ``` # terminated with exception (report_on_exception is true): :164:in `ensure in require': can not access non-shareable objects in constant Kernel::RUBYGEMS_ACTIVATION_MONITOR by non-main ractor. (Ractor::IsolationError) from :167:in `require' from notractor.rb:8:in `block in
' :37:in `require': can not access non-shareable objects in constant Kernel::RUBYGEMS_ACTIVATION_MONITOR by non-main ractor. (Ractor::IsolationError) from notractor.rb:8:in `block in
' :345:in `select': thrown by remote Ractor. (Ractor::RemoteError) from notractor.rb:11:in `
' :164:in `ensure in require': can not access non-shareable objects in constant Kernel::RUBYGEMS_ACTIVATION_MONITOR by non-main ractor. (Ractor::IsolationError) from :167:in `require' from notractor.rb:8:in `block in
' :37:in `require': can not access non-shareable objects in constant Kernel::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 Ractor - but I don't think it is expected for developers. We should optimize for developer's happiness and either make it just work or make it clear that everything should be required beforehand. -- https://bugs.ruby-lang.org/