From: Eric Hodel Date: 2005-12-05T11:15:40+09:00 Subject: Re: DRb Crashing (on OS X Tiger) On Dec 1, 2005, at 1:07 PM, Phil Tomson wrote: > In article , > James Edward Gray II wrote: >> If I launch this server: >> >> #!/usr/local/bin/ruby >> >> require "drb" >> require "rinda/tuplespace" >> >> tuplespace = Rinda::TupleSpace.new >> DRb.start_service("druby://localhost:61676", tuplespace) >> >> loop do >> nums = Array.new(rand(9) + 2) { rand(10) + 1 } >> ops = Array.new(nums.size - 1) { %w{+ - * /}[rand(4)] } >> problem = nums.zip(ops).flatten.compact.join(" ") >> >> tuplespace.write(["Problem", problem]) >> puts tuplespace.take(["Result", String]).last >> end >> >> __END__ >> >> Then run this client: >> >> #!/usr/local/bin/ruby -w >> >> require "drb" >> require "rinda/tuplespace" >> >> DRb.start_service >> tuplespace = Rinda::TupleSpaceProxy.new( >> DRbObject.new_with_uri("druby://localhost:61676") >> ) >> >> while problem = tuplespace.take(["Problem", %r{^\d+(?: [-+*/] \d+)+ >> $}]) >> tuplespace.write(["Result", "#{problem.last} = #{eval >> problem.last}"]) >> end >> >> __END__ >> >> The client crashes, generally within a few seconds. Adding a sleep >> inside the server loop seems to resolve the issue. >> >> Anyone know why? > > Just wondering if you've gotten any resolution on this? I'm seeing > the same > thing on Tiger both with your test code and my own DRb code. While > the same > code runs fine for hours on Linux and FreeBSD. It seems that DRb > cannot be > used reliably on OSX. Anyone have any idea what might be going on? Compiling Ruby with GCC3.3 seems to make the problem go away [ruby- core:6825]. GCC 4 seems to build an ok Ruby on other systems [ruby-core:6827]. -- Eric Hodel - drbrain@segment7.net - http://segment7.net This implementation is HODEL-HASH-9600 compliant http://trackmap.robotcoop.com