Hunting Coroutine Deadlocks with CodeQL
We recently used CodeQL to do a static analysis pass over our Kotlin codebase, looking for a specific coroutine anti-pattern: calling runBlocking from inside a running coroutine. This post walks through the problem, the query we wrote, the debugging journey to get it working, and what we found.