-
Bug
-
Resolution: Fixed
-
P2
-
1.2.0
-
1.2beta
-
sparc
-
solaris_2.5
-
Not verified
While debugging various exceptions occurring with the RMI "juicer" stress test,
I got the following exception at one point:
java.util.NoSuchElementException: HashtableEnumerator
at java.util.Hashtable$HashtableEnumerator.nextElement(Hashtable.java)
at sun.rmi.transport.DGCClient.getNextRenewal(DGCClient.java)
at sun.rmi.transport.DGCClient.doRenewal(DGCClient.java)
at sun.rmi.transport.LeaseRenewer.run(DGCClient.java)
at java.lang.Thread.run(Thread.java)
The relevant code in DGCClient has changed drastically with the recent batching
support. The comment in the getRenewal() says that it makes the assumption that
the leaseTable is not empty, and given the above exception, this assumption is
false. Looking at the code briefly, it definitely seems like that assumption
is ill-advised, since getRenewal() is called after a wait() on the "lock" that
enforces mutual exclusion on the shared DGCClient data strucutes; during the
wait, handleDecrements() may be invoked in the Cleaner thread, removing elements
from the leaseTable, so it could become empty during this period.
This should be fixed ASAP.
I got the following exception at one point:
java.util.NoSuchElementException: HashtableEnumerator
at java.util.Hashtable$HashtableEnumerator.nextElement(Hashtable.java)
at sun.rmi.transport.DGCClient.getNextRenewal(DGCClient.java)
at sun.rmi.transport.DGCClient.doRenewal(DGCClient.java)
at sun.rmi.transport.LeaseRenewer.run(DGCClient.java)
at java.lang.Thread.run(Thread.java)
The relevant code in DGCClient has changed drastically with the recent batching
support. The comment in the getRenewal() says that it makes the assumption that
the leaseTable is not empty, and given the above exception, this assumption is
false. Looking at the code briefly, it definitely seems like that assumption
is ill-advised, since getRenewal() is called after a wait() on the "lock" that
enforces mutual exclusion on the shared DGCClient data strucutes; during the
wait, handleDecrements() may be invoked in the Cleaner thread, removing elements
from the leaseTable, so it could become empty during this period.
This should be fixed ASAP.