Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-3884

Driver calls SemaphoreSlim.WaitAsync with negative timeout values

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 2.13.2
    • Affects Version/s: None
    • Component/s: None
    • None

      Stacktrace here:

      ---> System.ArgumentOutOfRangeException: The timeout must represent a value between -1 and Int32.MaxValue, inclusive. (Parameter 'timeout')
      Actual value was -00:00:00.6017036.
      at System.Threading.SemaphoreSlim.WaitAsync(TimeSpan timeout, CancellationToken cancellationToken)
      at MongoDB.Driver.Core.Misc.SemaphoreSlimSignalable.WaitSignaledAsync(TimeSpan timeout, CancellationToken cancellationToken)
      at MongoDB.Driver.Core.ConnectionPools.ExclusiveConnectionPool.ConnectionCreator.CreateOpenedOrReuseAsync(CancellationToken cancellationToken)
      at MongoDB.Driver.Core.ConnectionPools.ExclusiveConnectionPool.AcquireConnectionHelper.EnteredPoolAsync(Boolean enteredPool, CancellationToken cancellationToken)
      at MongoDB.Driver.Core.ConnectionPools.ExclusiveConnectionPool.AcquireConnectionAsync(CancellationToken cancellationToken)
      at MongoDB.Driver.Core.Servers.Server.GetChannelAsync(CancellationToken cancellationToken)
      at MongoDB.Driver.Core.Operations.RetryableWriteContext.InitializeAsync(CancellationToken cancellationToken)
      at MongoDB.Driver.Core.Operations.RetryableWriteContext.CreateAsync(IWriteBinding binding, Boolean retryRequested, CancellationToken cancellationToken)
      at MongoDB.Driver.Core.Operations.RetryableWriteOperationExecutor.ExecuteAsync[TResult](IRetryableWriteOperation`1 operation, IWriteBinding binding, Boolean retryRequested, CancellationToken cancellationToken)
      at MongoDB.Driver.OperationExecutor.ExecuteWriteOperationAsync[TResult](IWriteBinding binding, IWriteOperation`1 operation, CancellationToken cancellationToken)
      at MongoDB.Driver.MongoCollectionImpl`1.ExecuteWriteOperationAsync[TResult](IClientSessionHandle session, IWriteOperation`1 operation, CancellationToken cancellationToken)

            Assignee:
            boris.dogadov@mongodb.com Boris Dogadov
            Reporter:
            jerome.meyers@magnopus.com Jerome Meyers
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: