Easy👤 0-2 years👤 3-5 years 1 min read

Walk through the thread lifecycle states — and which one signals a problem in a thread dump?

Asked inCognizantAccentureDeloitteAmazon
#thread states#lifecycle#blocked#waiting#thread dump
Report issue

⚡ Short Answer

NEW → RUNNABLE → (BLOCKED / WAITING / TIMED_WAITING) → TERMINATED. In a thread dump, lots of BLOCKED threads point to lock contention; many WAITING threads on the same monitor can indicate a missed notify or a stuck downstream call.

Coffee Chat Question

Concept Made Simple

Walk through the thread lifecycle states — and which one signals a problem in a thread dump?

🧠Mind Map Answer

Remember It Faster

RUNNABLErunning or ready (incl. on-CPU I/O)
BLOCKEDwaiting to acquire a monitor lock
WAITINGwait()/join()/park() — no timeout
TIMED_WAITINGsleep()/wait(ms)/await(ms)

🔥What If?

Think Beyond the Expected

A thread dump shows dozens of threads BLOCKED on the same lock — what does that mean?

They're all queued to enter a synchronized block held by one thread. That's lock contention — the holder is slow (or stuck on I/O), serializing everyone behind it. Find the lock owner and reduce the critical section or switch to a finer-grained lock.

😂Real World

Reading thread states in a jstack dump is the first triage step for latency incidents: BLOCKED clusters = contention, WAITING clusters = a stalled dependency or deadlock.

🎯Interviewer's Expectation

Keywords they're listening for:

the 5 statesBLOCKED = monitor contentionWAITING vs TIMED_WAITINGRUNNABLE includes I/Othread-dump reading

⚠️Common Mistakes

  • Thinking RUNNABLE means actively using CPU
  • Confusing BLOCKED (lock) with WAITING (wait/join)
  • Ignoring thread states during incident triage

Best Practices

  • Capture 2–3 thread dumps a few seconds apart
  • Correlate BLOCKED threads to the lock owner
  • Name threads so dumps are readable

🔁Follow-up Questions

  • 1Why can a thread doing socket I/O show as RUNNABLE?
  • 2How do you find which thread holds the lock others are blocked on?
  • 3What's the difference between BLOCKED and WAITING?

🧩Related Technologies

jstackThread.Stateasync-profiler

Continue Learning with AI

Take this question deeper with your favourite AI assistant. Pick a depth, copy the prompt, or open it directly — AI is your learning companion, not a shortcut.

Plain-language foundations

I'm preparing for a software engineering interview and want to understand this from scratch, as a beginner.

Topic: Threads & Pools (Multithreading)
Interview question: "Walk through the thread lifecycle states — and which one signals a problem in a thread dump?"

Please:
1. Explain the core idea in simple, plain language, using an everyday analogy.
2. Define any technical terms you use.
3. Walk through one small, concrete example.
4. Finish with a single sentence I can easily remember.

Keep the tone friendly and assume I'm new to this topic.
Open inChatGPTGeminiClaude

Was this answer helpful?

Support our platform by exploring our recommended products.

As an Amazon affiliate, purchases through these links may earn us a small commission — at no extra cost to you. It helps keep Full Stack Interview Guru free.

Related Questions