[#80531] Re: [ruby-cvs:65407] normal:r58236 (trunk): thread.c: comments on M:N threading [ci skip] — Eric Wong <normalperson@...>

SASADA Koichi <ko1@ruby-lang.org> wrote:

24 messages 2017/04/02
[#80532] Re: [ruby-cvs:65407] normal:r58236 (trunk): thread.c: comments on M:N threading [ci skip] — SASADA Koichi <ko1@...> 2017/04/02

On 2017/04/02 11:35, Eric Wong wrote:

[#80540] Re: [ruby-cvs:65407] normal:r58236 (trunk): thread.c: comments on M:N threading [ci skip] — Eric Wong <normalperson@...> 2017/04/03

SASADA Koichi <ko1@atdot.net> wrote:

[#81027] Re: [ruby-cvs:65407] normal:r58236 (trunk): thread.c: comments on M:N threading [ci skip] — Eric Wong <normalperson@...> 2017/05/08

Eric Wong <normalperson@yhbt.net> wrote:

[#81028] Re: [ruby-cvs:65407] normal:r58236 (trunk): thread.c: comments on M:N threading [ci skip] — SASADA Koichi <ko1@...> 2017/05/08

On 2017/05/08 9:33, Eric Wong wrote:

[#81029] Re: [ruby-cvs:65407] normal:r58236 (trunk): thread.c: comments on M:N threading [ci skip] — SASADA Koichi <ko1@...> 2017/05/08

On 2017/05/08 10:53, SASADA Koichi wrote:

[#81031] Re: [ruby-cvs:65407] normal:r58236 (trunk): thread.c: comments on M:N threading [ci skip] — Eric Wong <normalperson@...> 2017/05/08

SASADA Koichi <ko1@atdot.net> wrote:

[#81033] Re: [ruby-cvs:65407] normal:r58236 (trunk): thread.c: comments on M:N threading [ci skip] — SASADA Koichi <ko1@...> 2017/05/08

On 2017/05/08 12:01, Eric Wong wrote:

[#81035] Re: [ruby-cvs:65407] normal:r58236 (trunk): thread.c: comments on M:N threading [ci skip] — Eric Wong <normalperson@...> 2017/05/08

SASADA Koichi <ko1@atdot.net> wrote:

[#81042] Re: [ruby-cvs:65407] normal:r58236 (trunk): thread.c: comments on M:N threading [ci skip] — SASADA Koichi <ko1@...> 2017/05/09

On 2017/05/08 15:36, Eric Wong wrote:

[#81044] Re: [ruby-cvs:65407] normal:r58236 (trunk): thread.c: comments on M:N threading [ci skip] — Eric Wong <normalperson@...> 2017/05/09

SASADA Koichi <ko1@atdot.net> wrote:

[#81045] Re: [ruby-cvs:65407] normal:r58236 (trunk): thread.c: comments on M:N threading [ci skip] — SASADA Koichi <ko1@...> 2017/05/09

On 2017/05/09 12:38, Eric Wong wrote:

[#81047] Re: [ruby-cvs:65407] normal:r58236 (trunk): thread.c: comments on M:N threading [ci skip] — Eric Wong <normalperson@...> 2017/05/09

SASADA Koichi <ko1@atdot.net> wrote:

[ruby-core:80767] [Ruby trunk Bug#13431] sample/drb/http0*.rb is not working.

From: zn@...
Date: 2017-04-18 12:35:24 UTC
List: ruby-core #80767
Issue #13431 has been updated by znz (Kazuhiro NISHIYAMA).

Assignee set to seki (Masatoshi Seki)

以下のようにサーバーを起動して別端末で `ruby -e '$LOAD_PATH.push "sample"' -e 'require "drb/http0"' -e 'remote = DRbObject.new_with_uri "http://127.0.0.1:12346"; puts remote.test'` のように呼び出すと、以下のように `client.uri` で `NoMethodError` になるので、 r32254 の変更で動かなくなったようです。

```
% ruby -vdI lib -e '$LOAD_PATH.push "sample"' -e 'require "drb/http0serv"' -e 'class SampleObject;def test;"ACK!";end;end;DRb.start_service("http://127.0.0.1:12346", SampleObject.new); DRb.thread.join'
ruby 2.5.0dev (2017-04-18 trunk 58385) [x86_64-linux]
Exception `LoadError' at .../ruby/lib/rubygems.rb:1345 - cannot load such file -- rubygems/defaults/operating_system
Exception `LoadError' at .../ruby/lib/rubygems.rb:1354 - cannot load such file -- rubygems/defaults/ruby
Exception `DRb::DRbBadScheme' at .../ruby/lib/drb/drb.rb:826 - http://127.0.0.1:12346
Exception `NoMethodError' at .../ruby/lib/drb/drb.rb:1661 - undefined method `uri' for #<DRb::HTTP0::ServerSide:0x0000000002593b28>
Exception `NoMethodError' at -e:3 - undefined method `uri' for #<DRb::HTTP0::ServerSide:0x0000000002593b28>
127.0.0.1 - - [18/Apr/2017:21:31:19 JST] "POST / HTTP/1.1" 200 0
- -> /
        from .../ruby/lib/drb/drb.rb:1660:in `block in main_loop'
        from .../ruby/lib/drb/drb.rb:1660:in `synchronize'
.../ruby/lib/drb/drb.rb:1661:in `block (2 levels) in main_loop': undefined method `uri' for #<DRb::HTTP0::ServerSide:0x0000000002593b28> (NoMethodError)
```

----------------------------------------
Bug #13431: sample/drb/http0*.rb is not working.
https://bugs.ruby-lang.org/issues/13431#change-64354

* Author: youchan (瑶 大崎)
* Status: Open
* Priority: Normal
* Assignee: seki (Masatoshi Seki)
* Target version: 
* ruby -v: ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-darwin16]
* Backport: 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: UNKNOWN
----------------------------------------
I tried to use drb over http with the sample code *sample/drb/http0*.rb*
I wrote the code as following.

*server.rb*
~~~
require 'drb/drb'
require_relative './http0serv'

class SampleObject
  def test
    "ACK!"
  end
end

DRb.start_service("http://127.0.0.1:1234", SampleObject.new)
DRb.thread.join
~~~

*client.rb*
~~~
require 'drb/drb'
require_relative './http0'

remote = DRbObject.new_with_uri "http://127.0.0.1:1234"

puts remote.test
~~~

This results in the following.

~~~
/Users/youchan/.rbenv/versions/2.4.1/lib/ruby/2.4.0/net/protocol.rb:176:in `rbuf_fill': Net::ReadTimeout (Net::ReadTimeout)
        from /Users/youchan/.rbenv/versions/2.4.1/lib/ruby/2.4.0/net/protocol.rb:154:in `readuntil'
        from /Users/youchan/.rbenv/versions/2.4.1/lib/ruby/2.4.0/net/protocol.rb:164:in `readline'
        from /Users/youchan/.rbenv/versions/2.4.1/lib/ruby/2.4.0/net/http/response.rb:40:in `read_status_line'
        from /Users/youchan/.rbenv/versions/2.4.1/lib/ruby/2.4.0/net/http/response.rb:29:in `read_new'
        from /Users/youchan/.rbenv/versions/2.4.1/lib/ruby/2.4.0/net/http.rb:1446:in `block in transport_request'
        from /Users/youchan/.rbenv/versions/2.4.1/lib/ruby/2.4.0/net/http.rb:1443:in `catch'
        from /Users/youchan/.rbenv/versions/2.4.1/lib/ruby/2.4.0/net/http.rb:1443:in `transport_request'
        from /Users/youchan/.rbenv/versions/2.4.1/lib/ruby/2.4.0/net/http.rb:1416:in `request'
        from /Users/youchan/.rbenv/versions/2.4.1/lib/ruby/2.4.0/net/http.rb:1409:in `block in request'
        from /Users/youchan/.rbenv/versions/2.4.1/lib/ruby/2.4.0/net/http.rb:877:in `start'
        from /Users/youchan/.rbenv/versions/2.4.1/lib/ruby/2.4.0/net/http.rb:1407:in `request'
        from /Users/youchan/.rbenv/versions/2.4.1/lib/ruby/2.4.0/net/http.rb:1430:in `send_entity'
        from /Users/youchan/.rbenv/versions/2.4.1/lib/ruby/2.4.0/net/http.rb:1218:in `post'
        from /Users/youchan/Projects/tmp/drb_over_http/http0.rb:67:in `post'
        from /Users/youchan/Projects/tmp/drb_over_http/http0.rb:54:in `send_request'
        from /Users/youchan/.rbenv/versions/2.4.1/lib/ruby/2.4.0/drb/drb.rb:1253:in `send_message'
        from /Users/youchan/.rbenv/versions/2.4.1/lib/ruby/2.4.0/drb/drb.rb:1142:in `block (2 levels) in method_missing'
        from /Users/youchan/.rbenv/versions/2.4.1/lib/ruby/2.4.0/drb/drb.rb:1229:in `open'
        from /Users/youchan/.rbenv/versions/2.4.1/lib/ruby/2.4.0/drb/drb.rb:1141:in `block in method_missing'
        from /Users/youchan/.rbenv/versions/2.4.1/lib/ruby/2.4.0/drb/drb.rb:1160:in `with_friend'
        from /Users/youchan/.rbenv/versions/2.4.1/lib/ruby/2.4.0/drb/drb.rb:1140:in `method_missing'
        from client.rb:6:in `<main>'
~~~



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

Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>

In This Thread

Prev Next