pstack prints the stack of every thread in a running process. Tested on a deadlocked C program. On Ubuntu the pstack package fails on 64-bit processes, so here is the gdb …