serviceability/tmtools/jstack/WaitNotifyThreadTest.java
Seems to expect to find a "waiting to re-lock" line but in fact I can't see anything in the test that actually creates a situation where the thread would be waiting to re-lock! (The current spurious "waiting to re-lock" messages have been fixed underJDK-8150689.)
Further the test is supposed to print out:
System.out.println("Correct monitor info found");
yet there is no such output. This indicates that the test is not working as expected and is not actually finding any locks. I think the logic for checking the method "name" is broken e.g.
if (mi.getName().startsWith("WaitThread.run")) {
the actual name is WaitNotifyThreadTest$WaitThread.run so it won't match!
Also:
if (mi.getName().startsWith(OBJECT_WAIT) && mi.getCompilationUnit() == null /*native method*/) {
won't match anything either as far as I can see!
Seems to expect to find a "waiting to re-lock" line but in fact I can't see anything in the test that actually creates a situation where the thread would be waiting to re-lock! (The current spurious "waiting to re-lock" messages have been fixed under
Further the test is supposed to print out:
System.out.println("Correct monitor info found");
yet there is no such output. This indicates that the test is not working as expected and is not actually finding any locks. I think the logic for checking the method "name" is broken e.g.
if (mi.getName().startsWith("WaitThread.run")) {
the actual name is WaitNotifyThreadTest$WaitThread.run so it won't match!
Also:
if (mi.getName().startsWith(OBJECT_WAIT) && mi.getCompilationUnit() == null /*native method*/) {
won't match anything either as far as I can see!
- relates to
-
JDK-8150689 Thread dump report "waiting to re-lock in wait()" shows incorrectly
-
- Resolved
-
-
JDK-8215050 [TESTBUG] serviceability/tmtools/jstack/WaitNotifyThreadTest.java fails when run with flag -Xcomp
-
- Resolved
-
-
JDK-8215199 [TESTBUG] serviceability/tmtools/jstack/WaitNotifyThreadTest.java still fails when run with flag -Xcomp
-
- Closed
-