infinite loop possible for object lookup in certain circumstances
-----------------------------------------------------------------
Key: CDV-745
URL: https://jira.terracotta.org/jira//browse/CDV-745
Project: Community Development
Issue Type: Bug
Components: DSO:L1
Affects Versions: 2.5.2
Reporter: Tim Eck
Assignee: Issue Review Board
Code like this can trigger the issue if "target" is a root and that root
instance is being faulted in a context other than the <clinit> depicted here
static class Target {
private static Target target;
static {
if (target == null) {
target = new Target();
}
}
}
One way to get something like this to happen is if there is a DMI defined on
target and the call is broadcast to a node where the Target class is yet to be
loaded. In this case, the DMI will arrive and a lookup will start for the
receiver object of the DMI. In this case, that receiver object is of type
Target and will we trigger the load of the class. Loading target implies
running it's static initializer which in turn will try to lookup the same
object. Most cases of reentrant lookup can be handled in DSO, but when there is
a cycle involving a class initiliazer there isn't a good solution to this
chicken-n-egg problem.
Attached is a thread dump showing a stack trace running this scenario for 2.6
(rev. 8400)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.terracotta.org/jira//secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
_______________________________________________
tc-dev mailing list
[email protected]
http://lists.terracotta.org/mailman/listinfo/tc-dev