Hi all,
I'm currently attempting to migrate a codebase to use Java 8 from Java 7. It compiles and runs without errors, except that a particular unit test gets stuck in a loop and allocates more and more RAM to the heap until it crashes.
The issue originates when my code makes a call to the .add() method of an object of type ConcurrentSkipListSet.
Here is a screenshot of the debug window from a successful run in Java 7:

And here is the same window for an unsuccessful run in the latest version of Java 8:

The difference being that ConcurrentSkipListMap.findPredecessor() calls on ConcurrentSkipListMap.cpr() in Java 8. The infinite loop occurs in Java 8 when it gets to findPredecessor, and then it keeps executing the uppermost three calls on that screenshot. Interestingly the .add() call succeeds a varying amount of times each time the test is ran, before a subsequent .add() call causes this infinite loop and failure.
The Objects being compared have a simple @Override method that compares them according to an integer value, which in this test is set to zero for each of the objects.
I can't imagine it's a bug in Java, so perhaps something in the class's interface is wrong in Java 8? Or it's some kind of concurrent access problem relying on weakly consistent iterators? Is anyone in the community familiar an issue like this?
Thanks a lot!
Ian