Project

General

Profile

Actions

Bug #376

closed

Rinda has a race condition

Added by mame (Yusuke Endoh) over 16 years ago. Updated over 13 years ago.

Status:
Rejected
Target version:
-
ruby -v:
Backport:
[ruby-dev:35646]

Description

=begin
遠藤です。

現在 make test-all で Rinda のテストは無効化されています。

  1. Failure:
    test_message(Rinda::TupleSpaceTest)
    [/home/mame/work/ruby19/ruby/test/rinda/test_rinda.rb:497]:
    YARV doesn't support Rinda.

「有効化すると Rinda のテストで固まるから」とささださんに聞きました。
この問題は YARV がマージされた時から、ずっと放置されています。

調べていて気づいたのですが、以下のように 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 でも同様です。

$ ./ruby -rrinda/tuplespace -e '
ts = Rinda::TupleSpace.new(1)
ts.take([:foo, :bar], 1) rescue nil
sleep 2
ts.take([:foo, :bar], 1)
'
/home/mame/work/ruby19/local/lib/ruby/1.9.0/thread.rb:68:in sleep': deadlock detected (fatal) from /home/mame/work/ruby19/local/lib/ruby/1.9.0/thread.rb:68:in wait'
from /home/mame/work/ruby19/local/lib/ruby/1.9.0/monitor.rb:97:in wait' from /home/mame/work/ruby19/local/lib/ruby/1.9.0/rinda/tuplespace.rb:198:in wait'
from /home/mame/work/ruby19/local/lib/ruby/1.9.0/rinda/tuplespace.rb:465:in
block in move' from /home/mame/work/ruby19/local/lib/ruby/1.9.0/monitor.rb:190:in mon_synchronize'
from /home/mame/work/ruby19/local/lib/ruby/1.9.0/rinda/tuplespace.rb:443:in
move' from /home/mame/work/ruby19/local/lib/ruby/1.9.0/rinda/tuplespace.rb:433:in take'
from -e:5:in `'

--
Yusuke ENDOH
=end


Related issues 1 (0 open1 closed)

Has duplicate Ruby master - Bug #372: Rinda has a race conditionClosedseki (Masatoshi Seki)Actions
Actions #1

Updated by ko1 (Koichi Sasada) over 16 years ago

  • Status changed from Open to Rejected

=begin

=end

Actions #2

Updated by ko1 (Koichi Sasada) over 16 years ago

  • Assignee set to mame (Yusuke Endoh)

=begin

=end

Actions

Also available in: Atom PDF

Like0
Like0Like0