some tests to find deadlocks and solution