java.lang.IllegalStateException: Attempted to decrement the reference count below 0

JIRA | Nick Scavelli | 2 years ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    Getting the following stacktrace (operation still succeeds) when calling FindFluent#first {noformat} WARNING: Exception calling callback java.lang.IllegalStateException: Attempted to decrement the reference count below 0 at com.mongodb.binding.AbstractReferenceCounted.release(AbstractReferenceCounted.java:23) at com.mongodb.binding.AsyncClusterBinding$AsyncClusterBindingConnectionSource.release(AsyncClusterBinding.java:111) at com.mongodb.operation.OperationHelper$3$1.onResult(OperationHelper.java:219) at com.mongodb.async.SingleResultFuture.init(SingleResultFuture.java:102) at com.mongodb.operation.FindOperation$2$1.onResult(FindOperation.java:474) at com.mongodb.operation.FindOperation$2$1.onResult(FindOperation.java:468) at com.mongodb.async.SingleResultFuture.init(SingleResultFuture.java:102) at com.mongodb.connection.SingleResultFutureCallback.onResult(SingleResultFutureCallback.java:32) at com.mongodb.connection.QueryResultCallback.callCallback(QueryResultCallback.java:73) at com.mongodb.connection.ResponseCallback.onResult(ResponseCallback.java:49) at com.mongodb.connection.ResponseCallback.onResult(ResponseCallback.java:24) at com.mongodb.connection.UsageTrackingInternalConnection$3.onResult(UsageTrackingInternalConnection.java:131) at com.mongodb.connection.UsageTrackingInternalConnection$3.onResult(UsageTrackingInternalConnection.java:127) at com.mongodb.connection.InternalStreamConnection.processPendingResults(InternalStreamConnection.java:525) at com.mongodb.connection.InternalStreamConnection.processPendingReads(InternalStreamConnection.java:410) at com.mongodb.connection.InternalStreamConnection.access$1200(InternalStreamConnection.java:56) at com.mongodb.connection.InternalStreamConnection$3.onResult(InternalStreamConnection.java:445) at com.mongodb.connection.InternalStreamConnection$3.onResult(InternalStreamConnection.java:435) {noformat}

    JIRA | 2 years ago | Nick Scavelli
    java.lang.IllegalStateException: Attempted to decrement the reference count below 0
  2. 0

    Getting the following stacktrace (operation still succeeds) when calling FindFluent#first {noformat} WARNING: Exception calling callback java.lang.IllegalStateException: Attempted to decrement the reference count below 0 at com.mongodb.binding.AbstractReferenceCounted.release(AbstractReferenceCounted.java:23) at com.mongodb.binding.AsyncClusterBinding$AsyncClusterBindingConnectionSource.release(AsyncClusterBinding.java:111) at com.mongodb.operation.OperationHelper$3$1.onResult(OperationHelper.java:219) at com.mongodb.async.SingleResultFuture.init(SingleResultFuture.java:102) at com.mongodb.operation.FindOperation$2$1.onResult(FindOperation.java:474) at com.mongodb.operation.FindOperation$2$1.onResult(FindOperation.java:468) at com.mongodb.async.SingleResultFuture.init(SingleResultFuture.java:102) at com.mongodb.connection.SingleResultFutureCallback.onResult(SingleResultFutureCallback.java:32) at com.mongodb.connection.QueryResultCallback.callCallback(QueryResultCallback.java:73) at com.mongodb.connection.ResponseCallback.onResult(ResponseCallback.java:49) at com.mongodb.connection.ResponseCallback.onResult(ResponseCallback.java:24) at com.mongodb.connection.UsageTrackingInternalConnection$3.onResult(UsageTrackingInternalConnection.java:131) at com.mongodb.connection.UsageTrackingInternalConnection$3.onResult(UsageTrackingInternalConnection.java:127) at com.mongodb.connection.InternalStreamConnection.processPendingResults(InternalStreamConnection.java:525) at com.mongodb.connection.InternalStreamConnection.processPendingReads(InternalStreamConnection.java:410) at com.mongodb.connection.InternalStreamConnection.access$1200(InternalStreamConnection.java:56) at com.mongodb.connection.InternalStreamConnection$3.onResult(InternalStreamConnection.java:445) at com.mongodb.connection.InternalStreamConnection$3.onResult(InternalStreamConnection.java:435) {noformat}

    JIRA | 2 years ago | Nick Scavelli
    java.lang.IllegalStateException: Attempted to decrement the reference count below 0

    Root Cause Analysis

    1. java.lang.IllegalStateException

      Attempted to decrement the reference count below 0

      at com.mongodb.binding.AbstractReferenceCounted.release()
    2. MongoDB Java Driver
      InternalStreamConnection$3.onResult
      1. com.mongodb.binding.AbstractReferenceCounted.release(AbstractReferenceCounted.java:23)
      2. com.mongodb.binding.AsyncClusterBinding$AsyncClusterBindingConnectionSource.release(AsyncClusterBinding.java:111)
      3. com.mongodb.operation.OperationHelper$3$1.onResult(OperationHelper.java:219)
      4. com.mongodb.async.SingleResultFuture.init(SingleResultFuture.java:102)
      5. com.mongodb.operation.FindOperation$2$1.onResult(FindOperation.java:474)
      6. com.mongodb.operation.FindOperation$2$1.onResult(FindOperation.java:468)
      7. com.mongodb.async.SingleResultFuture.init(SingleResultFuture.java:102)
      8. com.mongodb.connection.SingleResultFutureCallback.onResult(SingleResultFutureCallback.java:32)
      9. com.mongodb.connection.QueryResultCallback.callCallback(QueryResultCallback.java:73)
      10. com.mongodb.connection.ResponseCallback.onResult(ResponseCallback.java:49)
      11. com.mongodb.connection.ResponseCallback.onResult(ResponseCallback.java:24)
      12. com.mongodb.connection.UsageTrackingInternalConnection$3.onResult(UsageTrackingInternalConnection.java:131)
      13. com.mongodb.connection.UsageTrackingInternalConnection$3.onResult(UsageTrackingInternalConnection.java:127)
      14. com.mongodb.connection.InternalStreamConnection.processPendingResults(InternalStreamConnection.java:525)
      15. com.mongodb.connection.InternalStreamConnection.processPendingReads(InternalStreamConnection.java:410)
      16. com.mongodb.connection.InternalStreamConnection.access$1200(InternalStreamConnection.java:56)
      17. com.mongodb.connection.InternalStreamConnection$3.onResult(InternalStreamConnection.java:445)
      18. com.mongodb.connection.InternalStreamConnection$3.onResult(InternalStreamConnection.java:435)
      18 frames