Drb server fails when yielding to client


#1

Hi,
Resending this with new subject line.

I looked at the Jira and Googled it. I could not find any issues which
talks about this or similar issue. My little debugging using wireshark
shows that server is closing connection while yielding to client, no
exception or error on server side.

=============
/opt/jruby/lib/ruby/1.8/drb/drb.rb:570:in load': connection closed (DRb::DRbConnError) from /opt/jruby/lib/ruby/1.8/drb/drb.rb:632:inrecv_reply’
from /opt/jruby/lib/ruby/1.8/drb/drb.rb:922:in recv_reply' from /opt/jruby/lib/ruby/1.8/drb/drb.rb:1200:insend_message’
from /opt/jruby/lib/ruby/1.8/drb/drb.rb:1091:in
method_missing' from /opt/jruby/lib/ruby/1.8/drb/drb.rb:1175:inopen’
from /opt/jruby/lib/ruby/1.8/drb/drb.rb:1090:in
method_missing' from /opt/jruby/lib/ruby/1.8/drb/drb.rb:1108:inwith_friend’
from /opt/jruby/lib/ruby/1.8/drb/drb.rb:1089:in
`method_missing’
from simpleclient.rb:5

Here is my simple server

require ‘drb/drb’

module DCP
class Site
include DRbUndumped
def test()
yield
end
end
end

if FILE == $0
DRb.start_service(“druby://localhost:7654”, DCP::Site.new)
puts DRb.uri
DRb.thread.join
end

======And client=======
require ‘drb/drb’

DRb.start_service
there = DRbObject.new_with_uri(‘druby://localhost:7654’)
there.test() {
puts “This is what was expected”
}

Any ideas? Shall I create ticket?

Thanks and Regards,
Manish


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

#2

I think Tom Enebo is looking into this; it looks like we’re allowing
Proc to be marshalled when we should not, and perhaps trying to marshal
it when we should not. I think he was on to something…Tom, you want to
comment on progress?

Manish S. wrote:

(DRb::DRbConnError)

end
require ‘drb/drb’
Thanks and Regards,
Manish


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

#3

Yep I am looking into this one today. I just need to dump the proper
TypeError and then see if things are working. I do think there may be
multiple problems too :frowning:

Still I think drb is one of the better use cases to show JRuby’s
compatibility, so I would like your script to work (and BTW using a
proc across drb client/server is pretty damn cool).

-Tom

On Tue, May 19, 2009 at 9:46 AM, Charles Oliver N.
removed_email_address@domain.invalid wrote:

I looked at the Jira and Googled it. I could not find any issues which
from /opt/jruby/lib/ruby/1.8/drb/drb.rb:1091:in `method_missing’

DRb.start_service(“druby://localhost:7654”, DCP::Site.new)
there.test() {
To unsubscribe from this list, please visit:


Blog: http://www.bloglines.com/blog/ThomasEEnebo
Email: removed_email_address@domain.invalid , removed_email_address@domain.invalid


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

#4

Actually I forgot to add the changed files so it is this commit:
http://github.com/jruby/jruby/commit/59a4474a6105bdf80cea3b1772b2cdf5ed36390d

On Tue, May 19, 2009 at 3:42 PM, Thomas E Enebo removed_email_address@domain.invalid
wrote:

Yep I am looking into this one today. I just need to dump the proper
removed_email_address@domain.invalid wrote:

I looked at the Jira and Googled it. I could not find any issues which
from /opt/jruby/lib/ruby/1.8/drb/drb.rb:1091:in `method_missing’

DRb.start_service(“druby://localhost:7654”, DCP::Site.new)
there.test() {
To unsubscribe from this list, please visit:


Blog: http://www.bloglines.com/blog/ThomasEEnebo
Email: removed_email_address@domain.invalid , removed_email_address@domain.invalid


Blog: http://www.bloglines.com/blog/ThomasEEnebo
Email: removed_email_address@domain.invalid , removed_email_address@domain.invalid


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

#5

So I can get your example to run fine with the marshaling fix I made
in commit 6bafaf5, BUT I cannot get 127.0.0.1 or localhost to work as
part of DRB service string. I need to use my DHCP assigned address
and everything works. I think it is something strange on my mac, but
I am looking into it a bit since I have no idea why it is broken.
Interestingly, I noticed ::1 (ipv6) does work???

-Tom

On Tue, May 19, 2009 at 1:08 PM, Thomas E Enebo removed_email_address@domain.invalid
wrote:

On Tue, May 19, 2009 at 9:46 AM, Charles Oliver N.

   from /opt/jruby/lib/ruby/1.8/drb/drb.rb:1200:in `send_message'

require ‘drb/drb’
if FILE == $0
there = DRbObject.new_with_uri(‘druby://localhost:7654’)

http://xircles.codehaus.org/manage_email


Blog: http://www.bloglines.com/blog/ThomasEEnebo
Email: removed_email_address@domain.invalid , removed_email_address@domain.invalid


Blog: http://www.bloglines.com/blog/ThomasEEnebo
Email: removed_email_address@domain.invalid , removed_email_address@domain.invalid


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

#6

Thanks for fix, Thomas.
Regards,
Manish

Thomas E Enebo wrote:

Hi,
from /opt/jruby/lib/ruby/1.8/drb/drb.rb:632:in `recv_reply’
Here is my simple server
end

Manish


Blog: http://www.bloglines.com/blog/ThomasEEnebo
Email: removed_email_address@domain.invalid , removed_email_address@domain.invalid


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email