Incident triage from symptoms and evidence
Definition:
Production triage matches a system symptom to evidence that can confirm or reject a hypothesis.
Explanation:
Deadlock is a lock ownership cycle.
Illustration image:
Example:
jcmd PID Thread.print -l
jcmd PID JFR.start name=incident duration=45s filename=incident.jfrExpected behavior. In the dump, match waiting threads to actual lock owners; in JFR, compare hot stacks and allocation rather than counting RUNNABLE lines.
Internal working:
Pool exhaustion can exist without a cycle. Queue growth raises latency and retains task objects even when CPU is low. Sustained CPU may mean useful work, spinning or CAS retries. Review thread dumps in a series and correlate with metrics and JFR before adjusting thread counts or heap.
Interview questions:
How can you distinguish worker starvation from a deadlock?
Check queue age and worker stacks for tasks waiting on their own pool. Examine lock ownership for a cycle before calling it deadlock.