race condition detection