Bug #7833

DRb has problems with BasicObject

Added by Ilya Vorontsov about 1 year ago. Updated about 1 year ago.

[ruby-core:52148]
Status:Assigned
Priority:Normal
Assignee:Masatoshi Seki
Category:lib
Target version:next minor
ruby -v:1.9.3p374 Backport:

Description

I realized some problems with DRb and BasicObject
1) I cannot create front object of BasicObject class because DRb tries to call private_methods class

2) Call to DRb can't return instance of BasicObject class, instead it hangs.

serv.rb:

require 'drb'
$drburi = 'druby://localhost:1111'
class Front
def func
BasicObject.new
end
end
DRb.start
service($drb_uri, Front.new)
DRb.thread.join

conn.rb:

require 'drb'
$drburi = 'druby://localhost:1111'
DRb.start
service
conn = DRbObject.newwithuri($drb_uri)
p conn.func

When after a while (tens of seconds) I break the server, client shows me trace:

conn.rb
C:/Ruby193/lib/ruby/1.9.1/drb/drb.rb:570:in load': connection closed (DRb::DRbConnError)
from C:/Ruby193/lib/ruby/1.9.1/drb/drb.rb:632:in
recvreply'
from C:/Ruby193/lib/ruby/1.9.1/drb/drb.rb:918:in recv_reply'
from C:/Ruby193/lib/ruby/1.9.1/drb/drb.rb:1197:in
send
message'
from C:/Ruby193/lib/ruby/1.9.1/drb/drb.rb:1088:in block (2 levels) in method_missing'
from C:/Ruby193/lib/ruby/1.9.1/drb/drb.rb:1172:in
open'
from C:/Ruby193/lib/ruby/1.9.1/drb/drb.rb:1087:in block in method_missing'
from C:/Ruby193/lib/ruby/1.9.1/drb/drb.rb:1105:in
with_friend'
from C:/Ruby193/lib/ruby/1.9.1/drb/drb.rb:1086:in method_missing'
from D:/programming/iogen_tools/website/server/tmp/conn.rb:5:in
'

History

#1 Updated by Usaku NAKAMURA about 1 year ago

  • Status changed from Open to Assigned
  • Assignee set to Masatoshi Seki

#2 Updated by Yui NARUSE about 1 year ago

  • Target version changed from 1.9.3 to next minor

Also available in: Atom PDF