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: AS4713 221.184.0.0/13 X-Spam-Status: No, score=-3.9 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS 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 A8E681F45A for ; Wed, 14 Aug 2019 23:53:28 +0000 (UTC) Received: from neon.ruby-lang.org (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id F21FD120AF9; Thu, 15 Aug 2019 08:53:18 +0900 (JST) Received: from o1678916x28.outbound-mail.sendgrid.net (o1678916x28.outbound-mail.sendgrid.net [167.89.16.28]) by neon.ruby-lang.org (Postfix) with ESMTPS id 03F6C120A28 for ; Thu, 15 Aug 2019 08:53:16 +0900 (JST) Received: by filter0092p3las1.sendgrid.net with SMTP id filter0092p3las1-10800-5D549EEF-1D 2019-08-14 23:53:19.507899048 +0000 UTC m=+26621.145732733 Received: from herokuapp.com (unknown [3.87.212.221]) by ismtpd0036p1mdw1.sendgrid.net (SG) with ESMTP id ac0uYhHbTB2KkYR0LWPgoQ for ; Wed, 14 Aug 2019 23:53:19.427 +0000 (UTC) Date: Wed, 14 Aug 2019 23:53:19 +0000 (UTC) From: merch-redmine@jeremyevans.net Message-ID: References: Mime-Version: 1.0 X-Redmine-MailingListIntegration-Message-Ids: 69907 X-Redmine-Project: ruby-trunk X-Redmine-Issue-Id: 5618 X-Redmine-Issue-Author: larsch X-Redmine-Issue-Assignee: seki X-Redmine-Sender: jeremyevans0 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?RVE3t853K5scBhbmJHUzZTFFeVC=2FZSUmHZ0Dc+26wcEi2CTgsF1oz0wTSSxGGN?= =?us-ascii?Q?BIhgX+jf4Ulr6E1sm1yfhTuVKSMqUeJxOqmnNK=2F?= =?us-ascii?Q?oX5onWvjqYCe6pHW4UbZmCuRYlK3jLxHGkU19vM?= =?us-ascii?Q?56JiGzMNnXJicyR1WZl69bpU0fa31HHD6Zz0xnP?= =?us-ascii?Q?F5J=2FaeEuRe4KLLhEe2njUATCq1vf6nflbcQ=3D=3D?= To: ruby-core@ruby-lang.org X-ML-Name: ruby-core X-Mail-Count: 94360 Subject: [ruby-core:94360] [Ruby master Bug#5618] Exceptions cause DRb connection to be closed 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 #5618 has been updated by jeremyevans0 (Jeremy Evans). File drb-rescue-exception-5618.patch added This issue is unrelated to whether the client defines the same exception class as the server, and the behavior in my testing appears to be the same on 1.8 as in the master branch. The underlying issue is that the example code here uses a subclass of `Exception`, and `DRb::DRbServer::InvokeMethod#perform` does not rescue `Exception`. Attached is a patch that fixes this issue. ---------------------------------------- Bug #5618: Exceptions cause DRb connection to be closed https://bugs.ruby-lang.org/issues/5618#change-80769 * Author: larsch (Lars Christensen) * Status: Assigned * Priority: Normal * Assignee: seki (Masatoshi Seki) * Target version: * ruby -v: ruby 1.9.3p0 (2011-10-30) [i386-mingw32] * Backport: ---------------------------------------- If an exception is thrown in a DRb server of a class that is not defined in the client process, the DRb connection is closed abrubtly. In Ruby 1.8, the exception was translated to an instance generic exception class (DRb::DRbRemoteError). Steps to reproduce: 1. Start DRb client+server 2. Throw exception of custom class in server (class not defined in client script). Observed behaviour: 3. Client raises DRb::DRbConnError because connection is closed - used to be generic error. Expected behaviour: 3. Client raises DRb::DRbRemoteError, and preserves full stack trace from server. Attached is server/client script showing the problem. Here is the stack trace of the client: C:/lang/Ruby193/lib/ruby/1.9.1/drb/drb.rb:570:in `load': connection closed (DRb::DRbConnError) from C:/lang/Ruby193/lib/ruby/1.9.1/drb/drb.rb:632:in `recv_reply' from C:/lang/Ruby193/lib/ruby/1.9.1/drb/drb.rb:918:in `recv_reply' from C:/lang/Ruby193/lib/ruby/1.9.1/drb/drb.rb:1197:in `send_message' from C:/lang/Ruby193/lib/ruby/1.9.1/drb/drb.rb:1088:in `block (2 levels) in method_missing' from C:/lang/Ruby193/lib/ruby/1.9.1/drb/drb.rb:1172:in `open' from C:/lang/Ruby193/lib/ruby/1.9.1/drb/drb.rb:1087:in `block in method_missing' from C:/lang/Ruby193/lib/ruby/1.9.1/drb/drb.rb:1105:in `with_friend' from C:/lang/Ruby193/lib/ruby/1.9.1/drb/drb.rb:1086:in `method_missing' from drbclient.rb:3:in `
' ---Files-------------------------------- drbserver.rb (194 Bytes) drbclient.rb (75 Bytes) drb-rescue-exception-5618.patch (1.03 KB) -- https://bugs.ruby-lang.org/