Project

General

Profile

Actions

Backport #2092

closed

Possible deadlocks and/or performance issues with Queue

Added by quix (James M. Lawrence) over 14 years ago. Updated almost 5 years ago.

Status:
Closed
[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
Actions #1

Updated by naruse (Yui NARUSE) over 14 years ago

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

=begin

=end

Actions #2

Updated by mame (Yusuke Endoh) about 14 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

Actions #3

Updated by mame (Yusuke Endoh) about 14 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
=end

Actions #4

Updated by shyouhei (Shyouhei Urabe) over 13 years ago

  • Status changed from Open to Assigned

=begin

=end

Actions #5

Updated by jeremyevans0 (Jeremy Evans) almost 5 years ago

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

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0