From: ptkwt@... (Phil Tomson) Date: 2005-12-02T06:07:31+09:00 Subject: Re: DRb Crashing (on OS X Tiger) 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? > >James Edward Gray II > > > 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? Phil