Architecture in Motion · Episode 019

Java Deadlocks and Thread Dumps: Diagnosing Checkout That Stops Making Progress

The checkout spinner never finishes while CPU stays low; two workers may hold locks that each other needs.

Illustrative failure model. No live payment, broker, database, or JVM is connected. Counts and timelines are teaching values, not benchmark results.

Check your understanding

Does one WAITING thread prove deadlock?

What this model does and does not prove

Find the actual wait chain, enforce a consistent lock order where needed, and remove remote calls from locked sections.

Every step describes a constructed scenario. These states do not replace load tests, fault injection, provider contracts, JVM recordings, or durable transaction checks. Previous and Reset rebuild the teaching state; they never roll back real business operations.