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

java/lang/instrument/NativeMethodPrefixAgent.java fails due to VirtualMachineError: out of space in CodeCache for method handle intrinsic

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P1 P1
    • 9
    • 8u40, 9
    • hotspot
    • b30
    • 9
    • b35
    • generic
    • generic
    • Verified

        ----------messages:(3/215)----------
        command: main -javaagent:NativeMethodPrefixAgent.jar NativeMethodPrefixApp
        reason: User specified action: run main/othervm -javaagent:NativeMethodPrefixAgent.jar NativeMethodPrefixApp
        elapsed time (seconds): 0.421
        ----------System.out:(6/224)----------
        Premain
        tr1: Retransforming java/lang/Runtime
        tr0: Retransforming java/lang/Runtime
        Error occurred during initialization of VM
        java.lang.NoClassDefFoundError: Could not initialize class java.lang.invoke.MethodHandleNatives

        ----------System.err:(59/4582)----------
        ERROR: Injection failure: java.lang.InternalError: java.lang.NoSuchMethodException: no such method: java.lang.invoke.MethodHandle.linkToStatic(MemberName)Object/invokeStatic
        java.lang.InternalError: java.lang.NoSuchMethodException: no such method: java.lang.invoke.MethodHandle.linkToStatic(MemberName)Object/invokeStatic
        at java.lang.invoke.MethodHandleStatics.newInternalError(MethodHandleStatics.java:120)
        at java.lang.invoke.DirectMethodHandle.makePreparedLambdaForm(DirectMethodHandle.java:214)
        at java.lang.invoke.DirectMethodHandle.preparedLambdaForm(DirectMethodHandle.java:188)
        at java.lang.invoke.DirectMethodHandle.preparedLambdaForm(DirectMethodHandle.java:177)
        at java.lang.invoke.DirectMethodHandle.make(DirectMethodHandle.java:84)
        at java.lang.invoke.MethodHandles$Lookup.getDirectMethodCommon(MethodHandles.java:1655)
        at java.lang.invoke.MethodHandles$Lookup.getDirectMethod(MethodHandles.java:1600)
        at java.lang.invoke.MethodHandles$Lookup.findStatic(MethodHandles.java:777)
        at java.lang.invoke.MethodHandleImpl.findCollector(MethodHandleImpl.java:1223)
        at java.lang.invoke.MethodHandleImpl.makeArrays(MethodHandleImpl.java:1263)
        at java.lang.invoke.MethodHandleImpl.<clinit>(MethodHandleImpl.java:1271)
        at java.lang.invoke.MethodHandleNatives.<clinit>(MethodHandleNatives.java:80)
        at NativeMethodPrefixAgent$Tr.transform(NativeMethodPrefixAgent.java:66)
        at sun.instrument.TransformerManager.transform(TransformerManager.java:188)
        at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:428)
        at sun.instrument.InstrumentationImpl.retransformClasses0(Native Method)
        at sun.instrument.InstrumentationImpl.retransformClasses(InstrumentationImpl.java:144)
        at NativeMethodPrefixAgent.premain(NativeMethodPrefixAgent.java:130)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:386)
        at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:401)
        Caused by: java.lang.NoSuchMethodException: no such method: java.lang.invoke.MethodHandle.linkToStatic(MemberName)Object/invokeStatic
        at java.lang.invoke.MemberName.makeAccessException(MemberName.java:873)
        at java.lang.invoke.MemberName$Factory.resolveOrFail(MemberName.java:990)
        at java.lang.invoke.DirectMethodHandle.makePreparedLambdaForm(DirectMethodHandle.java:212)
        ... 22 more
        Caused by: java.lang.NoSuchMethodError: java.lang.invoke.MethodHandle.linkToStatic(Ljava/lang/invoke/MemberName;)Ljava/lang/Object;
        at java.lang.invoke.MethodHandleNatives.resolve(Native Method)
        at java.lang.invoke.MemberName$Factory.resolve(MemberName.java:962)
        at java.lang.invoke.MemberName$Factory.resolveOrFail(MemberName.java:987)
        ... 23 more
        Caused by: java.lang.VirtualMachineError: out of space in CodeCache for method handle intrinsic
        ... 26 more
        Returning bad class file, to cause test failure
        ERROR: Injection failure: java.lang.ArrayIndexOutOfBoundsException: 6
        java.lang.ArrayIndexOutOfBoundsException: 6
        at jdk.internal.org.objectweb.asm.ClassReader.readShort(ClassReader.java:2355)
        at jdk.internal.org.objectweb.asm.ClassReader.<init>(ClassReader.java:198)
        at jdk.internal.org.objectweb.asm.ClassReader.<init>(ClassReader.java:182)
        at asmlib.Instrumentor.<init>(Instrumentor.java:99)
        at asmlib.Instrumentor.instrFor(Instrumentor.java:89)
        at NativeMethodPrefixAgent$Tr.transform(NativeMethodPrefixAgent.java:66)
        at sun.instrument.TransformerManager.transform(TransformerManager.java:188)
        at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:428)
        at sun.instrument.InstrumentationImpl.retransformClasses0(Native Method)
        at sun.instrument.InstrumentationImpl.retransformClasses(InstrumentationImpl.java:144)
        at NativeMethodPrefixAgent.premain(NativeMethodPrefixAgent.java:130)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:386)
        at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:401)
        Returning bad class file, to cause test failure

              iveresov Igor Veresov
              ykantser Yekaterina Kantserova (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              15 Start watching this issue

                Created:
                Updated:
                Resolved: