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

Change Whitebox implementation to make absence of method in Whitebox.class not fatal.

    Details

    • Subcomponent:
    • Introduced In Build:
      b28
    • Resolved In Build:
      b31
    • CPU:
      generic

      Backports

        Description

        If there is some method that presences in native part of whitebox, but absences in java side, we get error like below:
        [2013-04-16T07:18:52.71] java.lang.NoSuchMethodError: Method sun.hotspot.WhiteBox.isInStringTable(Ljava/lang/String;)Z not found
        [2013-04-16T07:18:52.71] at sun.hotspot.WhiteBox.registerNatives(Native Method)
        [2013-04-16T07:18:52.71] at sun.hotspot.WhiteBox.<clinit>(WhiteBox.java:61)
        [2013-04-16T07:18:52.71] at metaspace.stressHierarchy.common.PerformChecksHelper.<clinit>(PerformChecksHelper.java:19)
        [2013-04-16T07:18:52.71] at metaspace.stressHierarchy.common.StressHierarchyBaseClass.run(StressHierarchyBaseClass.java:61)
        [2013-04-16T07:18:52.71] at nsk.share.test.Tests$TestRunner.execute(Tests.java:63)
        [2013-04-16T07:18:52.71] at nsk.share.test.Tests$TestRunner.run(Tests.java:77)
        [2013-04-16T07:18:52.71] java.lang.RuntimeException: java.lang.NoSuchMethodError: Method sun.hotspot.WhiteBox.isInStringTable(Ljava/lang/String;)Z not found
        [2013-04-16T07:18:52.71] at nsk.share.test.Tests.runTest(Tests.java:83)
        [2013-04-16T07:18:52.71] at metaspace.stressHierarchy.common.StressHierarchyBaseClass.run(StressHierarchyBaseClass.java:81)
        [2013-04-16T07:18:52.71] at metaspace.stressHierarchy.common.StressHierarchy2.main(StressHierarchy2.java:21)
        [2013-04-16T07:18:52.71] at nsk.share.test.Tests$TestRunner.execute(Tests.java:63)
        [2013-04-16T07:18:52.71] at nsk.share.test.Tests$TestRunner.run(Tests.java:77)
        [2013-04-16T07:18:52.71] at nsk.share.test.Tests.runTest(Tests.java:83)
        [2013-04-16T07:18:52.71] at metaspace.stressHierarchy.common.StressHierarchy2.main(StressHierarchy2.java:21)
        [2013-04-16T07:18:52.71] Caused by: java.lang.NoSuchMethodError: Method sun.hotspot.WhiteBox.isInStringTable(Ljava/lang/String;)Z not found
        [2013-04-16T07:18:52.71] Exception in thread "main" nsk.share.TestFailure: Test exit code: 97
        [2013-04-16T07:18:52.71] at sun.hotspot.WhiteBox.registerNatives(Native Method)
        [2013-04-16T07:18:52.71] at nsk.share.test.Tests$TestRunner.execute(Tests.java:71)
        [2013-04-16T07:18:52.71] at sun.hotspot.WhiteBox.<clinit>(WhiteBox.java:61)
        [2013-04-16T07:18:52.71] at nsk.share.test.Tests$TestRunner.run(Tests.java:77)
        [2013-04-16T07:18:52.71] at metaspace.stressHierarchy.common.PerformChecksHelper.<clinit>(PerformChecksHelper.java:19)
        [2013-04-16T07:18:52.71] at nsk.share.test.Tests.runTest(Tests.java:83)
        [2013-04-16T07:18:52.71] at metaspace.stressHierarchy.common.StressHierarchy2.main(StressHierarchy2.java:21)
        [2013-04-16T07:18:52.71] at metaspace.stressHierarchy.common.StressHierarchyBaseClass.run(StressHierarchyBaseClass.java:61)
        [2013-04-16T07:18:52.71] ... 4 more

        It would be nice to change whitebox implementation to make such failures non-fatal. For now it means that all tests that use WhiteBox API would fail in case native part isn't synchronized with java-part.

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  iignatyev Igor Ignatyev
                  Reporter:
                  atimofee Aleksey Timofeev (Inactive)
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: