Relations identification with deadlocks