-
Bug
-
Resolution: Done
-
Major
-
None
-
None
FC.handleDownMessage() has the following code:
while(length > lowest_credit && running) {
try {
boolean rc=credits_available.await(max_block_time, TimeUnit.MILLISECONDS);
if(rc || length <= lowest_credit || !running)
break;
long wait_time=System.currentTimeMillis() - last_credit_request;
if(wait_time >= max_block_time) {
// we have to set this var now, because we release the lock below (for sending a
// credit request), so all blocked threads would send a credit request, leading to
// a credit request storm
last_credit_request=System.currentTimeMillis();
// we need to send the credit requests down without holding the sent_lock, otherwise we might
// run into the deadlock described in http://jira.jboss.com/jira/browse/JGRP-292
Map<Address,Long> sent_copy=new HashMap<Address,Long>(sent);
sent_copy.keySet().retainAll(creditors);
sent_lock.unlock();
try {
// System.out.println(new Date() + " --> credit request");
for(Map.Entry<Address,Long> entry: sent_copy.entrySet())
}
finally
}
}
catch(InterruptedException e)
}
So if the thread is interrupted, unless
length < lowest_credit || !running,
we will have an infinite loop !
SOLUTION: we cannot set the interrupt flag again, because we don't return from the loop !