Project

General

Profile

Actions

Bug #6866

closed

DRb tests hang on OS X

Added by Eregon (Benoit Daloze) over 11 years ago. Updated over 11 years ago.

Status:
Closed
Target version:
ruby -v:
ruby 2.0.0dev (2012-08-14 trunk 36700) [x86_64-darwin10.8.0]
Backport:
[ruby-core:47182]

Description

This seems due to r36456.
The two loops added just keep running. Commenting them seems to solve the problem.
@there.inspect is #<DRb::DRbObject:0x00000101059838 @uri (Uri Gorelik)="druby://me-myself:52746", @ref=nil>

I recently installed TunTap (http://tuntaposx.sourceforge.net/), I'm unsure if it might be related.

Updated by h.shirosaki (Hiroshi Shirosaki) over 11 years ago

This seems related to r36699. It changed #inspect behavior.

DRbObject#to_s is redefined, but #inspect doesn't call #to_s after r36699.
Here is a patch.

diff --git a/test/drb/drbtest.rb b/test/drb/drbtest.rb
index 1cb8b1f..d0156fd 100644
--- a/test/drb/drbtest.rb
+++ b/test/drb/drbtest.rb
@@ -73,7 +73,7 @@ module DRbCore
def teardown
@ext.stop_service if defined?(@ext) && @ext
DRbService.manager.unregist(@service_name)

  • while (@there.inspect rescue nil)
  • while (@there.to_s rescue nil)

    nop

    end
    signal = /mswin|mingw/ =~ RUBY_PLATFORM ? :INT : :TERM
    @@ -294,7 +294,7 @@ module DRbAry
    def teardown
    @ext.stop_service if defined?(@ext) && @ext
    DRbService.manager.unregist(@service_name)
  • while (@there.inspect rescue nil)
  • while (@there.to_s rescue nil)

    nop

    end
    signal = /mswin|mingw/ =~ RUBY_PLATFORM ? :INT : :TERM

Updated by Eregon (Benoit Daloze) over 11 years ago

h.shirosaki (Hiroshi Shirosaki) wrote:

This seems related to r36699. It changed #inspect behavior.

DRbObject#to_s is redefined, but #inspect doesn't call #to_s after r36699.
Here is a patch.

Thank you. Indeed it solves the problem at me.
I saw Yui Naruse reverted r36699. I ran test-all but did not expect the reason for DRb tests failure to be due to my change, because it happened a few times before.
I'm sorry about this.

@naruse (Yui NARUSE): May I commit r36699 (and r37700) again with the right ChangeLog and this fix?

Actions #3

Updated by Eregon (Benoit Daloze) over 11 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r36709.
Benoit, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


Kernel#inspect: improve consistency and do not call #to_s.

  • object.c (rb_obj_inspect): Kernel#inspect: do not call #to_s. A class
    can now benefit from the nice default #inspect even if it defines #to_s.
    Also, there is no more unexpected change in #inspect result.
  • NEWS: Add note about the change.
  • bignum.c, io.c, numeric.c, object.c, proc.c, vm.c (Init_*):
    Adapt internal structures (by aliasing #inspect to #to_s) so they
    don't rely on the removed behavior (#inspect calling overridden #to_s).
  • test/ruby/test_object.rb (test_inspect): add tests for Kernel#inspect.
  • lib/pp.rb (class PP): do not call #to_s anymore, as #inspect
    no more does (mame).
  • test/test_pp.rb (class PPInspectTest): remove related assertion (mame).
    [ruby-core:43238][Feature #6130]
  • test/drb/drbtest.rb (DRbCore#teardown, DRbAry#teardown):
    adapt DRb tests with the new change (shirosaki).
    [ruby-core:47182][Bug #6866]
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0