ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
From: merch-redmine@jeremyevans.net
To: ruby-core@ruby-lang.org
Subject: [ruby-core:94522] [Ruby master Bug#12702] DRb client fails when calling out-of-process remote method with a block
Date: Sat, 24 Aug 2019 03:21:19 +0000 (UTC)	[thread overview]
Message-ID: <redmine.journal-80963.20190824032118.35b1b6e075878ba9@ruby-lang.org> (raw)
In-Reply-To: redmine.issue-12702.20160824114621@ruby-lang.org

Issue #12702 has been updated by jeremyevans0 (Jeremy Evans).

Status changed from Open to Rejected

This is a bug in your code, you are not calling `DRb.start_service` in the client program.  The client program needs a DRb server running in order to handle the sending-block-to-remote-method case.  See the example in the "Client code" section of the `DRb` module rdoc. 

----------------------------------------
Bug #12702: DRb client fails when calling out-of-process remote method with a block
https://bugs.ruby-lang.org/issues/12702#change-80963

* Author: djellemah (John Anderson)
* Status: Rejected
* Priority: Normal
* Assignee: seki (Masatoshi Seki)
* Target version: 
* ruby -v: ruby 2.4.0dev (2016-08-24 trunk 55999) [x86_64-linux]
* Backport: 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN
----------------------------------------
See attached code for test case.

applies to ruby-2.3.1 and ruby-2.4.0dev (2016-08-24 trunk 55999)

The problem starts in DRbObject#method_missing where
the code following DRb.here? is used for the in-process case which works.

But the code in the block for

  succ, result = self.class.with_friend(@uri) do

is used for the out-of-process case. Here, DrbMessage#send_request fails
because b is a Proc, and in DrbMessage#dump the call to make_proxy fails
because DRbObject.new(b) fails.


---Files--------------------------------
drb_block_error.rb (1.46 KB)


-- 
https://bugs.ruby-lang.org/

      parent reply	other threads:[~2019-08-24  3:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <redmine.issue-12702.20160824114621@ruby-lang.org>
2016-08-24 11:46 ` [ruby-core:77038] [Ruby trunk Bug#12702] DRb client fails when calling out-of-process remote method with a block john
2019-08-24  3:21 ` merch-redmine [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.ruby-lang.org/en/community/mailing-lists/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=redmine.journal-80963.20190824032118.35b1b6e075878ba9@ruby-lang.org \
    --to=ruby-core@ruby-lang.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).