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

JDK8 crash on JIT optimization when java.lang.invoke.CallSite is loaded to early

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P2
    • Resolution: Cannot Reproduce
    • Affects Version/s: 8
    • Fix Version/s: None
    • Component/s: hotspot
    • Environment:

      ILW=HMM=>P2

    • Subcomponent:
    • CPU:
      x86_64
    • OS:
      windows_7

      Backports

        Description

        FULL PRODUCT VERSION :
        java version "1.8.0_05"
        Java(TM) SE Runtime Environment (build 1.8.0_05-b13)
        Java HotSpot(TM) 64-Bit Server VM (build 25.5-b02, mixed mode)

        Also on the initial 1.8.0 release

        FULL OS VERSION :
        Microsoft Windows [Version 6.1.7601]

        EXTRA RELEVANT SYSTEM CONFIGURATION :
        The java.lang.invoke.CallSite mentioned above is loaded inside a Javaagent.

        A DESCRIPTION OF THE PROBLEM :
        When I have an simple application with Nashorn and the JIT compiler for Nashorn-s inner lambda classes kicks in, the JVM crahes.
        We run this class with a simple javaagent that loads java.lang.invoke.CallSite, but does nothing else.

        I exctracted this bug from a javaagent using javassist 3.8.0-GA.
        More details in the reproduction example application I created.


        THE PROBLEM WAS REPRODUCIBLE WITH -Xint FLAG: No

        THE PROBLEM WAS REPRODUCIBLE WITH -server FLAG: Yes

        STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
        Make a simple javaagent that only loads one class CallSite:
        try {
        Class.forName("java.lang.invoke.CallSite");
        } catch (Throwable t) {}

        Inside your normal program code call the same Nashorn program (lambda expression) enought times (1000) for JIT to kick in and cause the crash.

        EXPECTED VERSUS ACTUAL BEHAVIOR :
        With JDK8 the JVM crashes with an error report.

        It should prints out a lot of number and exites normaly, without a crash.
        ERROR MESSAGES/STACK TRACES THAT OCCUR :
        #
        # A fatal error has been detected by the Java Runtime Environment:
        #
        # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00000000d6a886c0, pid=7144, tid=21388
        #
        # JRE version: Java(TM) SE Runtime Environment (8.0_05-b13) (build 1.8.0_05-b13)
        # Java VM: Java HotSpot(TM) 64-Bit Server VM (25.5-b02 mixed mode windows-amd64 compressed oops)
        # Problematic frame:
        # C 0x00000000d6a886c0
        #
        # Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
        #
        # If you would like to submit a bug report, please visit:
        # http://bugreport.sun.com/bugreport/crash.jsp
        #

        --------------- T H R E A D ---------------

        Current thread (0x000000000228f800): JavaThread "main" [_thread_in_Java, id=21388, stack(0x0000000002510000,0x0000000002610000)]

        siginfo: ExceptionCode=0xc0000005, ExceptionInformation=0x0000000000000008 0x00000000d6a886c0

        Registers:
        RAX=0x0000000081d56918, RBX=0x0000000008328e10, RCX=0x0000000000000040, RDX=0x00000000000000e0
        RSP=0x000000000260eb20, RBP=0x000000000f017380, RSI=0x000000000b636818, RDI=0x000000000000068a
        R8 =0x000000000000068a, R9 =0x0000000081d0bc20, R10=0x0000000081d56918, R11=0x000000000f3ed680
        R12=0x0000000000000000, R13=0x000000000260eb10, R14=0x000000000260ec10, R15=0x000000000228f800
        RIP=0x00000000d6a886c0, EFLAGS=0x0000000000010246

        Top of Stack: (sp=0x000000000260eb20)
        0x000000000260eb20: 0000000081d56918 000000000260eb28
        0x000000000260eb30: 000000000260eb40 000000000f3f49fc
        0x000000000260eb40: 000000000854c150 0000000000000000
        0x000000000260eb50: 00000000084c49c8 0000000000000000
        0x000000000260eb60: 0000000081d11e40 0000000081d56918
        0x000000000260eb70: 000000000f017380 0000000000000000
        0x000000000260eb80: 000000000260ebf0 000000000f0172b0
        0x000000000260eb90: 00000000d6a89040 000000000f0172b0
        0x000000000260eba0: 0000000081d56918 0000000081d61290
        0x000000000260ebb0: 000000000260ebb0 000000000b660dfe
        0x000000000260ebc0: 000000000260ec10 000000000b660e90
        0x000000000260ebd0: 0000000000000000 000000000b660e20
        0x000000000260ebe0: 000000000260eba0 000000000260ec20
        0x000000000260ebf0: 000000000260ec20 000000000f3fcad4
        0x000000000260ec00: 0000000000000000 0000000081d56918
        0x000000000260ec10: 0000000081d61140 000000000f3fcad4

        Instructions: (pc=0x00000000d6a886c0)
        0x00000000d6a886a0: 41 20 f4 27 0a 00 00 00 69 00 6e 00 76 00 6f 00
        0x00000000d6a886b0: 6b 00 65 00 5f 00 4c 00 5f 00 44 00 00 00 00 00
        0x00000000d6a886c0: 09 00 00 00 00 00 00 00 a0 37 f5 27 00 00 00 00
        0x00000000d6a886d0: 03 00 00 00 00 00 00 00 08 00 00 00 00 00 00 00


        Register to memory mapping:

        RAX=0x0000000081d56918 is an oop
        jdk.nashorn.internal.objects.Global
         - klass: 'jdk/nashorn/internal/objects/Global'
        RBX=0x0000000008328e10 is an unknown value
        RCX=0x0000000000000040 is an unknown value
        RDX=0x00000000000000e0 is an unknown value
        RSP=0x000000000260eb20 is pointing into the stack for thread: 0x000000000228f800
        RBP=0x000000000f017380 is at code_begin+1664 in an Interpreter codelet
        invoke return entry points [0x000000000f016d00, 0x000000000f017460] 1888 bytes
        RSI=0x000000000b636818 is an unknown value
        RDI=0x000000000000068a is an unknown value
        R8 =0x000000000000068a is an unknown value
        R9 =0x0000000081d0bc20 is an oop
        java.lang.invoke.MemberName
         - klass: 'java/lang/invoke/MemberName'
        R10=0x0000000081d56918 is an oop
        jdk.nashorn.internal.objects.Global
         - klass: 'jdk/nashorn/internal/objects/Global'
        R11=0x000000000f3ed680 is at entry_point+0 in (nmethod*)0x000000000f3ed510
        R12=0x0000000000000000 is an unknown value
        R13=0x000000000260eb10 is pointing into the stack for thread: 0x000000000228f800
        R14=0x000000000260ec10 is pointing into the stack for thread: 0x000000000228f800
        R15=0x000000000228f800 is a thread


        Stack: [0x0000000002510000,0x0000000002610000], sp=0x000000000260eb20, free space=1018k
        Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
        C 0x00000000d6a886c0


        --------------- P R O C E S S ---------------

        Java Threads: ( => current thread )
          0x000000000a28c800 JavaThread "Service Thread" daemon [_thread_blocked, id=20208, stack(0x000000000ab40000,0x000000000ac40000)]
          0x000000000a289000 JavaThread "C1 CompilerThread2" daemon [_thread_blocked, id=18908, stack(0x000000000a900000,0x000000000aa00000)]
          0x000000000a286800 JavaThread "C2 CompilerThread1" daemon [_thread_blocked, id=20740, stack(0x0000000009ff0000,0x000000000a0f0000)]
          0x000000000a283800 JavaThread "C2 CompilerThread0" daemon [_thread_blocked, id=18564, stack(0x000000000a710000,0x000000000a810000)]
          0x0000000008a85000 JavaThread "Attach Listener" daemon [_thread_blocked, id=19432, stack(0x000000000a140000,0x000000000a240000)]
          0x0000000008a81800 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=20508, stack(0x0000000009e70000,0x0000000009f70000)]
          0x0000000008a26000 JavaThread "Finalizer" daemon [_thread_blocked, id=20956, stack(0x0000000009b70000,0x0000000009c70000)]
          0x0000000008a1b000 JavaThread "Reference Handler" daemon [_thread_blocked, id=17260, stack(0x0000000009cd0000,0x0000000009dd0000)]
        =>0x000000000228f800 JavaThread "main" [_thread_in_Java, id=21388, stack(0x0000000002510000,0x0000000002610000)]

        Other Threads:
          0x0000000008a17800 VMThread [stack: 0x0000000009a00000,0x0000000009b00000] [id=21168]
          0x000000000a2f8800 WatcherThread [stack: 0x000000000ace0000,0x000000000ade0000] [id=8852]

        VM state:not at safepoint (normal execution)

        VM Mutex/Monitor currently owned by a thread: None

        Heap:
         PSYoungGen total 11776K, used 4347K [0x00000000d5f00000, 0x00000000d6c00000, 0x0000000100000000)
          eden space 10240K, 32% used [0x00000000d5f00000,0x00000000d6241e08,0x00000000d6900000)
          from space 1536K, 65% used [0x00000000d6a80000,0x00000000d6b7cf10,0x00000000d6c00000)
          to space 1536K, 0% used [0x00000000d6900000,0x00000000d6900000,0x00000000d6a80000)
         ParOldGen total 129536K, used 2339K [0x0000000081c00000, 0x0000000089a80000, 0x00000000d5f00000)
          object space 129536K, 1% used [0x0000000081c00000,0x0000000081e48f58,0x0000000089a80000)
         Metaspace used 10017K, capacity 10390K, committed 10624K, reserved 1058816K
          class space used 1420K, capacity 1579K, committed 1664K, reserved 1048576K

        Card table byte_map: [0x0000000002f50000,0x0000000003350000] byte_map_base: 0x0000000002b42000

        Marking Bits: (ParMarkBitMap*) 0x000000006fbb13b0
         Begin Bits: [0x0000000003d70000, 0x0000000005d00000)
         End Bits: [0x0000000005d00000, 0x0000000007c90000)

        Polling page: 0x0000000000340000

        CodeCache: size=245760Kb used=4328Kb max_used=4343Kb free=241431Kb
         bounds [0x000000000f010000, 0x000000000f460000, 0x000000001e010000]
         total_blobs=1825 nmethods=1472 adapters=266
         compilation: enabled

        Compilation events (10 events):
        Event: 1.105 Thread 0x000000000a289000 1471 3 jdk.nashorn.internal.runtime.linker.JavaArgumentConverters::toString (97 bytes)
        Event: 1.106 Thread 0x000000000a289000 nmethod 1471 0x000000000f43e210 code [0x000000000f43e460, 0x000000000f43f528]
        Event: 1.108 Thread 0x000000000a289000 1472 3 jdk.nashorn.internal.runtime.ScriptFunction::isFunctionMH (24 bytes)
        Event: 1.108 Thread 0x000000000a289000 nmethod 1472 0x000000000f43f7d0 code [0x000000000f43f940, 0x000000000f43fcf0]
        Event: 1.112 Thread 0x000000000a286800 nmethod 1221 0x000000000f43fdd0 code [0x000000000f441000, 0x000000000f446208]
        Event: 1.112 Thread 0x000000000a286800 1354 4 java.lang.invoke.DirectMethodHandle::internalMemberName (8 bytes)
        Event: 1.113 Thread 0x000000000a286800 nmethod 1354 0x000000000f425b90 code [0x000000000f425cc0, 0x000000000f425d38]
        Event: 1.113 Thread 0x000000000a286800 1385 4 java.lang.invoke.LambdaForm$DMH/312714112::invokeStatic_LL_L (15 bytes)
        Event: 1.114 Thread 0x000000000a286800 nmethod 1385 0x000000000f43a450 code [0x000000000f43a5a0, 0x000000000f43a648]
        Event: 1.114 Thread 0x000000000a286800 1349 4 java.util.Arrays::copyOf (46 bytes)

        GC Heap History (10 events):
        Event: 0.317 GC heap before
        {Heap before GC invocations=8 (full 0):
         PSYoungGen total 3072K, used 2819K [0x00000000d5f00000, 0x00000000d6500000, 0x0000000100000000)
          eden space 2048K, 99% used [0x00000000d5f00000,0x00000000d60fc510,0x00000000d6100000)
          from space 1024K, 76% used [0x00000000d6100000,0x00000000d61c48e0,0x00000000d6200000)
          to space 1024K, 0% used [0x00000000d6400000,0x00000000d6400000,0x00000000d6500000)
         ParOldGen total 129536K, used 715K [0x0000000081c00000, 0x0000000089a80000, 0x00000000d5f00000)
          object space 129536K, 0% used [0x0000000081c00000,0x0000000081cb2e88,0x0000000089a80000)
         Metaspace used 5342K, capacity 5828K, committed 6144K, reserved 1056768K
          class space used 602K, capacity 643K, committed 768K, reserved 1048576K
        Event: 0.319 GC heap after
        Heap after GC invocations=8 (full 0):
         PSYoungGen total 4608K, used 788K [0x00000000d5f00000, 0x00000000d6600000, 0x0000000100000000)
          eden space 3584K, 0% used [0x00000000d5f00000,0x00000000d5f00000,0x00000000d6280000)
          from space 1024K, 77% used [0x00000000d6400000,0x00000000d64c53e8,0x00000000d6500000)
          to space 1536K, 0% used [0x00000000d6280000,0x00000000d6280000,0x00000000d6400000)
         ParOldGen total 129536K, used 815K [0x0000000081c00000, 0x0000000089a80000, 0x00000000d5f00000)
          object space 129536K, 0% used [0x0000000081c00000,0x0000000081ccbe98,0x0000000089a80000)
         Metaspace used 5342K, capacity 5828K, committed 6144K, reserved 1056768K
          class space used 602K, capacity 643K, committed 768K, reserved 1048576K
        }
        Event: 0.411 GC heap before
        {Heap before GC invocations=9 (full 0):
         PSYoungGen total 4608K, used 4372K [0x00000000d5f00000, 0x00000000d6600000, 0x0000000100000000)
          eden space 3584K, 100% used [0x00000000d5f00000,0x00000000d6280000,0x00000000d6280000)
          from space 1024K, 77% used [0x00000000d6400000,0x00000000d64c53e8,0x00000000d6500000)
          to space 1536K, 0% used [0x00000000d6280000,0x00000000d6280000,0x00000000d6400000)
         ParOldGen total 129536K, used 815K [0x0000000081c00000, 0x0000000089a80000, 0x00000000d5f00000)
          object space 129536K, 0% used [0x0000000081c00000,0x0000000081ccbe98,0x0000000089a80000)
         Metaspace used 6245K, capacity 6524K, committed 6784K, reserved 1056768K
          class space used 723K, capacity 783K, committed 896K, reserved 1048576K
        Event: 0.416 GC heap after
        Heap after GC invocations=9 (full 0):
         PSYoungGen total 5120K, used 1050K [0x00000000d5f00000, 0x00000000d6800000, 0x0000000100000000)
          eden space 3584K, 0% used [0x00000000d5f00000,0x00000000d5f00000,0x00000000d6280000)
          from space 1536K, 68% used [0x00000000d6280000,0x00000000d6386a48,0x00000000d6400000)
          to space 1536K, 0% used [0x00000000d6680000,0x00000000d6680000,0x00000000d6800000)
         ParOldGen total 129536K, used 999K [0x0000000081c00000, 0x0000000089a80000, 0x00000000d5f00000)
          object space 129536K, 0% used [0x0000000081c00000,0x0000000081cf9f08,0x0000000089a80000)
         Metaspace used 6245K, capacity 6524K, committed 6784K, reserved 1056768K
          class space used 723K, capacity 783K, committed 896K, reserved 1048576K
        }
        Event: 0.537 GC heap before
        {Heap before GC invocations=10 (full 0):
         PSYoungGen total 5120K, used 4634K [0x00000000d5f00000, 0x00000000d6800000, 0x0000000100000000)
          eden space 3584K, 100% used [0x00000000d5f00000,0x00000000d6280000,0x00000000d6280000)
          from space 1536K, 68% used [0x00000000d6280000,0x00000000d6386a48,0x00000000d6400000)
          to space 1536K, 0% used [0x00000000d6680000,0x00000000d6680000,0x00000000d6800000)
         ParOldGen total 129536K, used 999K [0x0000000081c00000, 0x0000000089a80000, 0x00000000d5f00000)
          object space 129536K, 0% used [0x0000000081c00000,0x0000000081cf9f08,0x0000000089a80000)
         Metaspace used 7041K, capacity 7198K, committed 7424K, reserved 1056768K
          class space used 855K, capacity 920K, committed 1024K, reserved 1048576K
        Event: 0.539 GC heap after
        Heap after GC invocations=10 (full 0):
         PSYoungGen total 7680K, used 1189K [0x00000000d5f00000, 0x00000000d6800000, 0x0000000100000000)
          eden space 6144K, 0% used [0x00000000d5f00000,0x00000000d5f00000,0x00000000d6500000)
          from space 1536K, 77% used [0x00000000d6680000,0x00000000d67a9680,0x00000000d6800000)
          to space 1536K, 0% used [0x00000000d6500000,0x00000000d6500000,0x00000000d6680000)
         ParOldGen total 129536K, used 1247K [0x0000000081c00000, 0x0000000089a80000, 0x00000000d5f00000)
          object space 129536K, 0% used [0x0000000081c00000,0x0000000081d37f48,0x0000000089a80000)
         Metaspace used 7041K, capacity 7198K, committed 7424K, reserved 1056768K
          class space used 855K, capacity 920K, committed 1024K, reserved 1048576K
        }
        Event: 0.731 GC heap before
        {Heap before GC invocations=11 (full 0):
         PSYoungGen total 7680K, used 7333K [0x00000000d5f00000, 0x00000000d6800000, 0x0000000100000000)
          eden space 6144K, 100% used [0x00000000d5f00000,0x00000000d6500000,0x00000000d6500000)
          from space 1536K, 77% used [0x00000000d6680000,0x00000000d67a9680,0x00000000d6800000)
          to space 1536K, 0% used [0x00000000d6500000,0x00000000d6500000,0x00000000d6680000)
         ParOldGen total 129536K, used 1247K [0x0000000081c00000, 0x0000000089a80000, 0x00000000d5f00000)
          object space 129536K, 0% used [0x0000000081c00000,0x0000000081d37f48,0x0000000089a80000)
         Metaspace used 8527K, capacity 8738K, committed 8960K, reserved 1056768K
          class space used 1095K, capacity 1159K, committed 1280K, reserved 1048576K
        Event: 0.734 GC heap after
        Heap after GC invocations=11 (full 0):
         PSYoungGen total 7680K, used 1526K [0x00000000d5f00000, 0x00000000d6c00000, 0x0000000100000000)
          eden space 6144K, 0% used [0x00000000d5f00000,0x00000000d5f00000,0x00000000d6500000)
          from space 1536K, 99% used [0x00000000d6500000,0x00000000d667da48,0x00000000d6680000)
          to space 1536K, 0% used [0x00000000d6a80000,0x00000000d6a80000,0x00000000d6c00000)
         ParOldGen total 129536K, used 2011K [0x0000000081c00000, 0x0000000089a80000, 0x00000000d5f00000)
          object space 129536K, 1% used [0x0000000081c00000,0x0000000081df6f58,0x0000000089a80000)
         Metaspace used 8527K, capacity 8738K, committed 8960K, reserved 1056768K
          class space used 1095K, capacity 1159K, committed 1280K, reserved 1048576K
        }
        Event: 0.928 GC heap before
        {Heap before GC invocations=12 (full 0):
         PSYoungGen total 7680K, used 7670K [0x00000000d5f00000, 0x00000000d6c00000, 0x0000000100000000)
          eden space 6144K, 100% used [0x00000000d5f00000,0x00000000d6500000,0x00000000d6500000)
          from space 1536K, 99% used [0x00000000d6500000,0x00000000d667da48,0x00000000d6680000)
          to space 1536K, 0% used [0x00000000d6a80000,0x00000000d6a80000,0x00000000d6c00000)
         ParOldGen total 129536K, used 2011K [0x0000000081c00000, 0x0000000089a80000, 0x00000000d5f00000)
          object space 129536K, 1% used [0x0000000081c00000,0x0000000081df6f58,0x0000000089a80000)
         Metaspace used 9654K, capacity 9888K, committed 10240K, reserved 1058816K
          class space used 1295K, capacity 1410K, committed 1536K, reserved 1048576K
        Event: 0.943 GC heap after
        Heap after GC invocations=12 (full 0):
         PSYoungGen total 11776K, used 1011K [0x00000000d5f00000, 0x00000000d6c00000, 0x0000000100000000)
          eden space 10240K, 0% used [0x00000000d5f00000,0x00000000d5f00000,0x00000000d6900000)
          from space 1536K, 65% used [0x00000000d6a80000,0x00000000d6b7cf10,0x00000000d6c00000)
          to space 1536K, 0% used [0x00000000d6900000,0x00000000d6900000,0x00000000d6a80000)
         ParOldGen total 129536K, used 2339K [0x0000000081c00000, 0x0000000089a80000, 0x00000000d5f00000)
          object space 129536K, 1% used [0x0000000081c00000,0x0000000081e48f58,0x0000000089a80000)
         Metaspace used 9654K, capacity 9888K, committed 10240K, reserved 1058816K
          class space used 1295K, capacity 1410K, committed 1536K, reserved 1048576K
        }

        Deoptimization events (4 events):
        Event: 0.810 Thread 0x000000000228f800 Uncommon trap: reason=class_check action=maybe_recompile pc=0x000000000f2b5840 method=java.util.concurrent.ConcurrentHashMap.get(Ljava/lang/Object;)Ljava/lang/Object; @ 73
        Event: 0.970 Thread 0x000000000228f800 Uncommon trap: reason=class_check action=maybe_recompile pc=0x000000000f2b5840 method=java.util.concurrent.ConcurrentHashMap.get(Ljava/lang/Object;)Ljava/lang/Object; @ 73
        Event: 0.970 Thread 0x000000000228f800 Uncommon trap: reason=class_check action=maybe_recompile pc=0x000000000f2b5840 method=java.util.concurrent.ConcurrentHashMap.get(Ljava/lang/Object;)Ljava/lang/Object; @ 73
        Event: 0.973 Thread 0x000000000228f800 Uncommon trap: reason=class_check action=maybe_recompile pc=0x000000000f2b5840 method=java.util.concurrent.ConcurrentHashMap.get(Ljava/lang/Object;)Ljava/lang/Object; @ 73

        Internal exceptions (10 events):
        Event: 0.850 Thread 0x000000000228f800 Exception <a 'java/lang/IncompatibleClassChangeError': Found class java.lang.Object, but interface was expected> (0x00000000d61f8800) thrown at [D:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u5\2488\hotspot\src\share\vm\interpreter\linkResolver.cpp, l/&Ā®n¤ė?
        Event: 0.864 Thread 0x000000000228f800 Exception <a 'java/lang/IncompatibleClassChangeError': Found class java.lang.Object, but interface was expected> (0x00000000d626a848) thrown at [D:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u5\2488\hotspot\src\share\vm\interpreter\linkResolver.cpp, lŁ› ˛ģHģ?
        Event: 0.884 Thread 0x000000000228f800 Exception <a 'java/lang/ClassNotFoundException': jdk/nashorn/internal/runtime/ScriptFunction> (0x00000000d634ec60) thrown at [D:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u5\2488\hotspot\src\share\vm\classfile\systemDictionary.cpp, line 202]
        Event: 0.901 Thread 0x000000000228f800 Exception <a 'java/security/PrivilegedActionException'> (0x00000000d6413858) thrown at [D:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u5\2488\hotspot\src\share\vm\prims\jvm.cpp, line 1248]
        Event: 0.901 Thread 0x000000000228f800 Exception <a 'java/security/PrivilegedActionException'> (0x00000000d6414538) thrown at [D:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u5\2488\hotspot\src\share\vm\prims\jvm.cpp, line 1248]
        Event: 0.903 Thread 0x000000000228f800 Exception <a 'java/security/PrivilegedActionException'> (0x00000000d641db08) thrown at [D:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u5\2488\hotspot\src\share\vm\prims\jvm.cpp, line 1248]
        Event: 0.903 Thread 0x000000000228f800 Exception <a 'java/security/PrivilegedActionException'> (0x00000000d641e800) thrown at [D:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u5\2488\hotspot\src\share\vm\prims\jvm.cpp, line 1248]
        Event: 0.925 Thread 0x000000000228f800 Exception <a 'java/lang/IncompatibleClassChangeError': Found class java.lang.Object, but interface was expected> (0x00000000d64cb468) thrown at [D:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u5\2488\hotspot\src\share\vm\interpreter\linkResolver.cpp, lyą‚‚0ī?
        Event: 0.943 Thread 0x000000000228f800 Exception <a 'java/lang/IncompatibleClassChangeError': Found class java.lang.Object, but interface was expected> (0x00000000d5f00c88) thrown at [D:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u5\2488\hotspot\src\share\vm\interpreter\linkResolver.cpp, l¼_–·rFī?
        Event: 0.946 Thread 0x000000000228f800 Exception <a 'java/lang/IncompatibleClassChangeError': Expected static method jdk.nashorn.internal.runtime.ScriptObject.get(D)Ljava/lang/Object;> (0x00000000d5f1e868) thrown at [D:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u5\2488\hotspot\src\share\v„3p:É1ė?

        Events (10 events):
        Event: 0.970 Thread 0x000000000228f800 DEOPT PACKING pc=0x000000000f2b5840 sp=0x000000000260d1c0
        Event: 0.970 Thread 0x000000000228f800 DEOPT UNPACKING pc=0x000000000f0555af sp=0x000000000260d148 mode 2
        Event: 0.970 Thread 0x000000000228f800 Uncommon trap: trap_request=0xffffffde fr.pc=0x000000000f2b5840
        Event: 0.970 Thread 0x000000000228f800 DEOPT PACKING pc=0x000000000f2b5840 sp=0x000000000260d1c0
        Event: 0.970 Thread 0x000000000228f800 DEOPT UNPACKING pc=0x000000000f0555af sp=0x000000000260d148 mode 2
        Event: 0.973 Thread 0x000000000228f800 Uncommon trap: trap_request=0xffffffde fr.pc=0x000000000f2b5840
        Event: 0.973 Thread 0x000000000228f800 DEOPT PACKING pc=0x000000000f2b5840 sp=0x000000000260d1c0
        Event: 0.973 Thread 0x000000000228f800 DEOPT UNPACKING pc=0x000000000f0555af sp=0x000000000260d148 mode 2
        Event: 0.977 loading class java/lang/invoke/MethodHandleImpl$1
        Event: 0.977 loading class java/lang/invoke/MethodHandleImpl$1 done


        Dynamic libraries:
        0x000000013f9d0000 - 0x000000013fa04000 C:\Progra~1\Java\jdk1.8.0_05\bin\java.exe
        0x0000000077660000 - 0x0000000077809000 C:\Windows\SYSTEM32\ntdll.dll
        0x0000000077540000 - 0x000000007765f000 C:\Windows\system32\kernel32.dll
        0x000007fefd680000 - 0x000007fefd6eb000 C:\Windows\system32\KERNELBASE.dll
        0x000007fefe570000 - 0x000007fefe64b000 C:\Windows\system32\ADVAPI32.dll
        0x000007fefe230000 - 0x000007fefe2cf000 C:\Windows\system32\msvcrt.dll
        0x000007fefe550000 - 0x000007fefe56f000 C:\Windows\SYSTEM32\sechost.dll
        0x000007fefd960000 - 0x000007fefda8d000 C:\Windows\system32\RPCRT4.dll
        0x0000000077440000 - 0x000000007753a000 C:\Windows\system32\USER32.dll
        0x000007feff900000 - 0x000007feff967000 C:\Windows\system32\GDI32.dll
        0x000007fefd870000 - 0x000007fefd87e000 C:\Windows\system32\LPK.dll
        0x000007fefe430000 - 0x000007fefe4f9000 C:\Windows\system32\USP10.dll
        0x000007fefbbf0000 - 0x000007fefbde4000 C:\Windows\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.7601.17514_none_fa396087175ac9ac\COMCTL32.dll
        0x000007fefdcf0000 - 0x000007fefdd61000 C:\Windows\system32\SHLWAPI.dll
        0x000007fefd840000 - 0x000007fefd86e000 C:\Windows\system32\IMM32.DLL
        0x000007feff3f0000 - 0x000007feff4f9000 C:\Windows\system32\MSCTF.dll
        0x000007fefd3d0000 - 0x000007fefd40c000 C:\Windows\system32\nvinitx.dll
        0x000000000f000000 - 0x000000000f006000 C:\Program Files\NVIDIA Corporation\CoProcManager\_etoured.dll
        0x000007feefe80000 - 0x000007feefec4000 C:\Program Files\NVIDIA Corporation\CoProcManager\nvd3d9wrapx.dll
        0x000007feff720000 - 0x000007feff8f7000 C:\Windows\system32\SETUPAPI.dll
        0x000007fefd640000 - 0x000007fefd676000 C:\Windows\system32\CFGMGR32.dll
        0x000007fefd880000 - 0x000007fefd957000 C:\Windows\system32\OLEAUT32.dll
        0x000007fefe020000 - 0x000007fefe223000 C:\Windows\system32\ole32.dll
        0x000007fefd820000 - 0x000007fefd83a000 C:\Windows\system32\DEVOBJ.dll
        0x000007feefe30000 - 0x000007feefe72000 C:\Program Files\NVIDIA Corporation\CoProcManager\nvdxgiwrapx.dll
        0x0000000050850000 - 0x0000000050922000 C:\Progra~1\Java\jdk1.8.0_05\jre\bin\msvcr100.dll
        0x000000006f400000 - 0x000000006fc2a000 C:\Progra~1\Java\jdk1.8.0_05\jre\bin\server\jvm.dll
        0x000007fefcce0000 - 0x000007fefcce9000 C:\Windows\system32\WSOCK32.dll
        0x000007fefe500000 - 0x000007fefe54d000 C:\Windows\system32\WS2_32.dll
        0x000007fefe650000 - 0x000007fefe658000 C:\Windows\system32\NSI.dll
        0x000007fefaf30000 - 0x000007fefaf6b000 C:\Windows\system32\WINMM.dll
        0x0000000077820000 - 0x0000000077827000 C:\Windows\system32\PSAPI.DLL
        0x0000000072730000 - 0x000000007273f000 C:\Progra~1\Java\jdk1.8.0_05\jre\bin\verify.dll
        0x0000000072700000 - 0x0000000072728000 C:\Progra~1\Java\jdk1.8.0_05\jre\bin\java.dll
        0x00000000726c0000 - 0x00000000726e3000 C:\Progra~1\Java\jdk1.8.0_05\jre\bin\instrument.dll
        0x00000000726a0000 - 0x00000000726b6000 C:\Progra~1\Java\jdk1.8.0_05\jre\bin\zip.dll
        0x000007fefe660000 - 0x000007feff3e8000 C:\Windows\system32\SHELL32.dll
        0x000007fefd410000 - 0x000007fefd41f000 C:\Windows\system32\profapi.dll
        0x000007fef9800000 - 0x000007fef9925000 C:\Windows\system32\dbghelp.dll

        VM Arguments:
        jvm_args: -javaagent:C:\work\temp\maven-examples-master\javaagent\target\loggingagent-0.0.1-SNAPSHOT.jar
        java_command: Test
        java_class_path (initial): .;C:\work\temp\maven-examples-master\javaagent\target\loggingagent-0.0.1-SNAPSHOT.jar
        Launcher Type: SUN_STANDARD

        Environment Variables:
        JAVA_HOME=C:\Progra~1\Java\jdk1.8.0_05
        PATH=C:\Progra~1\Java\jdk1.8.0_05\bin;C:\Progra~1\Java\jdk1.8.0\bin;C:\Program Files (x86)\GnuWin32\bin;C:\Program Files (x86)\EasyPHP-DevServer-13.1VC9\binaries\php\php_runningversion;C:\Program Files (x86)\Estonian ID Card\;C:\Python27\Scripts;C:\Python27;C:\Program Files\Dell\DW WLAN Card;C:\Progra~1\Java\jdk1.7.0\bin;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\WIDCOMM\Bluetooth Software\;C:\Program Files\WIDCOMM\Bluetooth Software\syswow64;C:\Program Files\Intel\DMIX;C:\Program Files (x86)\Intel\Services\IPT\;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files (x86)\Common Files\Roxio Shared\DLLShared\;C:\Program Files (x86)\Common Files\Roxio Shared\OEM\DLLShared\;C:\Program Files (x86)\Common Files\Roxio Shared\OEM\DLLShared\;C:\Program Files (x86)\Common Files\Roxio Shared\OEM\12.0\DLLShared\;C:\Program Files (x86)\Roxio\OEM\AudioCore\;C:\Program Files (x86)\NTRU Cryptosystems\NTRU TCG Software Stack\bin\;C:\Program Files\NTRU Cryptosystems\NTRU TCG Software Stack\bin\;C:\Program Files\Dell\Dell Data Protection\Access\Advanced\Wave\Gemalto\Access Client\v5\;C:\PROGRA~1\apache-maven-3.0.3\bin;C:\Program Files\groovy-2.2.1\bin;C:\Progra~1\apache-ant-1.9.2\bin;C:\Program Files\SlikSvn\bin;C:\Program Files\Windows Imaging\;C:\ATG\ATG10.1\MySQL\win32\bin;C:\ATG\ATG10.1_blog\MySQL\win32\bin;C:\Program Files (x86)\Git\cmd;C:\Program Files\TortoiseHg\;C:\Program Files (x86)\nodejs\;C:\Users\Andres\AppData\Roaming\npm
        USERNAME=Andres
        OS=Windows_NT
        PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 42 Stepping 7, GenuineIntel



        --------------- S Y S T E M ---------------

        OS: Windows 7 , 64 bit Build 7601 Service Pack 1

        CPU:total 4 (2 cores per cpu, 2 threads per core) family 6 model 42 stepping 7, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, avx, aes, clmul, ht, tsc, tscinvbit

        Memory: 4k page, physical 8266648k(1557216k free), swap 16807824k(4174196k free)

        vm_info: Java HotSpot(TM) 64-Bit Server VM (25.5-b02) for windows-amd64 JRE (1.8.0_05-b13), built on Mar 18 2014 01:08:39 by "java_re" with MS VC++ 10.0 (VS2010)

        time: Thu Apr 17 14:45:17 2014
        elapsed time: 1 seconds



        REPRODUCIBILITY :
        This bug can be reproduced always.

        ---------- BEGIN SOURCE ----------
        import java.lang.instrument.Instrumentation;

        public class CrashAgent {

            public static void premain( final String agentArgument, final Instrumentation instrumentation ) {
        try {
        Class.forName("java.lang.invoke.CallSite");
        }
        catch (Throwable t) {}
            }
        }
        import javax.script.*;
        public class Test {
          public static void main(String[] args) throws Exception {
            new Test().test();
          }
          public void test() throws Exception {
            System.out.println("Start Nashorn");
            ScriptEngineManager manager = new ScriptEngineManager();
            ScriptEngine engine = manager.getEngineByName("nashorn");
            System.out.println("Nashorn found: " + manager + " -> " + (engine != null));

            try {
              for (int i = 0; i < 1000; i++) {
                String js;
                js = "var map = Array.prototype.map \n";
                js += "var names = [\"john\", \"jerry\", \"bob\"]\n";
                js += "var a = map.call(names, function(name) { return name.length() })\n";
                js += "print(a)";
                engine.eval(js);
                if (i % 100 == 0) {
                  System.out.println("Nashorn stage " + i);
                }
              }
            }
            catch (Exception e) {
              e.printStackTrace();
              throw e;
            }
            System.out.println("Nashorn done");
          }
        }
        ---------- END SOURCE ----------

        CUSTOMER SUBMITTED WORKAROUND :
        use a JVM flag:
        -XX:CompileCommand=exclude,java/lang/invoke/LambdaForm$*.invoke*

          Attachments

          1. CrashAgent.java
            0.3 kB
          2. hs_err_pid12633.log
            26 kB
          3. MANIFEST
            0.0 kB
          4. Test.java
            0.9 kB

            Issue Links

              Activity

                People

                • Assignee:
                  vlivanov Vladimir Ivanov
                  Reporter:
                  webbuggrp Webbug Group
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  7 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: