Uploaded image for project: 'Couchbase Java Client'
  1. Couchbase Java Client
  2. JCBC-1803

Couchbase Cluster Disconnect Thread Gets Stuck Waiting for Monitor

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • Major
    • None
    • 3.1.2
    • Core
    • None
    • 1
    • High

    Description

       When I try to disconnect to my Couchbase cluster using {{cluster.disconnect(Duration.ofSeconds(60)), }}the thread get stuck and never moves ahead, even after specified wait period times-out. I took a thread dump and found this:
       
      {{{{"Thread-163" #197 prio=5 os_prio=31 cpu=12.51ms elapsed=84.72s tid=0x00007fa4065e2400 nid=0xce03 waiting on condition [0x000070000eada000]
      java.lang.Thread.State: WAITING (parking)
      at jdk.internal.misc.Unsafe.park(java.base@15.0.2/Native Method)

      • parking to wait for <0x0000000702a769b0> (a java.util.concurrent.CompletableFuture$Signaller)
        at java.util.concurrent.locks.LockSupport.park(java.base@15.0.2/LockSupport.java:211)
        at java.util.concurrent.CompletableFuture$Signaller.block(java.base@15.0.2/CompletableFuture.java:1860)
        at java.util.concurrent.ForkJoinPool.managedBlock(java.base@15.0.2/ForkJoinPool.java:3137)
        at java.util.concurrent.CompletableFuture.waitingGet(java.base@15.0.2/CompletableFuture.java:1887)
        at java.util.concurrent.CompletableFuture.get(java.base@15.0.2/CompletableFuture.java:2062)
        at com.couchbase.client.java.AsyncUtils.block(AsyncUtils.java:38)
        at com.couchbase.client.java.Cluster.disconnect(Cluster.java:478)
        at xxx.xxxx.xxxx.xxxx.xxxx.event.eventlistener.MyApplicationSQSListener.lambda$poll$0(FeedScribeSQSListener.java:70)
        at xxx.xxxx.xxxx.xxxx.xxxx.event.eventlistener.Application.$$Lambda$1018/0x00000008013f2c38.run(Unknown Source)
        at java.lang.Thread.run(java.base@15.0.2/Thread.java:832)}}}}
         
        My shutdown hook thread gets stuck waiting for a lock.
         
        I had earlier post a question on SO but it went unanswered so I decided to raise the issue here: https://stackoverflow.com/questions/67146741/couchbase-cluster-disconnect-thread-stuck-waiting-for-monitor

      Attachments

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

        Activity

          People

            daschl Michael Nitschinger
            pandepra Prashant Pandey
            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