maniksurtani/infinispan — comment on commit c65461e2f8fbdedf7dd92c950c1f4ce9a583b922
File: core/src/main/java/org/infinispan/transaction/AbstractCacheTransaction.java line 112
By Sanne:

There's a race condition on _needToNotifyWaiters_ .. this code might fail to notify the wait_for_locking threads as it's reading the volatile before entering the exclusive lock with the other potential thread. At this point it might take the optimal branch of skipping the notifyAll, and at that same point in time the other thread might already have checked for _txComplete_ , it fails to return and enters in the deadly embrace of an eternal wait().

Sending soon an alternative proposal..