Skip to content
javabypankaj
HomeLibraryPopularCommunity
05
Concurrency & Multithreading
22 topics · 127 questions
1Thread Basics & Overview0/772Synchronization0/883volatile0/554Race Conditions0/335Deadlock, Livelock & Starvation0/446wait/notify, sleep/yield & Producer-Consumer0/667Atomic Classes & CAS0/448Locks: ReentrantLock, ReadWriteLock, StampedLock0/779Safe Publication & Memory Model0/5510Thread Pool & Executor Framework0/8811Thread Pool: Sizing & Pitfalls0/7712ThreadLocal & Thread Confinement0/6613Daemon Threads & JVM Shutdown0/3314CompletableFuture & Resilience0/191915Synchronization Utilities: Latch, Barrier, Semaphore0/6616ForkJoinPool & Work Stealing0/5517Concurrent Collections0/3318Thread Lifecycle: Priority, Interruption, Factory0/5519Thread Troubleshooting0/520Reactive & Flow API0/2221Benchmarking & Load Testing0/4422Advanced: Disruptor, Actor, False Sharing0/55
1Thread Basics & Overview72Synchronization83volatile54Race Conditions35Deadlock, Livelock & Starvation46wait/notify, sleep/yield & Producer-Consumer67Atomic Classes & CAS48Locks: ReentrantLock, ReadWriteLock, StampedLock79Safe Publication & Memory Model510Thread Pool & Executor Framework811Thread Pool: Sizing & Pitfalls712ThreadLocal & Thread Confinement613Daemon Threads & JVM Shutdown314CompletableFuture & Resilience1915Synchronization Utilities: Latch, Barrier, Semaphore616ForkJoinPool & Work Stealing517Concurrent Collections318Thread Lifecycle: Priority, Interruption, Factory519Thread Troubleshooting520Reactive & Flow API221Benchmarking & Load Testing422Advanced: Disruptor, Actor, False Sharing5
22 topics127 Qs0%
01Core Java17002OOP3203Collections6704Exception Handling2805Concurrency & Multithreading12706Java Streams, Lambda & Functional Programming32807Spring & Spring Boot2608Transactions3209JPA & Hibernate6910Microservices19411Kafka & Messaging9112DevOps, CI/CD & Tooling13313Database & SQL14114REST API & Web4015Design Patterns & LLD5716Advanced Java7117Coding Problems: DSA49218AWS & Cloud4119Data Engineering19420QA, Testing & SDET4121System Design3522Security2023Behavioral / HR: STAR Method37
22Topics
127Questions
0%Complete
19 of 22 topics
Topics
1Thread Basics & Overview0/772Synchronization0/883volatile0/554Race Conditions0/335Deadlock, Livelock & Starvation0/446wait/notify, sleep/yield & Producer-Consumer0/667Atomic Classes & CAS0/448Locks: ReentrantLock, ReadWriteLock, StampedLock0/779Safe Publication & Memory Model0/5510Thread Pool & Executor Framework0/8811Thread Pool: Sizing & Pitfalls0/7712ThreadLocal & Thread Confinement0/6613Daemon Threads & JVM Shutdown0/3314CompletableFuture & Resilience0/191915Synchronization Utilities: Latch, Barrier, Semaphore0/6616ForkJoinPool & Work Stealing0/5517Concurrent Collections0/3318Thread Lifecycle: Priority, Interruption, Factory0/55
19Thread Troubleshooting0/55
20Reactive & Flow API0/2221Benchmarking & Load Testing0/4422Advanced: Disruptor, Actor, False Sharing0/55

Thread Troubleshooting

Concurrency & Multithreading·Topic 19 of 22·5 questions
Q1How to troubleshoot thread contention?

Troubleshoot thread contention by collecting thread dumps (jstack), counting BLOCKED threads, finding the lock owner, and diagnosing the root cause: excessive locking, undersized pool, slow downstream, or connection pool exhaustion.

Read Answer
Q2Threads rising, CPU low: what is wrong?

Rising thread count with low CPU indicates threads are blocked on slow IO, leaked by unbounded creation, or waiting for exhausted connection pools, and the fix is timeouts and bounded resources, not more threads.

Read Answer
Q3Debug slow app with no errors?

When the app feels slow but logs show no errors, the problem is hidden wait time between steps, and the fix is to segment the request timeline and use distributed tracing to find where time accumulates.

Read Answer
Q4Profile ReentrantLock contention?

ReentrantLock waiters show as WAITING (parked by AQS), not BLOCKED, making contention invisible in basic thread dumps; use JFR jdk.ThreadPark events or async-profiler -e lock to detect and measure it.

Read Answer
Q5How to capture and read a thread dump?

Capture a thread dump with jstack, kill -3, or jcmd, then read each thread's state and lock ownership to find the stuck thread or the deadlock section.

Read Answer
Previous · Topic 18Thread Lifecycle: Priority, Interruption, Factory5 questionsNext · Topic 20Reactive & Flow API2 questions
javabypankaj© 2026 javabypankaj
PrivacyTerms
HomeSearchLibrary