1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Add GC guard

Try to fix infrequent error:

https://rubyci.org/logs/rubyci.s3.amazonaws.com/solaris10-sunc/ruby-master/log/20200108T010004Z.fail.html.gz
```
  1) Error:
DRbTests::TestDRbSSLCore#test_02_basic_object:
RangeError: "348" is recycled object
    (drbssl://localhost:58371) /export/home/users/chkbuild/cb-sunc/tmp/build/20200108T010004Z/ruby/lib/drb/drb.rb:366:in `_id2ref'
    (drbssl://localhost:58371) /export/home/users/chkbuild/cb-sunc/tmp/build/20200108T010004Z/ruby/lib/drb/drb.rb:366:in `to_obj'
    (drbssl://localhost:58371) /export/home/users/chkbuild/cb-sunc/tmp/build/20200108T010004Z/ruby/lib/drb/drb.rb:1537:in `to_obj'
    (drbssl://localhost:58371) /export/home/users/chkbuild/cb-sunc/tmp/build/20200108T010004Z/ruby/lib/drb/drb.rb:1856:in `to_obj'
    (drbssl://localhost:58371) /export/home/users/chkbuild/cb-sunc/tmp/build/20200108T010004Z/ruby/lib/drb/drb.rb:620:in `recv_request'
    (drbssl://localhost:58371) /export/home/users/chkbuild/cb-sunc/tmp/build/20200108T010004Z/ruby/lib/drb/drb.rb:931:in `recv_request'
    (drbssl://localhost:58371) /export/home/users/chkbuild/cb-sunc/tmp/build/20200108T010004Z/ruby/lib/drb/drb.rb:1665:in `init_with_client'
    (drbssl://localhost:58371) /export/home/users/chkbuild/cb-sunc/tmp/build/20200108T010004Z/ruby/lib/drb/drb.rb:1677:in `setup_message'
    (drbssl://localhost:58371) /export/home/users/chkbuild/cb-sunc/tmp/build/20200108T010004Z/ruby/lib/drb/drb.rb:1641:in `perform'
    (drbssl://localhost:58371) /export/home/users/chkbuild/cb-sunc/tmp/build/20200108T010004Z/ruby/lib/drb/drb.rb:1734:in `block (2 levels) in main_loop'
    (drbssl://localhost:58371) /export/home/users/chkbuild/cb-sunc/tmp/build/20200108T010004Z/ruby/lib/drb/drb.rb:1730:in `loop'
    (drbssl://localhost:58371) /export/home/users/chkbuild/cb-sunc/tmp/build/20200108T010004Z/ruby/lib/drb/drb.rb:1730:in `block in main_loop'
    /export/home/users/chkbuild/cb-sunc/tmp/build/20200108T010004Z/ruby/test/drb/drbtest.rb:163:in `test_02_basic_object'
```
This commit is contained in:
Kazuhiro NISHIYAMA 2020-01-08 12:26:48 +09:00
parent f132825ffa
commit beb59c3b45
No known key found for this signature in database
GPG key ID: 262ED8DBB4222F7A

View file

@ -69,7 +69,7 @@ class DRbEx
private def priv; 3; end private def priv; 3; end
end end
def basic_object def basic_object
BO.new @basic_object = BO.new
end end
def unknown_class def unknown_class