[ruby-trunk - Bug #8203][Assigned] Rinda: recycled object

Issue #8203 has been reported by naruse (Yui NARUSE).


Bug #8203: Rinda: recycled object
https://bugs.ruby-lang.org/issues/8203

Author: naruse (Yui NARUSE)
Status: Assigned
Priority: Normal
Assignee: seki (Masatoshi Seki)
Category: lib
Target version:
ruby -v: ruby 2.1.0dev (2013-04-02 trunk 40047) [i686-linux]
(ubuntu1004-32)

test-allで以下のメッセージが出ているんですが、これってなんですか?
http://u32.rubyci.org/~chkbuild/ruby-trunk/log/20130402T010302Z.log.html.gz#test-all

Rinda::TupleSpaceProxyTest#test_take_bug_8215 =
/home/chkbuild/build/20130402T010302Z/ruby/lib/drb/drb.rb:369:in
_id2ref': 0xda91ca76 is recycled object (RangeError) from /home/chkbuild/build/20130402T010302Z/ruby/lib/drb/drb.rb:369:into_obj’
from /home/chkbuild/build/20130402T010302Z/ruby/lib/drb/drb.rb:1446:in
to_obj' from /home/chkbuild/build/20130402T010302Z/ruby/lib/drb/drb.rb:1748:into_obj’
from /home/chkbuild/build/20130402T010302Z/ruby/lib/drb/drb.rb:1025:in
_load' from /home/chkbuild/build/20130402T010302Z/ruby/lib/drb/drb.rb:590:inload’
from /home/chkbuild/build/20130402T010302Z/ruby/lib/drb/drb.rb:590:in
block in load' from /home/chkbuild/build/20130402T010302Z/ruby/lib/drb/drb.rb:586:insynchronize’
from /home/chkbuild/build/20130402T010302Z/ruby/lib/drb/drb.rb:586:in
load' from /home/chkbuild/build/20130402T010302Z/ruby/lib/drb/drb.rb:638:inrecv_reply’
from /home/chkbuild/build/20130402T010302Z/ruby/lib/drb/drb.rb:936:in
recv_reply' from /home/chkbuild/build/20130402T010302Z/ruby/lib/drb/drb.rb:1222:insend_message’
from /home/chkbuild/build/20130402T010302Z/ruby/lib/drb/drb.rb:1110:in
block (2 levels) in method_missing' from /home/chkbuild/build/20130402T010302Z/ruby/lib/drb/drb.rb:1197:inopen’
from /home/chkbuild/build/20130402T010302Z/ruby/lib/drb/drb.rb:1109:in
block in method_missing' from /home/chkbuild/build/20130402T010302Z/ruby/lib/drb/drb.rb:1132:inwith_friend’
from /home/chkbuild/build/20130402T010302Z/ruby/lib/drb/drb.rb:1108:in
method_missing' from /home/chkbuild/build/20130402T010302Z/ruby/lib/rinda/rinda.rb:265:inwrite’
from
/home/chkbuild/build/20130402T010302Z/ruby/test/rinda/test_rinda.rb:506:in
block in test_take_bug_8215' from /home/chkbuild/build/20130402T010302Z/ruby/test/rinda/test_rinda.rb:502:infork’
from
/home/chkbuild/build/20130402T010302Z/ruby/test/rinda/test_rinda.rb:502:in
test_take_bug_8215' from /home/chkbuild/build/20130402T010302Z/ruby/lib/test/unit.rb:858:inrun_test’
from
/home/chkbuild/build/20130402T010302Z/ruby/lib/minitest/unit.rb:1301:in
run' from /home/chkbuild/build/20130402T010302Z/ruby/lib/test/unit/testcase.rb:17:inrun’
from
/home/chkbuild/build/20130402T010302Z/ruby/lib/minitest/unit.rb:919:in
block in _run_suite' from /home/chkbuild/build/20130402T010302Z/ruby/lib/minitest/unit.rb:912:inmap’
from
/home/chkbuild/build/20130402T010302Z/ruby/lib/minitest/unit.rb:912:in
_run_suite' from /home/chkbuild/build/20130402T010302Z/ruby/lib/test/unit.rb:657:inblock in _run_suites’
from
/home/chkbuild/build/20130402T010302Z/ruby/lib/test/unit.rb:655:in
each' from /home/chkbuild/build/20130402T010302Z/ruby/lib/test/unit.rb:655:in_run_suites’
from
/home/chkbuild/build/20130402T010302Z/ruby/lib/minitest/unit.rb:867:in
_run_anything' from /home/chkbuild/build/20130402T010302Z/ruby/lib/minitest/unit.rb:1060:inrun_tests’
from
/home/chkbuild/build/20130402T010302Z/ruby/lib/minitest/unit.rb:1047:in
block in _run' from /home/chkbuild/build/20130402T010302Z/ruby/lib/minitest/unit.rb:1046:ineach’
from
/home/chkbuild/build/20130402T010302Z/ruby/lib/minitest/unit.rb:1046:in
_run' from /home/chkbuild/build/20130402T010302Z/ruby/lib/minitest/unit.rb:1035:inrun’
from /home/chkbuild/build/20130402T010302Z/ruby/lib/test/unit.rb:21:in
run' from /home/chkbuild/build/20130402T010302Z/ruby/lib/test/unit.rb:774:inrun’
from
/home/chkbuild/build/20130402T010302Z/ruby/lib/test/unit.rb:834:in run' from /home/chkbuild/build/20130402T010302Z/ruby/lib/test/unit.rb:838:inrun’
from ./test/runner.rb:17:in `’
1.42 s = .

Issue #8203 has been updated by nagachika (Tomoyuki C.).

おそらくですが、DRb.here?
が誤判定していてリモートのオブジェクト(TupleEntry)の参照をカレントプロセス(子プロセス)のオブジェクトと思って object_id
から ObjectSpace._id2ref でオブジェクト参照にしようとしてエラーになっているのではないかと。
DRb.here? の誤判定は一度親プロセスで DRb.start_service してから fork
しているからかなって気がしますが、再現していないので確認できてないです。main thread の Thread#[] の変数の内容は fork
しても引き継がれるようなのでこのせいかなぁ。

Bug #8203: Rinda: recycled object
https://bugs.ruby-lang.org/issues/8203#change-38480

Author: naruse (Yui NARUSE)
Status: Assigned
Priority: Normal
Assignee: seki (Masatoshi Seki)
Category: lib
Target version:
ruby -v: ruby 2.1.0dev (2013-04-02 trunk 40047) [i686-linux]
(ubuntu1004-32)

test-allで以下のメッセージが出ているんですが、これってなんですか?
http://u32.rubyci.org/~chkbuild/ruby-trunk/log/20130402T010302Z.log.html.gz#test-all

Rinda::TupleSpaceProxyTest#test_take_bug_8215 =
/home/chkbuild/build/20130402T010302Z/ruby/lib/drb/drb.rb:369:in
_id2ref': 0xda91ca76 is recycled object (RangeError) from /home/chkbuild/build/20130402T010302Z/ruby/lib/drb/drb.rb:369:into_obj’
from /home/chkbuild/build/20130402T010302Z/ruby/lib/drb/drb.rb:1446:in
to_obj' from /home/chkbuild/build/20130402T010302Z/ruby/lib/drb/drb.rb:1748:into_obj’
from /home/chkbuild/build/20130402T010302Z/ruby/lib/drb/drb.rb:1025:in
_load' from /home/chkbuild/build/20130402T010302Z/ruby/lib/drb/drb.rb:590:inload’
from /home/chkbuild/build/20130402T010302Z/ruby/lib/drb/drb.rb:590:in
block in load' from /home/chkbuild/build/20130402T010302Z/ruby/lib/drb/drb.rb:586:insynchronize’
from /home/chkbuild/build/20130402T010302Z/ruby/lib/drb/drb.rb:586:in
load' from /home/chkbuild/build/20130402T010302Z/ruby/lib/drb/drb.rb:638:inrecv_reply’
from /home/chkbuild/build/20130402T010302Z/ruby/lib/drb/drb.rb:936:in
recv_reply' from /home/chkbuild/build/20130402T010302Z/ruby/lib/drb/drb.rb:1222:insend_message’
from /home/chkbuild/build/20130402T010302Z/ruby/lib/drb/drb.rb:1110:in
block (2 levels) in method_missing' from /home/chkbuild/build/20130402T010302Z/ruby/lib/drb/drb.rb:1197:inopen’
from /home/chkbuild/build/20130402T010302Z/ruby/lib/drb/drb.rb:1109:in
block in method_missing' from /home/chkbuild/build/20130402T010302Z/ruby/lib/drb/drb.rb:1132:inwith_friend’
from /home/chkbuild/build/20130402T010302Z/ruby/lib/drb/drb.rb:1108:in
method_missing' from /home/chkbuild/build/20130402T010302Z/ruby/lib/rinda/rinda.rb:265:inwrite’
from
/home/chkbuild/build/20130402T010302Z/ruby/test/rinda/test_rinda.rb:506:in
block in test_take_bug_8215' from /home/chkbuild/build/20130402T010302Z/ruby/test/rinda/test_rinda.rb:502:infork’
from
/home/chkbuild/build/20130402T010302Z/ruby/test/rinda/test_rinda.rb:502:in
test_take_bug_8215' from /home/chkbuild/build/20130402T010302Z/ruby/lib/test/unit.rb:858:inrun_test’
from
/home/chkbuild/build/20130402T010302Z/ruby/lib/minitest/unit.rb:1301:in
run' from /home/chkbuild/build/20130402T010302Z/ruby/lib/test/unit/testcase.rb:17:inrun’
from
/home/chkbuild/build/20130402T010302Z/ruby/lib/minitest/unit.rb:919:in
block in _run_suite' from /home/chkbuild/build/20130402T010302Z/ruby/lib/minitest/unit.rb:912:inmap’
from
/home/chkbuild/build/20130402T010302Z/ruby/lib/minitest/unit.rb:912:in
_run_suite' from /home/chkbuild/build/20130402T010302Z/ruby/lib/test/unit.rb:657:inblock in _run_suites’
from
/home/chkbuild/build/20130402T010302Z/ruby/lib/test/unit.rb:655:in
each' from /home/chkbuild/build/20130402T010302Z/ruby/lib/test/unit.rb:655:in_run_suites’
from
/home/chkbuild/build/20130402T010302Z/ruby/lib/minitest/unit.rb:867:in
_run_anything' from /home/chkbuild/build/20130402T010302Z/ruby/lib/minitest/unit.rb:1060:inrun_tests’
from
/home/chkbuild/build/20130402T010302Z/ruby/lib/minitest/unit.rb:1047:in
block in _run' from /home/chkbuild/build/20130402T010302Z/ruby/lib/minitest/unit.rb:1046:ineach’
from
/home/chkbuild/build/20130402T010302Z/ruby/lib/minitest/unit.rb:1046:in
_run' from /home/chkbuild/build/20130402T010302Z/ruby/lib/minitest/unit.rb:1035:inrun’
from /home/chkbuild/build/20130402T010302Z/ruby/lib/test/unit.rb:21:in
run' from /home/chkbuild/build/20130402T010302Z/ruby/lib/test/unit.rb:774:inrun’
from
/home/chkbuild/build/20130402T010302Z/ruby/lib/test/unit.rb:834:in run' from /home/chkbuild/build/20130402T010302Z/ruby/lib/test/unit.rb:838:inrun’
from ./test/runner.rb:17:in `’
1.42 s = .

Issue #8203 has been updated by nagachika (Tomoyuki C.).

再現しないと書きましたが、実は DRb.here? の誤判定は起きていて _id2ref でたまたま同じ object_id
のオブジェクトがあったのでエラーにならず、また TupleSpace#write
の戻り値を利用していないので問題が起きていないだけみたいでした。
やっぱり DRb.current_server で Thread.current[“DRb”][“server”] に親プロセスの
DRbServer が入ってしまっているようです。

Bug #8203: Rinda: recycled object
https://bugs.ruby-lang.org/issues/8203#change-38481

Author: naruse (Yui NARUSE)
Status: Assigned
Priority: Normal
Assignee: seki (Masatoshi Seki)
Category: lib
Target version:
ruby -v: ruby 2.1.0dev (2013-04-02 trunk 40047) [i686-linux]
(ubuntu1004-32)

test-allで以下のメッセージが出ているんですが、これってなんですか?
http://u32.rubyci.org/~chkbuild/ruby-trunk/log/20130402T010302Z.log.html.gz#test-all

Rinda::TupleSpaceProxyTest#test_take_bug_8215 =
/home/chkbuild/build/20130402T010302Z/ruby/lib/drb/drb.rb:369:in
_id2ref': 0xda91ca76 is recycled object (RangeError) from /home/chkbuild/build/20130402T010302Z/ruby/lib/drb/drb.rb:369:into_obj’
from /home/chkbuild/build/20130402T010302Z/ruby/lib/drb/drb.rb:1446:in
to_obj' from /home/chkbuild/build/20130402T010302Z/ruby/lib/drb/drb.rb:1748:into_obj’
from /home/chkbuild/build/20130402T010302Z/ruby/lib/drb/drb.rb:1025:in
_load' from /home/chkbuild/build/20130402T010302Z/ruby/lib/drb/drb.rb:590:inload’
from /home/chkbuild/build/20130402T010302Z/ruby/lib/drb/drb.rb:590:in
block in load' from /home/chkbuild/build/20130402T010302Z/ruby/lib/drb/drb.rb:586:insynchronize’
from /home/chkbuild/build/20130402T010302Z/ruby/lib/drb/drb.rb:586:in
load' from /home/chkbuild/build/20130402T010302Z/ruby/lib/drb/drb.rb:638:inrecv_reply’
from /home/chkbuild/build/20130402T010302Z/ruby/lib/drb/drb.rb:936:in
recv_reply' from /home/chkbuild/build/20130402T010302Z/ruby/lib/drb/drb.rb:1222:insend_message’
from /home/chkbuild/build/20130402T010302Z/ruby/lib/drb/drb.rb:1110:in
block (2 levels) in method_missing' from /home/chkbuild/build/20130402T010302Z/ruby/lib/drb/drb.rb:1197:inopen’
from /home/chkbuild/build/20130402T010302Z/ruby/lib/drb/drb.rb:1109:in
block in method_missing' from /home/chkbuild/build/20130402T010302Z/ruby/lib/drb/drb.rb:1132:inwith_friend’
from /home/chkbuild/build/20130402T010302Z/ruby/lib/drb/drb.rb:1108:in
method_missing' from /home/chkbuild/build/20130402T010302Z/ruby/lib/rinda/rinda.rb:265:inwrite’
from
/home/chkbuild/build/20130402T010302Z/ruby/test/rinda/test_rinda.rb:506:in
block in test_take_bug_8215' from /home/chkbuild/build/20130402T010302Z/ruby/test/rinda/test_rinda.rb:502:infork’
from
/home/chkbuild/build/20130402T010302Z/ruby/test/rinda/test_rinda.rb:502:in
test_take_bug_8215' from /home/chkbuild/build/20130402T010302Z/ruby/lib/test/unit.rb:858:inrun_test’
from
/home/chkbuild/build/20130402T010302Z/ruby/lib/minitest/unit.rb:1301:in
run' from /home/chkbuild/build/20130402T010302Z/ruby/lib/test/unit/testcase.rb:17:inrun’
from
/home/chkbuild/build/20130402T010302Z/ruby/lib/minitest/unit.rb:919:in
block in _run_suite' from /home/chkbuild/build/20130402T010302Z/ruby/lib/minitest/unit.rb:912:inmap’
from
/home/chkbuild/build/20130402T010302Z/ruby/lib/minitest/unit.rb:912:in
_run_suite' from /home/chkbuild/build/20130402T010302Z/ruby/lib/test/unit.rb:657:inblock in _run_suites’
from
/home/chkbuild/build/20130402T010302Z/ruby/lib/test/unit.rb:655:in
each' from /home/chkbuild/build/20130402T010302Z/ruby/lib/test/unit.rb:655:in_run_suites’
from
/home/chkbuild/build/20130402T010302Z/ruby/lib/minitest/unit.rb:867:in
_run_anything' from /home/chkbuild/build/20130402T010302Z/ruby/lib/minitest/unit.rb:1060:inrun_tests’
from
/home/chkbuild/build/20130402T010302Z/ruby/lib/minitest/unit.rb:1047:in
block in _run' from /home/chkbuild/build/20130402T010302Z/ruby/lib/minitest/unit.rb:1046:ineach’
from
/home/chkbuild/build/20130402T010302Z/ruby/lib/minitest/unit.rb:1046:in
_run' from /home/chkbuild/build/20130402T010302Z/ruby/lib/minitest/unit.rb:1035:inrun’
from /home/chkbuild/build/20130402T010302Z/ruby/lib/test/unit.rb:21:in
run' from /home/chkbuild/build/20130402T010302Z/ruby/lib/test/unit.rb:774:inrun’
from
/home/chkbuild/build/20130402T010302Z/ruby/lib/test/unit.rb:834:in run' from /home/chkbuild/build/20130402T010302Z/ruby/lib/test/unit.rb:838:inrun’
from ./test/runner.rb:17:in `’
1.42 s = .