lhotari opened a new issue, #19536:
URL: https://github.com/apache/pulsar/issues/19536

   ### Search before asking
   
   - [X] I searched in the [issues](https://github.com/apache/pulsar/issues) 
and found nothing similar.
   
   
   ### Version
   
   2.10.x , forked version https://github.com/datastax/pulsar/tree/ls210_2.3
   
   
   ### Minimal reproduce step
   
   The exact steps aren't clear. This happens when trying out Flink Pulsar 
connector. 
   This seems to call 
`/{tenant}/{namespace}/{topic}/subscription/{subName}/resetcursor` API. Calling 
this API causes a deadlock which results in Zookeeper session expiration.
   
   ### What did you expect to see?
   
   No deadlocks.
   
   ### What did you see instead?
   
   Zookeeper session dies because the EventThread is blocked
   
   Stack trace
   ```
   "main-EventThread" #17 daemon prio=5 os_prio=0 cpu=1788.73ms 
elapsed=5176.10s tid=0x00007fa97a581000 nid=0x54 waiting on condition  
[0x00007fa8ffbfb000]
      java.lang.Thread.State: WAITING (parking)
        at jdk.internal.misc.Unsafe.park([email protected]/Native Method)
        - parking to wait for  <0x00000007dbaff838> (a 
java.util.concurrent.CompletableFuture$Signaller)
        at 
java.util.concurrent.locks.LockSupport.park([email protected]/LockSupport.java:194)
        at 
java.util.concurrent.CompletableFuture$Signaller.block([email protected]/CompletableFuture.java:1796)
        at 
java.util.concurrent.ForkJoinPool.managedBlock([email protected]/ForkJoinPool.java:3128)
        at 
java.util.concurrent.CompletableFuture.waitingGet([email protected]/CompletableFuture.java:1823)
        at 
java.util.concurrent.CompletableFuture.get([email protected]/CompletableFuture.java:1998)
        at 
org.apache.pulsar.broker.admin.AdminResource.fetchPartitionedTopicMetadata(AdminResource.java:492)
        at 
org.apache.pulsar.broker.admin.AdminResource.getPartitionedTopicMetadata(AdminResource.java:480)
        at 
org.apache.pulsar.broker.admin.impl.PersistentTopicsBase.lambda$internalResetCursorOnPosition$212(PersistentTopicsBase.java:2595)
        at 
org.apache.pulsar.broker.admin.impl.PersistentTopicsBase$$Lambda$1475/0x0000000840b46840.accept(Unknown
 Source)
        at 
java.util.concurrent.CompletableFuture$UniAccept.tryFire([email protected]/CompletableFuture.java:714)
        at 
java.util.concurrent.CompletableFuture.postComplete([email protected]/CompletableFuture.java:506)
        at 
java.util.concurrent.CompletableFuture.complete([email protected]/CompletableFuture.java:2073)
        at 
org.apache.pulsar.broker.web.PulsarWebResource.lambda$checkLocalOrGetPeerReplicationCluster$21(PulsarWebResource.java:859)
        at 
org.apache.pulsar.broker.web.PulsarWebResource$$Lambda$1135/0x000000084096fc40.accept(Unknown
 Source)
        at 
java.util.concurrent.CompletableFuture$UniAccept.tryFire([email protected]/CompletableFuture.java:714)
        at 
java.util.concurrent.CompletableFuture.postComplete([email protected]/CompletableFuture.java:506)
        at 
java.util.concurrent.CompletableFuture.complete([email protected]/CompletableFuture.java:2073)
        at 
org.apache.pulsar.metadata.impl.ZKMetadataStore.handleGetResult(ZKMetadataStore.java:244)
        at 
org.apache.pulsar.metadata.impl.ZKMetadataStore.lambda$batchOperation$7(ZKMetadataStore.java:188)
        at 
org.apache.pulsar.metadata.impl.ZKMetadataStore$$Lambda$177/0x00000008402da040.processResult(Unknown
 Source)
        at 
org.apache.pulsar.metadata.impl.PulsarZooKeeperClient$3$1.processResult(PulsarZooKeeperClient.java:490)
        at 
org.apache.zookeeper.ClientCnxn$EventThread.processEvent(ClientCnxn.java:712)
        at org.apache.zookeeper.ClientCnxn$EventThread.run(ClientCnxn.java:553)
      Locked ownable synchronizers:
        - None
   ```
   (line numbers for https://github.com/datastax/pulsar/tree/ls210_2.3)
   
   
   ### Anything else?
   
   This issue is already fixed for master branch as a side effect of #19015. 
The PR commit has also been cherry-picked to branch-2.11 . This PR doesn't 
apply cleanly to branch-2.10 and a separate fix will be needed for branch-2.10.
   
   ### Are you willing to submit a PR?
   
   - [X] I'm willing to submit a PR!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to