Project

General

Profile

Backport #2092

Possible deadlocks and/or performance issues with Queue

Added by quix (James M. Lawrence) about 11 years ago. Updated about 1 year ago.

Status:
Closed
Priority:
Normal
[ruby-core:25537]

Description

=begin
% 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
=end


Files

test_queue.patch (1.03 KB) test_queue.patch quix (James M. Lawrence), 09/12/2009 09:49 PM
queue_ruby19.patch (1.43 KB) queue_ruby19.patch quix (James M. Lawrence), 09/12/2009 09:49 PM
queue_ruby18.patch (663 Bytes) queue_ruby18.patch quix (James M. Lawrence), 09/12/2009 09:49 PM

Also available in: Atom PDF