Comments (5)
Uhm, this smells like a deadlock in latest master code.. Can you take a jstack of the broker process (before it restarts itself) and attach it here?
from pulsar.
Can you also share which configuration you have modified from default ?
There should be no need to set loadBalancerAutoBundleSplitEnabled=true
for the load balancer to work. That flag is to control whether to dynamically split bundles based on load, but the load balancer works event without that.
from pulsar.
Hi Matteo.
Here is jstack from broker just a moment before shutdown: jstack_broker.txt
The parameters we have changed in brokers are:
brokerDeleteInactiveTopicsEnabled=false
maxUnackedMessagesPerConsumer=1000000
managedLedgerDefaultEnsembleSize=3
managedLedgerDefaultWriteQuorum=3
loadBalancerPlacementStrategy=weightedRandomSelection
loadBalancerReportUpdateMaxIntervalMinutes=5
loadBalancerSheddingIntervalMinutes=15
loadBalancerAutoBundleSplitEnabled=true
managedLedgerCacheSizeMB=4096
We are aware that broker should balance fine without loadBalancerAutoBundleSplitEnabled
enabled, but we were testing all features that seemed to fit our requirements for production env.
Thanks for your help.
Bye.
from pulsar.
Ok, we could see the problem from the jstack. This is the thread that is deadlocking itself :
"main-EventThread" #21 daemon prio=5 os_prio=0 tid=0x00007f7ee0eae000 nid=0x34 waiting on condition [0x00007f7e4bffe000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000000c6f087e8> (a java.util.concurrent.CompletableFuture$Signaller)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
at java.util.concurrent.CompletableFuture$Signaller.block(CompletableFuture.java:1693)
at java.util.concurrent.ForkJoinPool.managedBlock(ForkJoinPool.java:3323)
at java.util.concurrent.CompletableFuture.waitingGet(CompletableFuture.java:1729)
at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1895)
at com.github.benmanes.caffeine.cache.LocalAsyncLoadingCache$LoadingCacheView.get(LocalAsyncLoadingCache.java:383)
at com.yahoo.pulsar.common.naming.NamespaceBundleFactory.getBundles(NamespaceBundleFactory.java:130)
at com.yahoo.pulsar.broker.namespace.NamespaceService.getBundle(NamespaceService.java:140)
at com.yahoo.pulsar.broker.service.BrokerService.addTopicToStatsMaps(BrokerService.java:524)
at com.yahoo.pulsar.broker.service.BrokerService.lambda$refreshTopicToStatsMaps$11(BrokerService.java:550)
at com.yahoo.pulsar.broker.service.BrokerService$$Lambda$326/1860451344.accept(Unknown Source)
at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1374)
at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:580)
at com.yahoo.pulsar.broker.service.BrokerService.refreshTopicToStatsMaps(BrokerService.java:549)
at com.yahoo.pulsar.broker.namespace.NamespaceService$2.processResult(NamespaceService.java:571)
at org.apache.zookeeper.ClientCnxn$EventThread.processEvent(ClientCnxn.java:554)
at org.apache.zookeeper.ClientCnxn$EventThread.run(ClientCnxn.java:505)
The problem was introduced in current master (not in 1.15.x). There is a mix of ZK async and sync operations due to a cache miss on the ZooKeeperDataCache.
From the same ZK MainEvent thread we process the event and eventually trigger a sync ZK read that cannot complete because it needs the MainEvent thread to process the read response.
from pulsar.
Fixed in #115
from pulsar.
Related Issues (20)
- [Bug] maven build fails with Java 22 HOT 1
- [Bug] nslookup in apachepulsar/pulsar:3.3.0 isn't compatible with kubernetes search domains
- Pulsar Standalone: --wipe-data does not work with RocksDB backend in 3.2.3
- [Doc] Search doesn't work on pulsar website HOT 2
- [Bug] [docs] Pulsar 3.3 javadoc is in Chinese HOT 1
- [Bug] Broker became irresponsive due to too many open files error HOT 2
- [Doc] Document the removal of compaction
- [Bug] Major compaction is not recovered automatically after the disk is writable again
- [Bug] `status.html` can't access using 3.3.0 image
- [Bug] Ledger can not recover with Digest Mismatch Error HOT 5
- [Bug] Pulsar Functions Runtime doesn't properly enable direct byte buffer access for Netty on Java 17+
- [Bug] Pulsar broker CPU stratification problem HOT 5
- [Bug] [broker] broker log a full thread dump when a deadlock is detected in healthcheck every time
- [Doc][Improve] Backlog increase during subscription replication
- [Doc] add golang in transaction support list
- [improve]Perform health checks on the endpoints passed in by serviceUrl
- [Bug] Unable to initialize Stream metadata
- Jetty Upgrade: 12.x.x or latest HOT 6
- [Bug][broker] cursor will read in dead loop when do tailing-read with enableTransaction
- [Bug] Pulsar Functions ignores compressionType and crypto config for producers created with Context produce/newOutputMessage methods
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pulsar.