Details
-
Bug
-
Status: Resolved
-
Critical
-
Resolution: Fixed
-
4.3.2
-
None
-
None
Description
LedgerHandle sync interface heavily depends on SyncCounter to convert async interfaces
into sync interfaces.
Usaylly
SyncCounter.inc()
asyncCall()
SyncCOunter.block(0)
The block code is.
synchronized void block(int limit) throws InterruptedException {
while (i > limit) {
int prev = i;
wait();
if (i == prev)
}
}
Since 'i' is going to be same as 'prev' on spurious wakeup, and wait() can return on spurious wakeups.