Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-2408

java-mongodb-driver test case failure

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • None

    Description

      I try to run testcases for java-mongodb-driver, before making any changes to the source code.
      7 testcases are failed as shown below.

      $ ./gradlew check -Dorg.mongodb.test.uri=mongodb://<ip>:27017/

      :driver-core:test
      i) One test with error "ns not found" as follow:
      should deliver started and completed command events for split unacknowleded inserts

      com.mongodb.MongoCommandException: Command failed with error -1: 'ns not found' on server <ip>:27017. The full response is

      { "ok" : 0.0, "errmsg" : "ns not found" }

      at com.mongodb.connection.ProtocolHelper.getCommandFailureException(ProtocolHelper.java:115)
      at com.mongodb.connection.CommandProtocol.execute(CommandProtocol.java:114)
      at com.mongodb.connection.WriteProtocolCommandEventSpecification.should deliver started and completed command events for split unacknowleded inserts(WriteProtocolCommandEventSpecification.groovy:145)

      com.mongodb.MongoCommandException: Command failed with error -1: 'ns not found' on server <ip>:27017. The full response is

      { "ok" : 0.0, "errmsg" : "ns not found" }

      at com.mongodb.connection.ProtocolHelper.getCommandFailureException(ProtocolHelper.java:115)
      at com.mongodb.connection.CommandProtocol.execute(CommandProtocol.java:114)
      at com.mongodb.connection.WriteProtocolCommandEventSpecification.should deliver started and completed command events for split unacknowleded inserts(WriteProtocolCommandEventSpecification.groovy:145)

      ii) Following 6 testcases failed with error as shown
      should continue writing on write error when an unordered unacknowledged inserts must be split
      should execute split acknowledged inserts
      should execute split unacknowledged inserts
      should not report write errors on split unacknowledged inserts
      should report write errors on split acknowledged inserts
      should stop writing on write error when an ordered unacknowledged inserts must be split

      io.netty.util.internal.OutOfDirectMemoryError: failed to allocate 16777216 byte(s) of direct memory (used: 50367344, max: 67108864)
      at io.netty.util.internal.PlatformDependent.incrementMemoryCounter(PlatformDependent.java:624)
      at io.netty.util.internal.PlatformDependent.allocateDirectNoCleaner(PlatformDependent.java:578)
      at io.netty.buffer.UnpooledUnsafeNoCleanerDirectByteBuf.allocateDirect(UnpooledUnsafeNoCleanerDirectByteBuf.java:30)
      at io.netty.buffer.UnpooledUnsafeDirectByteBuf.<init>(UnpooledUnsafeDirectByteBuf.java:68)
      at io.netty.buffer.UnpooledUnsafeNoCleanerDirectByteBuf.<init>(UnpooledUnsafeNoCleanerDirectByteBuf.java:25)
      at io.netty.buffer.UnsafeByteBufUtil.newUnsafeDirectByteBuf(UnsafeByteBufUtil.java:625)
      at io.netty.buffer.PooledByteBufAllocator.newDirectBuffer(PooledByteBufAllocator.java:265)
      at io.netty.buffer.AbstractByteBufAllocator.directBuffer(AbstractByteBufAllocator.java:179)
      at io.netty.buffer.AbstractByteBufAllocator.buffer(AbstractByteBufAllocator.java:115)
      at com.mongodb.connection.netty.NettyStream.getBuffer(NettyStream.java:93)
      at com.mongodb.connection.InternalStreamConnection.getBuffer(InternalStreamConnection.java:514)
      at com.mongodb.connection.ByteBufferBsonOutput.getByteBufferAtIndex(ByteBufferBsonOutput.java:91)
      at com.mongodb.connection.ByteBufferBsonOutput.getCurrentByteBuffer(ByteBufferBsonOutput.java:86)
      at com.mongodb.connection.ByteBufferBsonOutput.writeBytes(ByteBufferBsonOutput.java:62)
      at org.bson.io.OutputBuffer.writeBytes(OutputBuffer.java:51)
      at org.bson.BsonBinaryWriter.doWriteBinaryData(BsonBinaryWriter.java:163)
      at org.bson.AbstractBsonWriter.writeBinaryData(AbstractBsonWriter.java:360)
      at org.bson.codecs.BsonBinaryCodec.encode(BsonBinaryCodec.java:31)
      at org.bson.codecs.BsonBinaryCodec.encode(BsonBinaryCodec.java:28)
      at org.bson.codecs.EncoderContext.encodeWithChildContext(EncoderContext.java:91)
      at org.bson.codecs.BsonDocumentCodec.writeValue(BsonDocumentCodec.java:136)
      at org.bson.codecs.BsonDocumentCodec.encode(BsonDocumentCodec.java:115)
      at org.bson.codecs.BsonDocumentCodec.encode(BsonDocumentCodec.java:41)
      at com.mongodb.connection.RequestMessage.addDocument(RequestMessage.java:253)
      at com.mongodb.connection.RequestMessage.addCollectibleDocument(RequestMessage.java:219)
      at com.mongodb.connection.InsertMessage.encodeMessageBodyWithMetadata(InsertMessage.java:73)
      at com.mongodb.connection.RequestMessage.encodeWithMetadata(RequestMessage.java:160)
      at com.mongodb.connection.WriteProtocol.execute(WriteProtocol.java:89)
      at com.mongodb.connection.InsertProtocol.execute(InsertProtocol.java:68)
      at com.mongodb.connection.InsertProtocol.execute(InsertProtocol.java:39)
      at com.mongodb.connection.ProtocolTestHelper.execute(ProtocolTestHelper.java:31)
      at com.mongodb.connection.WriteProtocolSpecification.should continue writing on write error when an unordered unacknowledged inserts must be split(WriteProtocolSpecification.groovy:201)

      java.lang.ClassCastException: io.netty.util.internal.OutOfDirectMemoryError incompatible with java.lang.RuntimeException
      at com.mongodb.async.FutureResultCallback.get(FutureResultCallback.java:77)
      at com.mongodb.connection.ProtocolTestHelper.execute(ProtocolTestHelper.java:29)
      at com.mongodb.connection.WriteProtocolSpecification.should continue writing on write error when an unordered unacknowledged inserts must be split(WriteProtocolSpecification.groovy:201)

      Initially I used to get test search not found error, solved after mongodb server started with text search enabled.

      Regards,

      Hadi

      Attachments

        1. log_mongodbServer.txt
          797 kB
        2. log_run1.txt
          1.51 MB
        3. log_run2.txt
          783 kB
        4. log_withLeakDetect.txt
          1.48 MB

        Activity

          People

            ross@mongodb.com Ross Lawley
            ravi_ss ravi_ss
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: