The rootcause is reentrant lock has more than one hold count. In this case, lock1 is held when stream4 is created within sublistener.closed callback. It can just be released, no tryLock(), which increment the lock hold count in the current thread, and prevent thread1 from acquiring lock1.
The rootcause is reentrant lock has more than one hold count. In this case, lock1 is held when stream4 is created within sublistener.closed callback. It can just be released, no tryLock(), which increment the lock hold count in the current thread, and prevent thread1 from acquiring lock1.
Tested with blaze test
--runs_per_test=100
: http://sponge2/caeee424-089f-456e-99de-eb82a35558bacc. @ejona86