add deadlock detector