Project

General

Profile

Backport #2092

Possible deadlocks and/or performance issues with Queue

Added by quix (James M. Lawrence) almost 10 years ago. Updated 7 days 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

History

#1

Updated by naruse (Yui NARUSE) over 9 years ago

  • Category set to core
  • Status changed from Open to Assigned
  • Assignee set to ko1 (Koichi Sasada)

=begin

=end

#2

Updated by mame (Yusuke Endoh) over 9 years ago

  • Status changed from Assigned to Closed
  • % Done changed from 0 to 100

=begin
This issue was solved with changeset r27356.
James, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.

=end

#3

Updated by mame (Yusuke Endoh) over 9 years ago

  • Status changed from Closed to Open

=begin
Hi,

I think that this is certainly a race condition bug and that
the patch fixes this problem correctly.

I have already imported the patch into trunk. I move the
ticket to 1.8 subproject.

Thank you!

--
Yusuke Endoh mame@tsg.ne.jp
=end

#4

Updated by shyouhei (Shyouhei Urabe) almost 9 years ago

  • Status changed from Open to Assigned

=begin

=end

#5

Updated by jeremyevans0 (Jeremy Evans) 7 days ago

  • ruby -v deleted (ruby 1.9.2dev (2009-09-11 trunk 24854) [-darwin9.6.0])
  • Status changed from Assigned to Closed
  • Description updated (diff)
  • Project changed from Ruby 1.8 to Backport187
  • Tracker changed from Bug to Backport

Also available in: Atom PDF