Girish Sharma
04/25/2024, 5:31 PMLari Hotari
04/25/2024, 5:56 PMAsaf Mesika
04/25/2024, 6:17 PMLari Hotari
04/25/2024, 6:19 PMopen /Applications/MemoryAnalyzer.app to start MAT. The max heap size should be adjusted from -Xmx1024m to -Xmx4g by editing /Applications/MemoryAnalyzer.app/Contents/Eclipse/MemoryAnalyzer.ini .Lari Hotari
04/25/2024, 6:20 PMLari Hotari
04/25/2024, 6:22 PM-- the amount of http server connections
select _connections from org.eclipse.jetty.server.ConnectionLimit
-- http request uris (a lot seem to have empty uri)
select _originalURI from org.eclipse.jetty.server.Request
-- connected Pulsar binary protocol clients and counts
select clientVersion, count(clientVersion) from org.apache.pulsar.broker.service.ServerCnx group by 1 order by 2 descGirish Sharma
04/25/2024, 8:06 PMGirish Sharma
04/25/2024, 8:08 PMGirish Sharma
04/25/2024, 8:08 PMGirish Sharma
04/25/2024, 8:09 PMLari Hotari
04/25/2024, 8:24 PMCompletableFuture instances could be a good way to investigate async issues. For some reason Pulsar master branch is in a bad state where a lot of tests fail with OOMEs. select * from java.util.concurrent.CompletableFuture is one possible starting point for checking what CompletableFutures are outstanding.Manmeet
04/27/2024, 12:43 PM"metadata-store-10-1" #19 prio=5 os_prio=0 cpu=50535.64ms elapsed=25032.74s tid=0x00007f22417f96a0 nid=0xe2 waiting for monitor entry [0x00007f1fba8e4000]
java.lang.Thread.State: BLOCKED (on object monitor)
at java.util.concurrent.ConcurrentHashMap.computeIfAbsent(java.base@17.0.10/ConcurrentHashMap.java:1726)
- waiting to lock <0x00001000c0882098> (a java.util.concurrent.ConcurrentHashMap$ReservationNode)
at org.apache.pulsar.broker.ManagedLedgerClientFactory.lambda$initialize$1(ManagedLedgerClientFactory.java:93)
at org.apache.pulsar.broker.ManagedLedgerClientFactory$$Lambda$243/0x00007f1fbc329e28.get(Unknown Source)
at org.apache.bookkeeper.mledger.impl.ManagedLedgerFactoryImpl.lambda$asyncOpen$6(ManagedLedgerFactoryImpl.java:369)
at org.apache.bookkeeper.mledger.impl.ManagedLedgerFactoryImpl$$Lambda$1203/0x00007f1fbc8ce498.apply(Unknown Source)
at java.util.concurrent.ConcurrentHashMap.computeIfAbsent(java.base@17.0.10/ConcurrentHashMap.java:1708)
- locked <0x000010010ce8e538> (a java.util.concurrent.ConcurrentHashMap$ReservationNode)
at org.apache.bookkeeper.mledger.impl.ManagedLedgerFactoryImpl.asyncOpen(ManagedLedgerFactoryImpl.java:365)
at org.apache.pulsar.broker.service.BrokerService.lambda$createPersistentTopic$65(BrokerService.java:1530)
at org.apache.pulsar.broker.service.BrokerService$$Lambda$1189/0x00007f1fbc8c78d8.accept(Unknown Source)
at java.util.concurrent.CompletableFuture$UniAccept.tryFire(java.base@17.0.10/CompletableFuture.java:718)
at java.util.concurrent.CompletableFuture.postComplete(java.base@17.0.10/CompletableFuture.java:510)
at java.util.concurrent.CompletableFuture.complete(java.base@17.0.10/CompletableFuture.java:2147)
at org.apache.pulsar.metadata.impl.ZKMetadataStore.handleGetResult(ZKMetadataStore.java:262)
at org.apache.pulsar.metadata.impl.ZKMetadataStore.lambda$null$7(ZKMetadataStore.java:206)
at org.apache.pulsar.metadata.impl.ZKMetadataStore$$Lambda$211/0x00007f1fbc2d7240.run(Unknown Source)
at java.util.concurrent.Executors$RunnableAdapter.call(java.base@17.0.10/Executors.java:539)
at java.util.concurrent.FutureTask.run(java.base@17.0.10/FutureTask.java:264)
Also, found the supporting logs where it failed to open the ledger -
public void openLedgerFailed(ManagedLedgerException exception, Object ctx) {
if (!createIfMissing && exception instanceof ManagedLedgerNotFoundException) {
// We were just trying to load a topic and the topic doesn't exist
topicFuture.complete(Optional.empty());
} else {
log.warn("Failed to create topic {}", topic, exception);
pulsar.getExecutor().execute(() -> topics.remove(topic, topicFuture));
topicFuture.completeExceptionally(new PersistenceException(exception));
}
}
is there any known issue related to this in 2.10.4 or greater versions?? that it is not releasing the lock while opening a ledger and stucks there.
also, adding thread dump here for reference.Lari Hotari
04/30/2024, 12:44 PMLari Hotari
04/30/2024, 12:48 PMLari Hotari
04/30/2024, 1:43 PMthenAccept on this line https://github.com/apache/pulsar/blob/c1d8630b13e782935def3c4b12b59ae9aa8e5541/pul[…]c/main/java/org/apache/pulsar/broker/service/BrokerService.java to thenAcceptAsync . That would prevent the metadata store getting blocked and essentially dead locked.Girish Sharma
04/30/2024, 1:45 PMLari Hotari
04/30/2024, 1:54 PM<https://jstack.review>? to the gist url. it magically opens the thread dump in the UI. for example, https://jstack.review/?https://gist.github.com/lhotari/0df79a7a3aab42620ea41cfdaf0c8b2a#tda_1_dump . gh gist create <filename> is a convenient way to create gists.
``````