As the stack trace in the bug shows, we cannot load classes, since we may take a monitor. Resulting in an unexpected result to GetCurrentContendedMonitor(). Trying to use some decent primitive, e.g. Wicket/Semaphore/.., without being implementation dependent means we must warm up every possible scenario, since it may use a new class. Instead I here just use sleep + volatile for the barriers.
I cannot reproduce with these changes. Chewing through T6 as most issues have been seen there. ------------- Commit messages: - Volatile and sleep Changes: https://git.openjdk.java.net/jdk/pull/1177/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=1177&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8244679 Stats: 39 lines in 2 files changed: 25 ins; 5 del; 9 mod Patch: https://git.openjdk.java.net/jdk/pull/1177.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/1177/head:pull/1177 PR: https://git.openjdk.java.net/jdk/pull/1177