Deadlock errors handling