Uploaded image for project: 'Couchbase .NET client library'
  1. Couchbase .NET client library
  2. NCBC-1783

ClusterController.ProcessConfig throws System.ArgumentNullException during testing

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.7.1
    • Component/s: None
    • Labels:
      None

      Description

      The following exception is seen regularly in logs during CI testing:

      2018-09-28 01:54:10,606 [CT] DEBUG Couchbase.Core.ClusterController - System.ArgumentNullException: Value cannot be null.
         at System.Threading.SemaphoreSlim.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
         at System.Collections.Concurrent.BlockingCollection`1.TryTakeWithNoTimeValidation(T& item, Int32 millisecondsTimeout, CancellationToken cancellationToken, CancellationTokenSource combinedTokenSource)
         at System.Collections.Concurrent.BlockingCollection`1.<GetConsumingEnumerable>d__68.MoveNext()
         at Couchbase.Core.ClusterController.ProcessConfig()
      

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

          Hide
          jmorris Jeff Morris added a comment -

          This is an error in Core where the internal semaphore is set to null when Dispose is called on the BlockingCollection. When Dispose is called by the client the client correctly stops accepting configs by calling CompleteAdding on the blocking collection and then calls Dispose after removing any items that may be in enqueued. This is on the dedicated config thread (CT); however, worker threads from operation requests still firing may try to enqueue. Since the object is disposed (and should throw an ODE) it throws a ArgumentNullException because the internal semaphore is already null.

          A quick fix will be to be to capture and ignore this specific exception.

          Show
          jmorris Jeff Morris added a comment - This is an error in Core where the internal semaphore is set to null when Dispose is called on the BlockingCollection. When Dispose is called by the client the client correctly stops accepting configs by calling CompleteAdding on the blocking collection and then calls Dispose after removing any items that may be in enqueued. This is on the dedicated config thread (CT); however, worker threads from operation requests still firing may try to enqueue. Since the object is disposed (and should throw an ODE) it throws a ArgumentNullException because the internal semaphore is already null. A quick fix will be to be to capture and ignore this specific exception.

            People

            • Assignee:
              jmorris Jeff Morris
              Reporter:
              mike.goldsmith Michael Goldsmith
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Gerrit Reviews

                There are no open Gerrit changes

                  PagerDuty

                  Error rendering 'com.pagerduty.jira-server-plugin:PagerDuty'. Please contact your Jira administrators.