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

serviceability/sa/TestObjectMonitorIterate.java is failing due to ObjectMonitor referencing a null Object

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 19, repo-loom
    • Fix Version/s: 19
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b08

      Description

      serviceability/sa/TestObjectMonitorIterate.java fails in the loom repo:

       stderr: [Exception in thread "main" java.lang.NullPointerException: Cannot invoke "sun.jvm.hotspot.oops.Oop.getKlass()" because "<local5>" is null
      at TestObjectMonitorIterate.test(TestObjectMonitorIterate.java:63)
      at TestObjectMonitorIterate.main(TestObjectMonitorIterate.java:97)

      The code in question is:

                  while (itr.hasNext()) {
                      ObjectMonitor mon = (ObjectMonitor)itr.next();
                      Oop oop = heap.newOop(mon.object());
                      System.out.println("Monitor found: " + oop.getKlass().getName().asString());
                  }

      So it looks like it found an ObjectMonitor, but the Object for the monitor was null for some reason.

      This failure does not happen when no VM args are specified. It does happen with:

         -Xcomp -XX:+CreateCoredumpOnCrash -ea -esa -XX:CompileThreshold=100 -XX:+UnlockExperimentalVMOptions -server -XX:+TieredCompilation

      It also happens with just -Xcomp.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              cjplummer Chris Plummer
              Reporter:
              cjplummer Chris Plummer
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: