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-ASN: AS24940 94.130.0.0/16 X-Spam-Status: No, score=-2.9 required=3.0 tests=AWL,BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_BL_SPAMCOP_NET,SPF_HELO_PASS, SPF_PASS,UNPARSEABLE_RELAY shortcircuit=no autolearn=no autolearn_force=no version=3.4.2 Received: from nue.mailmanlists.eu (nue.mailmanlists.eu [94.130.110.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id B02BA1F910 for ; Sun, 27 Nov 2022 00:01:30 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=ruby-lang.org header.i=@ruby-lang.org header.b="A7UrBoue"; dkim-atps=neutral Received: from nue.mailmanlists.eu (localhost [127.0.0.1]) by nue.mailmanlists.eu (Postfix) with ESMTP id 5E2B07E6CA; Sun, 27 Nov 2022 00:01:22 +0000 (UTC) Authentication-Results: nue.mailmanlists.eu; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=ruby-lang.org header.i=@ruby-lang.org header.a=rsa-sha256 header.s=s1 header.b=A7UrBoue; dkim-atps=neutral Received: from xtrwkhkc.outbound-mail.sendgrid.net (xtrwkhkc.outbound-mail.sendgrid.net [167.89.16.28]) by nue.mailmanlists.eu (Postfix) with ESMTPS id DAAF67E6BE for ; Sun, 27 Nov 2022 00:01:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ruby-lang.org; h=from:references:subject:mime-version:content-type: content-transfer-encoding:list-id:to:cc; s=s1; bh=o2rqbZ1DagwP2+XxbnK777MFr5Sw44RU+/83CmhBCjI=; b=A7UrBoueTQUo9kpDziNbgnRHmIDuXcfrRkfwKj6fpWR5tDGX2bU7dwpMtetVxUv01iuY UHBZgO642mZtOM0P3HLX4BZwmHbH9+mTAzHwqMeJNzhgitqZsm8LaqMCiXiag05kd9mCPI 5AkIUHdEzOBiPqCQdw/wPjo8fBwxNEiJX0Zrmj7pvYhZ66B8naQigX5q9G36xHa+FESY1y zPXXcQ3RQPb+RveDNAurbF72DOey8Mjg6E8yCAI07ukVWZ+r6XeLOn4W7CBjQVS/nGI8kH 6wQb47spZZ37wO9gpGJq5HQZ/LFd0jtsrzbNvJUp0t9Q+JhVzWB57GemVg0hF12g== Received: by filterdrecv-6f5868ff54-b6g2m with SMTP id filterdrecv-6f5868ff54-b6g2m-1-6382A8CD-83 2022-11-27 00:01:17.582556452 +0000 UTC m=+780871.076323830 Received: from herokuapp.com (unknown) by geopod-ismtpd-1-3 (SG) with ESMTP id fnWt2XHOSnG-q0RUUgWedg for ; Sun, 27 Nov 2022 00:01:17.537 +0000 (UTC) Date: Sun, 27 Nov 2022 00:01:17 +0000 (UTC) From: "fxn (Xavier Noria)" Message-ID: References: Mime-Version: 1.0 X-Redmine-Project: ruby-master X-Redmine-Issue-Tracker: Bug X-Redmine-Issue-Id: 19154 X-Redmine-Issue-Author: fxn X-Redmine-Sender: fxn 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-Redmine-MailingListIntegration-Message-Ids: 87374 X-SG-EID: =?us-ascii?Q?Gg3oD6sm+uO8=2F=2FvPD7Pc20vmQucbh=2FeP016RLAVuAgDK55zIMbGfsoPmorYbIK?= =?us-ascii?Q?jYLtCmLTmdzpQBRFQU65Qda9rskRNzSC1Cmldvq?= =?us-ascii?Q?8ERy9EaOc7N1aqo9EmFss++ahClWObXX8gjaxLq?= =?us-ascii?Q?K9I=2FPTY3A9TKZcFOiYwFWupyhpdbMNmwZAZhDNt?= =?us-ascii?Q?tEhzFp0bv5l7rXQBFrL5jAGv6MqmBkWaC87qXgW?= =?us-ascii?Q?bHiRrKwBFcAgXxK+8xifJd8JomcMM=2F30iofUVNT?= =?us-ascii?Q?DoCHJy6DdvSFcuKhK02Sw=3D=3D?= To: ruby-core@ml.ruby-lang.org X-Entity-ID: b/2+PoftWZ6GuOu3b0IycA== Message-ID-Hash: 44GIW6UJ6DR2SREGUJPRJL36RSIGHOBD X-Message-ID-Hash: 44GIW6UJ6DR2SREGUJPRJL36RSIGHOBD X-MailFrom: bounces+313651-b711-ruby-core=ml.ruby-lang.org@em5188.ruby-lang.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.3 Precedence: list Reply-To: Ruby developers Subject: [ruby-core:111028] [Ruby master Bug#19154] Specify require and autoload guarantees in ractors List-Id: Ruby developers Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Issue #19154 has been updated by fxn (Xavier Noria). Besides this particular error, I am wondering about concurrency guarantees in parallel requires to the same file, or parallel references to a constant for which there is an autoload. ---------------------------------------- Bug #19154: Specify require and autoload guarantees in ractors https://bugs.ruby-lang.org/issues/19154#change-100281 * Author: fxn (Xavier Noria) * Status: Open * Priority: Normal * ruby -v: ruby 3.2.0preview3 (2022-11-27) [x86_64-darwin22] * Backport: 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN ---------------------------------------- Given a file `c.rb`: ```ruby class C end ``` the following script: ```ruby r1 = Ractor.new do require './c.rb' end r2 = Ractor.new do require './c.rb' end r1.take r2.take ``` raises: ``` % ruby -v foo.rb ruby 3.2.0preview3 (2022-11-27) [x86_64-darwin22] foo.rb:1: warning: Ractor is experimental, and the behavior may change in future versions of Ruby! Also there are many implementation issues. # terminated with exception (report_on_exception is true): # 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 foo.rb:6:in `block in
' :37:in `require':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' can not access non-shareable objects in constant Kernel::RUBYGEMS_ACTIVATION_MONITOR by non-main ractor. (Ractor::IsolationError) from foo.rb:2: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 foo.rb:2:in `block in
' from foo.rb:6:in `block in
' :698:in `take': thrown by remote Ractor. (Ractor::RemoteError) from foo.rb:9: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 foo.rb:2: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 foo.rb:2:in `block in
' ``` Would it be possible to have documentation about their interaction? This is important also to understand autoloading within ractors, since constant references may trigger `require` calls. -- https://bugs.ruby-lang.org/ ______________________________________________ ruby-core mailing list -- ruby-core@ml.ruby-lang.org To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/