From: merch-redmine@... Date: 2019-08-07T18:08:40+00:00 Subject: [ruby-core:94189] [Ruby master Bug#7833] DRb has problems with BasicObject Issue #7833 has been updated by jeremyevans0 (Jeremy Evans). File drb-basicobject-7833.patch added This is still a bug in the master branch. Attached is a patch that fixes the issue. It's a decent size patch as there are many parts of drb that need to be modified to handle BasicObject instances. This patch also fixes a bug in the rescue clause of any_to_s, as sprintf does not support a `%l` modifier (maybe it did at some point in the past, before 1.8.7?). ---------------------------------------- Bug #7833: DRb has problems with BasicObject https://bugs.ruby-lang.org/issues/7833#change-80449 * Author: prijutme4ty (Ilya Vorontsov) * Status: Assigned * Priority: Normal * Assignee: seki (Masatoshi Seki) * Target version: * ruby -v: 1.9.3p374 * Backport: 2.3: UNKNOWN, 2.4: UNKNOWN, 2.5: UNKNOWN ---------------------------------------- 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' $drb_uri = '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' $drb_uri = 'druby://localhost:1111' DRb.start_service conn = DRbObject.new_with_uri($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 `recv_reply' 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 `
' ---Files-------------------------------- drb-basicobject-7833.patch (4.95 KB) -- https://bugs.ruby-lang.org/ Unsubscribe: