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

Setting a breakpoint on invokedynamic crashes the JVM

XMLWordPrintable

    • b57
    • windows_8
    • Verified

        FULL PRODUCT VERSION :
        java version "1.8.0-ea"
        Java(TM) SE Runtime Environment (build 1.8.0-ea-lambda-nightly-h109-20130902-b106-b00)
        Java HotSpot(TM) 64-Bit Server VM (build 25.0-b45, mixed mode)


        FULL OS VERSION :
        Microsoft Windows [Version 6.2.9200]

        EXTRA RELEVANT SYSTEM CONFIGURATION :
        used Lambda Build eclipse obtained from
        http://downloads.efxclipse.org/eclipse-java8/2013-09-13/org.eclipse.sdk.ide-win32.win32.x86_64.zip


        A DESCRIPTION OF THE PROBLEM :
        dubugging a Lambda code caused the JVM to crash.
        Used Eclipse Lambda build.

        Eclipse:
        installed jar = 1.8
        JDK Compliance(all) set to 1.8(BETA)

        THE PROBLEM WAS REPRODUCIBLE WITH -Xint FLAG: Yes

        THE PROBLEM WAS REPRODUCIBLE WITH -server FLAG: Did not try

        REGRESSION. Last worked in version 8

        STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
        debug the code pasted below
        put a breakpoint on following line
        Runnable r = () -> {};


        EXPECTED VERSUS ACTUAL BEHAVIOR :
        com.sat.lamda.demo.MainApp$$Lambda$1@2a84aee7
        com.sat.lamda.demo.MainApp$$Lambda$1@2a84aee7
        ERROR MESSAGES/STACK TRACES THAT OCCUR :
        #
        # A fatal error has been detected by the Java Runtime Environment:
        #
        # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00000000038d6a4c, pid=60980, tid=59124
        #
        # JRE version: Java(TM) SE Runtime Environment (8.0) (build 1.8.0-ea-lambda-nightly-h109-20130902-b106-b00)
        # Java VM: Java HotSpot(TM) 64-Bit Server VM (25.0-b45 mixed mode windows-amd64 compressed oops)
        # Problematic frame:
        # j com.sat.lamda.demo.MainApp.main([Ljava/lang/String;)V+0
        #
        # 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 (0x0000000002b6e000): JavaThread "main" [_thread_in_Java, id=59124, stack(0x0000000002bf0000,0x0000000002cf0000)]

        siginfo: ExceptionCode=0xc0000005, reading address 0x00000000036d04f8

        Registers:
        RAX=0x00000007d60fe7f0, RBX=0x00000000034d05b0, RCX=0x000000000003ffe4, RDX=0x0000000000000004
        RSP=0x0000000002cef1b8, RBP=0x0000000002cef200, RSI=0x0000000002b6e000, RDI=0x00000000038d6198
        R8 =0x0000000000000004, R9 =0x0000000002b67f20, R10=0x0000000000000000, R11=0x0000000002cef120
        R12=0x0000000000000000, R13=0x00000000034d0400, R14=0x0000000002cef220, R15=0x0000000002b6e000
        RIP=0x00000000038d6a4c, EFLAGS=0x0000000000010206

          Top of Stack: (sp=0x0000000002cef1b8)
        0x0000000002cef1b8: 00000007d60fe800 0000000002cef1c0
        0x0000000002cef1c8: 00000000034d0400 0000000002cef220
        0x0000000002cef1d8: 00000000034d05b0 0000000000000000
        0x0000000002cef1e8: 00000000034d0450 0000000000000000
        0x0000000002cef1f8: 0000000002cef220 0000000002cef300
        0x0000000002cef208: 00000000038d061a 0000000000000000
        0x0000000002cef218: 0000000000000000 00000007d5ea17a0
        0x0000000002cef228: 0000000000000000 0000000000000000
        0x0000000002cef238: 0000000000000000 0000000000000000
        0x0000000002cef248: 0000000000000000 0000000000000000
        0x0000000002cef258: 0000000000000000 0000000000000000
        0x0000000002cef268: 0000000000000000 0000000000000000
        0x0000000002cef278: 0000000000000000 0000000000000000
        0x0000000002cef288: 0000000000000000 0000000000000000
        0x0000000002cef298: 0000000000000000 0000000000000000
        0x0000000002cef2a8: 0000000000000000 0000000000000000

        Instructions: (pc=0x00000000038d6a4c)
        0x00000000038d6a2c: 00 4c 8b 6d c8 4c 8b 75 d0 41 80 7d 00 ba 0f 84
        0x00000000038d6a3c: 31 00 00 00 41 0f b7 4d 01 48 8b 5d d8 c1 e1 02
        0x00000000038d6a4c: 8b 5c cb 28 81 e3 ff 00 00 00 48 8d 24 dc 41 0f
        0x00000000038d6a5c: b6 5d 05 49 83 c5 05 49 ba 50 3f 05 58 00 00 00


        Register to memory mapping:

        RAX=0x00000007d60fe7f0 is an oop
        com.sat.lamda.demo.MainApp$$Lambda$1
         - klass: 'com/sat/lamda/demo/MainApp$$Lambda$1'
        RBX=0x00000000034d05b0 is an unknown value
        RCX=0x000000000003ffe4 is an unknown value
        RDX=0x0000000000000004 is an unknown value
        RSP=0x0000000002cef1b8 is pointing into the stack for thread: 0x0000000002b6e000
        RBP=0x0000000002cef200 is pointing into the stack for thread: 0x0000000002b6e000
        RSI=0x0000000002b6e000 is a thread
        RDI=0x00000000038d6198 is at code_begin+2520 in an Interpreter codelet
        return entry points [0x00000000038d57c0, 0x00000000038d75c0] 7680 bytes
        R8 =0x0000000000000004 is an unknown value
        R9 =0x0000000002b67f20 is an unknown value
        R10=0x0000000000000000 is an unknown value
        R11=0x0000000002cef120 is pointing into the stack for thread: 0x0000000002b6e000
        R12=0x0000000000000000 is an unknown value
        R13=0x00000000034d0400 is an unknown value
        R14=0x0000000002cef220 is pointing into the stack for thread: 0x0000000002b6e000
        R15=0x0000000002b6e000 is a thread


        Stack: [0x0000000002bf0000,0x0000000002cf0000], sp=0x0000000002cef1b8, free space=1020k
        Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
        j com.sat.lamda.demo.MainApp.main([Ljava/lang/String;)V+0
        v ~StubRoutines::call_stub
        V [jvm.dll+0x1f28d3]


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

        Java Threads: ( => current thread )
          0x000000001a0b3800 JavaThread "Service Thread" daemon [_thread_blocked, id=58608, stack(0x000000001af20000,0x000000001b020000)]
          0x000000001a0a8000 JavaThread "C1 CompilerThread3" daemon [_thread_blocked, id=57980, stack(0x000000001ae20000,0x000000001af20000)]
          0x000000001a0a7000 JavaThread "C2 CompilerThread2" daemon [_thread_blocked, id=56832, stack(0x000000001ad20000,0x000000001ae20000)]
          0x000000001a0a4800 JavaThread "C2 CompilerThread1" daemon [_thread_blocked, id=60508, stack(0x000000001ac20000,0x000000001ad20000)]
          0x000000001a09f000 JavaThread "C2 CompilerThread0" daemon [_thread_blocked, id=59888, stack(0x000000001ab20000,0x000000001ac20000)]
          0x000000001a08e000 JavaThread "JDWP Command Reader" daemon [_thread_in_native, id=60868, stack(0x000000001aa20000,0x000000001ab20000)]
          0x000000001a08d000 JavaThread "JDWP Event Helper Thread" daemon [_thread_blocked, id=61620, stack(0x000000001a920000,0x000000001aa20000)]
          0x000000001806b000 JavaThread "JDWP Transport Listener: dt_socket" daemon [_thread_blocked, id=61256, stack(0x000000001a820000,0x000000001a920000)]
          0x0000000018063800 JavaThread "Attach Listener" daemon [_thread_blocked, id=61996, stack(0x000000001a560000,0x000000001a660000)]
          0x000000001a080800 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=60580, stack(0x000000001a460000,0x000000001a560000)]
          0x00000000030c5800 JavaThread "Finalizer" daemon [_thread_blocked, id=62372, stack(0x0000000019f50000,0x000000001a050000)]
          0x000000001805a800 JavaThread "Reference Handler" daemon [_thread_blocked, id=62440, stack(0x0000000019e50000,0x0000000019f50000)]
        =>0x0000000002b6e000 JavaThread "main" [_thread_in_Java, id=59124, stack(0x0000000002bf0000,0x0000000002cf0000)]

        Other Threads:
          0x0000000018057000 VMThread [stack: 0x0000000019d50000,0x0000000019e50000] [id=61544]
          0x000000001a0c0800 WatcherThread [stack: 0x000000001b020000,0x000000001b120000] [id=60424]

        VM state:not at safepoint (normal execution)

        VM Mutex/Monitor currently owned by a thread: None

        Heap:
         PSYoungGen total 38400K, used 3328K [0x00000007d5e00000, 0x00000007d8880000, 0x0000000800000000)
          eden space 33280K, 10% used [0x00000007d5e00000,0x00000007d61400b0,0x00000007d7e80000)
          from space 5120K, 0% used [0x00000007d8380000,0x00000007d8380000,0x00000007d8880000)
          to space 5120K, 0% used [0x00000007d7e80000,0x00000007d7e80000,0x00000007d8380000)
         ParOldGen total 86016K, used 0K [0x0000000781a00000, 0x0000000786e00000, 0x00000007d5e00000)
          object space 86016K, 0% used [0x0000000781a00000,0x0000000781a00000,0x0000000786e00000)
         Metaspace total 4586K, used 3626K, reserved 110592K
          data space 4150K, used 3224K, reserved 8192K
          class space 436K, used 401K, reserved 102400K

        Card table byte_map: [0x0000000012c90000,0x0000000013090000] byte_map_base: 0x000000000f083000

        Marking Bits: (ParMarkBitMap*) 0x0000000058062ee0
         Begin Bits: [0x0000000013b40000, 0x0000000015ad8000)
         End Bits: [0x0000000015ad8000, 0x0000000017a70000)

        Polling page: 0x00000000014f0000

        CodeCache: size=245760Kb used=1123Kb max_used=1123Kb free=244636Kb
         bounds [0x00000000038d0000, 0x0000000003b40000, 0x00000000128d0000]
         total_blobs=330 nmethods=85 adapters=169
         compilation: enabled

        Compilation events (10 events):
        Event: 0.138 Thread 0x000000001a0a8000 nmethod 38 0x00000000039d8f50 code [0x00000000039d90e0, 0x00000000039d95c8]
        Event: 0.138 Thread 0x000000001a0a8000 40 3 java.util.HashMap$Node::<init> (26 bytes)
        Event: 0.138 Thread 0x000000001a0a8000 nmethod 40 0x00000000039d6050 code [0x00000000039d61c0, 0x00000000039d63f0]
        Event: 0.138 Thread 0x000000001a0a8000 39 3 java.util.HashMap::getNode (148 bytes)
        Event: 0.138 Thread 0x000000001a0a8000 nmethod 39 0x00000000039da010 code [0x00000000039da1e0, 0x00000000039dabe8]
        Event: 0.139 Thread 0x000000001a0a8000 33 3 java.util.HashMap::put (13 bytes)
        Event: 0.139 Thread 0x000000001a0a8000 nmethod 33 0x00000000039dbfd0 code [0x00000000039dc160, 0x00000000039dc558]
        Event: 0.139 Thread 0x000000001a0a8000 35 3 java.util.HashMap::newNode (13 bytes)
        Event: 0.139 Thread 0x000000001a0a8000 nmethod 35 0x00000000039dba10 code [0x00000000039dbb80, 0x00000000039dbe70]
        Event: 0.142 Thread 0x000000001a0a4800 nmethod 36 0x00000000039db410 code [0x00000000039db560, 0x00000000039db878]

        GC Heap History (0 events):
        No events

        Deoptimization events (0 events):
        No events

        Internal exceptions (7 events):
        Event: 0.026 Thread 0x0000000002b6e000 Exception <a 'java/lang/NoSuchMethodError': Method sun.misc.Unsafe.defineClass(Ljava/lang/String;[BII)Ljava/lang/Class; name or signature does not match> (0x00000007d5e0da00) thrown at [C:\re\jdk8-lambda\109\hotspot\src\share\vm\prims\jni.cpp, line 3968]
        Event: 0.026 Thread 0x0000000002b6e000 Exception <a 'java/lang/NoSuchMethodError': Method sun.misc.Unsafe.prefetchRead(Ljava/lang/Object;J)V name or signature does not match> (0x00000007d5e0dc90) thrown at [C:\re\jdk8-lambda\109\hotspot\src\share\vm\prims\jni.cpp, line 3968]
        Event: 0.138 Thread 0x0000000002b6e000 Exception <a 'java/security/PrivilegedActionException'> (0x00000007d5e9c3a0) thrown at [C:\re\jdk8-lambda\109\hotspot\src\share\vm\prims\jvm.cpp, line 1249]
        Event: 3.959 Thread 0x0000000002b6e000 Exception <a 'java/lang/ClassNotFoundException': java/lang/Null> (0x00000007d600c5d0) thrown at [C:\re\jdk8-lambda\109\hotspot\src\share\vm\classfile\systemDictionary.cpp, line 202]
        Event: 4.247 Thread 0x0000000002b6e000 Exception <a 'java/lang/NoSuchFieldError': method resolution failed> (0x00000007d60a6b20) thrown at [C:\re\jdk8-lambda\109\hotspot\src\share\vm\prims\methodHandles.cpp, line 1167]
        Event: 4.281 Thread 0x0000000002b6e000 Exception <a 'java/lang/NoSuchFieldError': method resolution failed> (0x00000007d60b5590) thrown at [C:\re\jdk8-lambda\109\hotspot\src\share\vm\prims\methodHandles.cpp, line 1167]
        Event: 4.287 Thread 0x0000000002b6e000 Exception <a 'java/lang/NoSuchFieldError': method resolution failed> (0x00000007d60b8418) thrown at [C:\re\jdk8-lambda\109\hotspot\src\share\vm\prims\methodHandles.cpp, line 1167]

        Events (10 events):
        Event: 4.413 loading class java/lang/invoke/InnerClassLambdaMetafactory$1
        Event: 4.413 loading class java/lang/invoke/InnerClassLambdaMetafactory$1 done
        Event: 15.315 loading class java/lang/invoke/InnerClassLambdaMetafactory$2
        Event: 15.315 loading class java/lang/invoke/InnerClassLambdaMetafactory$2 done
        Event: 15.326 Executing VM operation: ChangeSingleStep
        Event: 15.326 Executing VM operation: ChangeSingleStep done
        Event: 15.326 Executing VM operation: GetCurrentLocation
        Event: 15.326 Executing VM operation: GetCurrentLocation done
        Event: 15.327 Executing VM operation: ChangeSingleStep
        Event: 15.327 Executing VM operation: ChangeSingleStep done


        Dynamic libraries:
        0x000007f79ccd0000 - 0x000007f79cd04000 C:\Apps\Java\JDK\jdk1.8.0\bin\javaw.exe
        0x000007f8827e0000 - 0x000007f8829a0000 C:\Windows\SYSTEM32
        tdll.dll
        0x000007f882540000 - 0x000007f882676000 C:\Windows\system32\KERNEL32.DLL
        0x000007f87f9c0000 - 0x000007f87fab3000 C:\Windows\system32\KERNELBASE.dll
        0x000007f87e4c0000 - 0x000007f87e55f000 C:\Windows\system32\apphelp.dll
        0x000007f881830000 - 0x000007f88190e000 C:\Windows\system32\ADVAPI32.dll
        0x000007f87fd40000 - 0x000007f87fe8c000 C:\Windows\system32\USER32.dll
        0x000007f87baa0000 - 0x000007f87bd0a000 C:\Windows\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.9200.16579_none_418ab7ef718b27ef\COMCTL32.dll
        0x000007f87fbd0000 - 0x000007f87fc75000 C:\Windows\system32\msvcrt.dll
        0x000007f881e70000 - 0x000007f881eb8000 C:\Windows\SYSTEM32\sechost.dll
        0x000007f881510000 - 0x000007f881655000 C:\Windows\system32\RPCRT4.dll
        0x000007f880040000 - 0x000007f880181000 C:\Windows\system32\GDI32.dll
        0x000007f8824a0000 - 0x000007f8824d9000 C:\Windows\system32\IMM32.DLL
        0x000007f881ab0000 - 0x000007f881bc5000 C:\Windows\system32\MSCTF.dll
        0x00000000580e0000 - 0x00000000581b1000 C:\Apps\Java\JDK\jdk1.8.0\jre\bin\msvcr100.dll
        0x00000000578d0000 - 0x00000000580da000 C:\Apps\Java\JDK\jdk1.8.0\jre\bin\server\jvm.dll
        0x000007f877d90000 - 0x000007f877d99000 C:\Windows\SYSTEM32\WSOCK32.dll
        0x000007f87d190000 - 0x000007f87d1b0000 C:\Windows\SYSTEM32\WINMM.dll
        0x000007f880030000 - 0x000007f880037000 C:\Windows\system32\PSAPI.DLL
        0x000007f8824e0000 - 0x000007f882538000 C:\Windows\system32\WS2_32.dll
        0x000007f87d150000 - 0x000007f87d183000 C:\Windows\SYSTEM32\WINMMBASE.dll
        0x000007f881e60000 - 0x000007f881e69000 C:\Windows\system32\NSI.dll
        0x000007f87f790000 - 0x000007f87f7df000 C:\Windows\SYSTEM32\cfgmgr32.dll
        0x000007f87f760000 - 0x000007f87f782000 C:\Windows\system32\DEVOBJ.dll
        0x00000000587c0000 - 0x00000000587cf000 C:\Apps\Java\JDK\jdk1.8.0\jre\bin\verify.dll
        0x00000000578a0000 - 0x00000000578c8000 C:\Apps\Java\JDK\jdk1.8.0\jre\bin\java.dll
        0x0000000057860000 - 0x0000000057895000 C:\Apps\Java\JDK\jdk1.8.0\jre\bin\jdwp.dll
        0x0000000057850000 - 0x0000000057858000 C:\Apps\Java\JDK\jdk1.8.0\jre\bin
        pt.dll
        0x0000000057830000 - 0x0000000057846000 C:\Apps\Java\JDK\jdk1.8.0\jre\bin\zip.dll
        0x000007f880230000 - 0x000007f881510000 C:\Windows\system32\SHELL32.dll
        0x000007f882220000 - 0x000007f8823d0000 C:\Windows\SYSTEM32\combase.dll
        0x000007f8823e0000 - 0x000007f882430000 C:\Windows\system32\SHLWAPI.dll
        0x000007f87e740000 - 0x000007f87e7d6000 C:\Windows\SYSTEM32\SHCORE.dll
        0x000007f87f690000 - 0x000007f87f6a5000 C:\Windows\SYSTEM32\profapi.dll
        0x0000000057820000 - 0x0000000057829000 C:\Apps\Java\JDK\jdk1.8.0\jre\bin\dt_socket.dll
        0x000007f876120000 - 0x000007f876134000 C:\Windows\system32
        apinsp.dll
        0x000007f876140000 - 0x000007f876158000 C:\Windows\system32\pnrpnsp.dll
        0x000007f87de10000 - 0x000007f87de26000 C:\Windows\system32\NLAapi.dll
        0x000007f87eee0000 - 0x000007f87ef3c000 C:\Windows\System32\mswsock.dll
        0x000007f87ed20000 - 0x000007f87edb8000 C:\Windows\SYSTEM32\DNSAPI.dll
        0x000007f876160000 - 0x000007f876172000 C:\Windows\System32\winrnr.dll
        0x0000000059590000 - 0x00000000595b6000 C:\Program Files\Bonjour\mdnsNSP.dll
        0x000007f87c910000 - 0x000007f87c93a000 C:\Windows\SYSTEM32\Iphlpapi.DLL
        0x000007f87c900000 - 0x000007f87c90a000 C:\Windows\SYSTEM32\WINNSI.DLL
        0x000007f876720000 - 0x000007f876734000 C:\Windows\system32\wshbth.dll
        0x000007f879960000 - 0x000007f8799c1000 C:\Windows\System32\fwpuclnt.dll
        0x000007f876610000 - 0x000007f876618000 C:\Windows\System32\rasadhlp.dll
        0x000007f87d3e0000 - 0x000007f87d543000 C:\Windows\SYSTEM32\dbghelp.dll

        VM Arguments:
        jvm_args: -agentlib:jdwp=transport=dt_socket,suspend=y,address=localhost:54769 -Dfile.encoding=Cp1252
        java_command: com.sat.lamda.demo.MainApp
        java_class_path (initial): C:\Apps\Java\workspace\eclipse.lambda\lambdademo\bin
        Launcher Type: SUN_STANDARD

        Environment Variables:
        JAVA_HOME=C:\Apps\Java\JDK\jdk1.6.0_37
        JRE_HOME=C:\Apps\Java\JRE\jre6
        USERNAME=sat
        OS=Windows_NT
        PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 58 Stepping 9, GenuineIntel



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

        OS: Windows 8 , 64 bit Build 9200

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

        Memory: 4k page, physical 8275220k(3749212k free), swap 9520404k(4233324k free)

        vm_info: Java HotSpot(TM) 64-Bit Server VM (25.0-b45) for windows-amd64 JRE (1.8.0-ea-lambda-nightly-h109-20130902-b106-b00), built on Sep 2 2013 17:05:33 by "java_re" with MS VC++ 10.0 (VS2010)

        time: Tue Oct 01 22:41:24 2013
        elapsed time: 15 seconds



        REPRODUCIBILITY :
        This bug can be reproduced always.

        ---------- BEGIN SOURCE ----------
        public class MainApp {

        public static void main(String[] args) {
        Runnable r = () -> {};
        Object o = r;
        System.out.println(r.toString());
        System.out.println(r.toString());

        }

        }
        ---------- END SOURCE ----------

          1. 8026328-suggested-fix.patch
            2 kB
          2. cagent.c
            2 kB
          3. MainApp.java
            0.2 kB

              twisti Christian Thalinger (Inactive)
              dmeetry Dmeetry Degrave (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              11 Start watching this issue

                Created:
                Updated:
                Resolved: