You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/06/30 19:48:40 UTC

[GitHub] [pulsar] merlimat opened a new pull request, #16310: Fixed deadlock when checking topic ownership

merlimat opened a new pull request, #16310:
URL: https://github.com/apache/pulsar/pull/16310

   ### Motivation
   
   During the async create topic we were still calling the blocking `isServiceUnitActive()` which can cause a deadlock:
   
   ```
   "main-EventThread" #19 daemon prio=5 os_prio=0 cpu=15617.40ms elapsed=277.07s tid=0x00007f2eb267e000 nid=0x56e5 waiting on condition  [0x00007f2e5d0a7000]
      java.lang.Thread.State: WAITING (parking)
   	at jdk.internal.misc.Unsafe.park(java.base@11.0.15/Native Method)
   	- parking to wait for  <0x00000007ecf28a48> (a java.util.concurrent.CompletableFuture$Signaller)
   	at java.util.concurrent.locks.LockSupport.park(java.base@11.0.15/LockSupport.java:194)
   	at java.util.concurrent.CompletableFuture$Signaller.block(java.base@11.0.15/CompletableFuture.java:1796)
   	at java.util.concurrent.ForkJoinPool.managedBlock(java.base@11.0.15/ForkJoinPool.java:3128)
   	at java.util.concurrent.CompletableFuture.waitingGet(java.base@11.0.15/CompletableFuture.java:1823)
   	at java.util.concurrent.CompletableFuture.get(java.base@11.0.15/CompletableFuture.java:1998)
   	at com.github.benmanes.caffeine.cache.LocalAsyncCache$AbstractCacheView.resolve(LocalAsyncCache.java:515)
   	at com.github.benmanes.caffeine.cache.LocalAsyncLoadingCache$LoadingCacheView.get(LocalAsyncLoadingCache.java:122)
   	at org.apache.pulsar.common.naming.NamespaceBundleFactory.getBundles(NamespaceBundleFactory.java:260)
   	at org.apache.pulsar.broker.namespace.NamespaceService.getBundle(NamespaceService.java:218)
   	at org.apache.pulsar.broker.namespace.NamespaceService.isServiceUnitActive(NamespaceService.java:1006)
   	at org.apache.pulsar.broker.service.BrokerService.createPersistentTopic(BrokerService.java:1378)
   	at org.apache.pulsar.broker.service.BrokerService.lambda$loadOrCreatePersistentTopic$53(BrokerService.java:1351)
   	at org.apache.pulsar.broker.service.BrokerService$$Lambda$714/0x000000084059cc40.run(Unknown Source)
   	at java.util.concurrent.CompletableFuture$UniRun.tryFire(java.base@11.0.15/CompletableFuture.java:783)
   	at java.util.concurrent.CompletableFuture.postComplete(java.base@11.0.15/CompletableFuture.java:506)
   	at java.util.concurrent.CompletableFuture.complete(java.base@11.0.15/CompletableFuture.java:2073)
   	at org.apache.pulsar.common.naming.NamespaceBundleFactory.lambda$doLoadBundles$2(NamespaceBundleFactory.java:109)
   	at org.apache.pulsar.common.naming.NamespaceBundleFactory$$Lambda$484/0x00000008404d7840.accept(Unknown Source)
   	at java.util.concurrent.CompletableFuture$UniAccept.tryFire(java.base@11.0.15/CompletableFuture.java:714)
   	at java.util.concurrent.CompletableFuture.postComplete(java.base@11.0.15/CompletableFuture.java:506)
   	at java.util.concurrent.CompletableFuture.complete(java.base@11.0.15/CompletableFuture.java:2073)
   	at org.apache.pulsar.metadata.impl.ZKMetadataStore.handleGetResult(ZKMetadataStore.java:239)
   	at org.apache.pulsar.metadata.impl.ZKMetadataStore.lambda$batchOperation$6(ZKMetadataStore.java:183)
   	at org.apache.pulsar.metadata.impl.ZKMetadataStore$$Lambda$148/0x0000000840283440.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:722)
   	at org.apache.zookeeper.ClientCnxn$EventThread.run(ClientCnxn.java:563)
   ```


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] merlimat merged pull request #16310: Fixed deadlock when checking topic ownership

Posted by GitBox <gi...@apache.org>.
merlimat merged PR #16310:
URL: https://github.com/apache/pulsar/pull/16310


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org