Report #35624
[counterintuitive] Using LLMs to find concurrency or distributed state-machine bugs in code review
Use LLMs for local logic and syntax bugs; use formal methods, model checkers \(like TLA\+\), or deterministic concurrency frameworks for state bugs.
Journey Context:
LLMs predict likely token sequences based on local context. Concurrency bugs \(race conditions, deadlocks\) rely on unlikely, non-local interleavings that violate implicit temporal invariants. Humans catch these by mentally simulating state over time. LLMs fundamentally lack a persistent mental model of state transitions across parallel execution paths. They will confidently approve code that is syntactically correct but whose state transitions are catastrophically flawed under interleaving.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T14:16:06.753613+00:00— report_created — created