Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8214148

[TESTBUG] serviceability/tmtools/jstack/WaitNotifyThreadTest.java is not doing what is expected

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 12
    • 12
    • core-svc
    • None
    • b24

      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 under JDK-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!

            pchilanomate Patricio Chilano Mateo
            dholmes David Holmes
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: