nsk.share.Failure: Unexpected exception during test execution: java.lang.InternalError: instrument library is missing in target VM

JDK Bug System | Joseph Provino | 3 months ago
  1. 0

    The change for JDK-8164913 was backed out due to failing a large number of tests. We should look at doing this change properly in JDK 10. [2016-09-10T04:36:57.67] VirtualMachine.loadAgent(null) [2016-09-10T04:36:57.67] TargetApp (stderr): Error opening zip file or JAR manifest missing: [2016-09-10T04:36:57.68] TargetApp (stdout): Signal received: 'null' [2016-09-10T04:36:57.69] Exception in thread "main" nsk.share.Failure: Unexpected exception during test execution: java.lang.InternalError: instrument library is missing in target VM [2016-09-10T04:36:57.69] at nsk.share.aod.AODTestRunner.runTest(AODTestRunner.java:144) [2016-09-10T04:36:57.69] at nsk.aod.VirtualMachine.VirtualMachine01.VirtualMachine01.main(VirtualMachine01.java:133) [2016-09-10T04:36:57.69] Caused by: java.lang.InternalError: instrument library is missing in target VM [2016-09-10T04:36:57.69] at sun.tools.attach.HotSpotVirtualMachine.loadAgent(jdk.attach@9-internal/HotSpotVirtualMachine.java:107) [2016-09-10T04:36:57.69] at com.sun.tools.attach.VirtualMachine.loadAgent(jdk.attach@9-internal/VirtualMachine.java:539) [2016-09-10T04:36:57.69] at nsk.aod.VirtualMachine.VirtualMachine01.VirtualMachine01.doTestActions(VirtualMachine01.java:69) [2016-09-10T04:36:57.69] at nsk.share.aod.AODTestRunner.runTest(AODTestRunner.java:120) [2016-09-10T04:36:57.69] ... 1 more [2016-09-10T04:36:57.69] Caused by: com.sun.tools.attach.AgentLoadException: Failed to load agent library [2016-09-10T04:36:57.69] at sun.tools.attach.VirtualMachineImpl.execute(jdk.attach@9-internal/VirtualMachineImpl.java:214) [2016-09-10T04:36:57.69] at sun.tools.attach.HotSpotVirtualMachine.loadAgentLibrary(jdk.attach@9-internal/HotSpotVirtualMachine.java:60) [2016-09-10T04:36:57.69] at sun.tools.attach.HotSpotVirtualMachine.loadAgentLibrary(jdk.attach@9-internal/HotSpotVirtualMachine.java:81) [2016-09-10T04:36:57.69] at sun.tools.attach.HotSpotVirtualMachine.loadAgent(jdk.attach@9-internal/HotSpotVirtualMachine.java:105)

    JDK Bug System | 3 months ago | Joseph Provino
    nsk.share.Failure: Unexpected exception during test execution: java.lang.InternalError: instrument library is missing in target VM
  2. 0

    This seems to fail with the stack trace similar to JDK-8155659, but this time it fails reliably when an external profiler, like Solaris Studio Perf Analyzer is attached to the process, and tests are loaded on bootclasspath. This blocks performance work. This simple test with attached profiler fails: $ perfanal ~/trunks/jdk9-dev/build/linux-x86_64-normal-server-release/images/jdk/bin/java -Xbootclasspath/a:. Test $ alias perfanal='~/Install/solstudio/bin/collect -o test.1.er -S on -j on -A on ' public class Test { public static void main(String... args) { for (int c = 0; c < 1000000; c++) { m(new Test()::run); } } static void m(Runnable r) { // do nothing } public void run() { // do nothing } } Exception in thread "main" java.lang.InternalError: java.lang.NullPointerException at java.lang.invoke.MethodHandles$LookupHelper.createClass(java.base@9-internal/MethodHandles.java:2204) at java.lang.invoke.MethodHandles$LookupHelper.access$200(java.base@9-internal/MethodHandles.java:2178) at java.lang.invoke.MethodHandles$LookupHelper$2.run(java.base@9-internal/MethodHandles.java:2212) at java.lang.invoke.MethodHandles$LookupHelper$2.run(java.base@9-internal/MethodHandles.java:2210) at java.security.AccessController.doPrivileged(java.base@9-internal/Native Method) at java.lang.invoke.MethodHandles$LookupHelper.<clinit>(java.base@9-internal/MethodHandles.java:2215) at java.lang.invoke.MethodHandles.publicLookup(java.base@9-internal/MethodHandles.java:140) at java.lang.invoke.MethodHandles$Lookup.canBeCached(java.base@9-internal/MethodHandles.java:2146) at java.lang.invoke.MethodHandles$Lookup.linkMethodHandleConstant(java.base@9-internal/MethodHandles.java:2111) at java.lang.invoke.MethodHandleNatives.linkMethodHandleConstant(java.base@9-internal/MethodHandleNatives.java:499) at Test.main(Test.java:5) Caused by: java.lang.NullPointerException at java.lang.invoke.MethodHandles$Lookup.canBeCached(java.base@9-internal/MethodHandles.java:2147) at java.lang.invoke.MethodHandles$Lookup.linkMethodHandleConstant(java.base@9-internal/MethodHandles.java:2111) at java.lang.invoke.MethodHandleNatives.linkMethodHandleConstant(java.base@9-internal/MethodHandleNatives.java:499) at jdk.internal.loader.BuiltinClassLoader.findResource(java.base@9-internal/BuiltinClassLoader.java:267) at jdk.internal.loader.BootLoader.findResource(java.base@9-internal/BootLoader.java:136) at java.lang.ClassLoader.getResource(java.base@9-internal/ClassLoader.java:1299) at java.lang.ClassLoader.defineClass1(java.base@9-internal/Native Method) at java.lang.ClassLoader.defineClass(java.base@9-internal/ClassLoader.java:942) at java.lang.ClassLoader.defineClass(java.base@9-internal/ClassLoader.java:806) at java.lang.invoke.MethodHandles$LookupHelper$1.findClass(java.base@9-internal/MethodHandles.java:2198) at java.lang.ClassLoader.loadClass(java.base@9-internal/ClassLoader.java:486) at java.lang.ClassLoader.loadClass(java.base@9-internal/ClassLoader.java:419) at java.lang.invoke.MethodHandles$LookupHelper.createClass(java.base@9-internal/MethodHandles.java:2202) ... 10 more The circularity is caused by BuiltinClassLoader usage of lambdas. This particular instance happens when Main class links the lambdas, which initializes MH$LookupHelper when doing MH$Lookup.canBeCached. This leads to MH$LH.createClass, which doubles back on BuiltinClassLoader.findResource, which has lambdas, which goes back to MH$LookupHelper... and the circle is complete. The minimal patch that solves this particular circularity: http://cr.openjdk.java.net/~shade/8156930/poc.patch

    JDK Bug System | 7 months ago | Aleksey Shipilev
    java.lang.InternalError: java.lang.NullPointerException at java.lang.invoke.MethodHandles$LookupHelper.createClass(java.base@9-internal/MethodHandles.java:2204) at java.lang.invoke.MethodHandles$LookupHelper.access$200(java.base@9-internal/MethodHandles.java:2178) at java.lang.invoke.MethodHandles$LookupHelper$2.run(java.base@9-internal/MethodHandles.java:2212) at java.lang.invoke.MethodHandles$LookupHelper$2.run(java.base@9-internal/MethodHandles.java:2210) at java.security.AccessController.doPrivileged(java.base@9-internal/Native Method) at java.lang.invoke.MethodHandles$LookupHelper.<clinit>(java.base@9-internal/MethodHandles.java:2215) at java.lang.invoke.MethodHandles.publicLookup(java.base@9-internal/MethodHandles.java:140) at java.lang.invoke.MethodHandles$Lookup.canBeCached(java.base@9-internal/MethodHandles.java:2146) at java.lang.invoke.MethodHandles$Lookup.linkMethodHandleConstant(java.base@9-internal/MethodHandles.java:2111) at java.lang.invoke.MethodHandleNatives.linkMethodHandleConstant(java.base@9-internal/MethodHandleNatives.java:499)
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    Printing Problem - java.lang.InternalError: Error code 9:

    Coderanch | 1 decade ago | Sunoo Varghese
    java.lang.InternalError: Error code 9:
  5. 0

    Internal Error : Error Code 9

    Oracle Community | 1 decade ago | 843807
    java.lang.InternalError: Error code 9:

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.InternalError

      instrument library is missing in target VM at sun.tools.attach.HotSpotVirtualMachine.loadAgent(jdk.attach@9-internal/HotSpotVirtualMachine.java:107) at com.sun.tools.attach.VirtualMachine.loadAgent(jdk.attach@9-internal/VirtualMachine.java:539)

      at nsk.aod.VirtualMachine.VirtualMachine01.VirtualMachine01.doTestActions()
    2. nsk.aod.VirtualMachine
      VirtualMachine01.doTestActions
      1. nsk.aod.VirtualMachine.VirtualMachine01.VirtualMachine01.doTestActions(VirtualMachine01.java:69)
      1 frame
    3. nsk.share.aod
      AODTestRunner.runTest
      1. nsk.share.aod.AODTestRunner.runTest(AODTestRunner.java:120)
      1 frame
    4. nsk.aod.VirtualMachine
      VirtualMachine01.main
      1. nsk.aod.VirtualMachine.VirtualMachine01.VirtualMachine01.main(VirtualMachine01.java:133)
      1 frame