A test hangs in CI, the job sits there for 30 minutes, and GitHub Actions cancels it. The log says the job exceeded its time limit and nothing about what the test was doing when it got stuck. Running it again locally rarely helps, because a timing problem that shows up on a 2-core runner can be close to impossible to reproduce on a laptop with 16.
What you want in that moment is a thread dump of the test JVM, taken while the test is still hung. I spent some time checking whether GitHub Actions leaves room for that, tried a few ways to get it, and ended up building an action around what I found. I built ThreadMine , the analyzer that action sends dumps to, but none of the collection methods below need it.
Is the JVM still running after a timeout?
That was the first thing to check, because if GitHub kills the test JVM right away there's nothing left to collect. I wrote a test that deadlocks on purpose and ran it on ubuntu-latest and macos-latest , with step-level and job-level timeouts.…