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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 12
    • Fix Version/s: 12
    • Component/s: core-svc
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b24

      Description

      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!

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: