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

    • b08

    Backports

      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

                cjplummer Chris Plummer
                cjplummer Chris Plummer
                Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: