check for deadlock