Use /proc to detect deadlock