Bug #2092: Possible deadlocks and/or performance issues with Queue
http://redmine.ruby-lang.org/issues/show/2092

Author: James M. Lawrence
Status: Open, Priority: Normal
ruby -v: ruby 1.9.2dev (2009-09-11 trunk 24854) [-darwin9.6.0]

% patch -p0 < test_queue.patch 
patching file test/ruby/test_queue.rb

% ./ruby -v -I./lib test/ruby/test_queue.rb 
ruby 1.9.2dev (2009-09-11 trunk 24854) [-darwin9.6.0]
Loaded suite test/ruby/test_queue
Started
E.
Finished in 15.167120 seconds.

  1) Error:
test_queue(TestQueue):
fatal: deadlock detected
    test/ruby/test_queue.rb:25:in `join'
    test/ruby/test_queue.rb:25:in `grind'
    test/ruby/test_queue.rb:6:in `test_queue'

2 tests, 2 assertions, 0 failures, 1 errors, 0 skips

% ./ruby -v -I./lib test/ruby/test_queue.rb
ruby 1.9.2dev (2009-09-11 trunk 24854) [-darwin9.6.0]
Loaded suite test/ruby/test_queue
Started
.E
Finished in 8.000856 seconds.

  1) Error:
test_sized_queue(TestQueue):
fatal: deadlock detected
    test/ruby/test_queue.rb:25:in `join'
    test/ruby/test_queue.rb:25:in `grind'
    test/ruby/test_queue.rb:10:in `test_sized_queue'

2 tests, 2 assertions, 0 failures, 1 errors, 0 skips

% ./ruby -v -I./lib test/ruby/test_queue.rb
ruby 1.9.2dev (2009-09-11 trunk 24854) [-darwin9.6.0]
Loaded suite test/ruby/test_queue
Started
..
Finished in 13.836362 seconds.

2 tests, 4 assertions, 0 failures, 0 errors, 0 skips

% patch -p0 < queue_ruby19.patch 
patching file lib/thread.rb

% ./ruby -v -I./lib test/ruby/test_queue.rb
ruby 1.9.2dev (2009-09-11 trunk 24854) [-darwin9.6.0]
Loaded suite test/ruby/test_queue
Started
..
Finished in 2.219603 seconds.

2 tests, 4 assertions, 0 failures, 0 errors, 0 skips

% ./ruby -v -I./lib test/ruby/test_queue.rb
ruby 1.9.2dev (2009-09-11 trunk 24854) [-darwin9.6.0]
Loaded suite test/ruby/test_queue
Started
..
Finished in 2.199855 seconds.

2 tests, 4 assertions, 0 failures, 0 errors, 0 skips

==1.8========================================================
% patch -p0 < test_queue.patch 
patching file test/ruby/test_queue.rb

% ./ruby -v -I./lib test/ruby/test_queue.rb
ruby 1.8.8dev (2009-09-10 revision 24829) [i386-darwin9.6.0]
Loaded suite test/ruby/test_queue
Started
..
Finished in 5.769853 seconds.

2 tests, 4 assertions, 0 failures, 0 errors

% patch -p0 < queue_ruby18.patch 
patching file lib/thread.rb

% ./ruby -v -I./lib test/ruby/test_queue.rb
ruby 1.8.8dev (2009-09-10 revision 24829) [i386-darwin9.6.0]
Loaded suite test/ruby/test_queue
Started
..
Finished in 3.08989 seconds.

2 tests, 4 assertions, 0 failures, 0 errors


----------------------------------------
http://redmine.ruby-lang.org