Project

General

Profile

Actions

Bug #372

closed

Rinda has a race condition

Added by Anonymous over 16 years ago. Updated about 13 years ago.

Status:
Closed
Target version:
ruby -v:
-
Backport:
[ruby-dev:35659]

Description

=begin
咳といいます。

1.8系のtuplespace.rbを修正した覚えがあるのですが、
1.8系でもやっぱりだめでしょうか?

どちらにせよ、1.8のtuplespace.rbを1.9へ
ciしようと思いますので、
よかったらあとでもう一度ためしてもらえますか?
#いまビルド中なのでしばらく待ってください

On 2008/07/24, at 22:22, Yusuke ENDOH wrote:

調べていて気づいたのですが、以下のように Rinda に遅延
を発生させると

Index: lib/rinda/tuplespace.rb

--- lib/rinda/tuplespace.rb (revision 18194)
+++ lib/rinda/tuplespace.rb (working copy)
@@ -570,6 +570,7 @@
keep_clean
sleep(@period)
end

  •    sleep 3
    end
    
    end

以下で deadlock detected になります。1.8 でも同
様です。

似たようなところで遅延させたんですが、こんな感じです。

Index: lib/rinda/tuplespace.rb

--- lib/rinda/tuplespace.rb (revision 18222)
+++ lib/rinda/tuplespace.rb (working copy)
@@ -622,6 +622,7 @@
break unless need_keeper?
keep_clean
end
+sleep(3)
end
end
end

$ ./ruby -rrinda/tuplespace -e '
ts = Rinda::TupleSpace.new(1)
ts.take([:foo, :bar], 1) rescue nil
sleep 2
ts.take([:foo, :bar], 1)
'
/usr/local/lib/ruby/1.8/rinda/tuplespace.rb:503:in move': Rinda::RequestExpiredError (Rinda::RequestExpiredError) from /usr/local/lib/ruby/1.8/monitor.rb:242:in synchronize'
from /usr/local/lib/ruby/1.8/rinda/tuplespace.rb:488:in move' from /usr/local/lib/ruby/1.8/rinda/tuplespace.rb:479:in take'
from -e:5
=end


Related issues 3 (0 open3 closed)

Related to Ruby master - Bug #377: Rinda has a race conditionRejectedActions
Related to Ruby master - Bug #4160: test_core_03_notify(Rinda::TupleSpaceProxyTest) が失敗するClosedseki (Masatoshi Seki)12/15/2010Actions
Is duplicate of Ruby master - Bug #376: Rinda has a race conditionRejectedmame (Yusuke Endoh)Actions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0