Uploaded image for project: 'Ruby Driver'
  1. Ruby Driver
  2. RUBY-550

External timeouts during an operation can leave sockets in bad state

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical - P2
    • Resolution: Won't Fix
    • Affects Version/s: 1.8.2
    • Fix Version/s: 12_01_17
    • Component/s: None
    • Labels:
      None
    • Case:

      Description

      When performing an operation users of the driver are occasionally seeing erros of the following form:

      Mongo::ConnectionFailure: Expected response <number> but got <other>

      When running jruby the issue may present itself as

      NoMethodError: undefined method `new' for main:Object

      Stack trace for jruby error:

      E
      ===============================================================================
      Error: test_count(TestThreading)
        NoMethodError: undefined method `new' for main:Object
      /Users/tbrock/Code/mongo-ruby-driver/lib/bson/bson_java.rb:20:in `deserialize'
      /Users/tbrock/Code/mongo-ruby-driver/lib/mongo/networking.rb:206:in `read_documents'
      /Users/tbrock/Code/mongo-ruby-driver/lib/mongo/networking.rb:152:in `receive'
      /Users/tbrock/Code/mongo-ruby-driver/lib/mongo/networking.rb:117:in `receive_message'
      /Users/tbrock/Code/mongo-ruby-driver/lib/mongo/cursor.rb:512:in `send_get_more'
      /Users/tbrock/Code/mongo-ruby-driver/lib/mongo/cursor.rb:448:in `refresh'
      /Users/tbrock/Code/mongo-ruby-driver/lib/mongo/cursor.rb:109:in `next'
      /Users/tbrock/Code/mongo-ruby-driver/lib/mongo/cursor.rb:271:in `each'
      /Users/tbrock/Code/mongo-ruby-driver/test/threading/basic_test.rb:70:in `test_count'
           67:     10.times do |i|
           68:       threads << Thread.new do
           69:         sum = 0
        => 70:         @coll.find().each do |document|
           71:           sum += document["x"]
           72:         end
           73:         assert_equal 499500, sum
      ===============================================================================

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              tyler@10gen.com Tyler Brock
              Reporter:
              tyler@10gen.com Tyler Brock
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: