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

Exception inside jvm.dll when call exit



    • Subcomponent:
    • CPU:
    • OS:


      java version "1.8.0_66"
      Java(TM) SE Runtime Environment (build 1.8.0_66-b18)
      Java HotSpot(TM) Client VM (build 25.66-b18, mixed mode, sharing)


      OS: Windows 7 , 64 bit Build 7601 (6.1.7601.19045)

      CPU:total 8 (4 cores per cpu, 2 threads per core) family 6 model 26 stepping 5, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcn

      We testing our system that generates a dll that is loaded into Java by System.LoadLibrary . The full Java code below. The exception is in the call to exit in the last line, otherwise the test works. In particular, all the calls to the method com.lispwokrs.LispCalls.* are executed as expected.

      The lispworks-in-java dll starts some threads (should be two). When the DLL-QUIT calls happens, the thread are terminated before the exit, otherwise they are still alive. Does not make any difference.

      Does not happen with 65 bits.


      package com.lispworks.testsuite ;

      public class LispWorksCaller
      static { System.loadLibrary("lispworks-in-java"); }

      // Note that the strings are checked by the test (java-lispcalls-tests "Lisp as dll")
      public static void main(String [ ] args)

        System.out.format("Lisp is being called%n");
        boolean before = com.lispworks.LispCalls.waitForInitialization(500, java.util.concurrent.TimeUnit.MILLISECONDS) ;
        System.out.format("Adding 1 and 2 returned: %d%n", com.lispworks.LispCalls.callIntV("+", 1, 2));
        System.out.format("STRING-APPEND of 1 and 2 returned: %s%n", com.lispworks.LispCalls.callObjectV("STRING-APPEND", "1", "2"));
        boolean after = com.lispworks.LispCalls.waitForInitialization(1) ;
         System.out.format ("Before %b after %b%n", before, after) ;
        if (! com.lispworks.LispCalls.checkLispSymbol("CL-USER::DELAYING-FUNC", true) )
           com.lispworks.LispCalls.callObjectV("DLL-QUIT") ;
        else { try { java.lang.Thread.sleep (5000) ; } catch (Exception ex) {} ; }

        java.lang.System.exit(0) ;



      # A fatal error has been detected by the Java Runtime Environment:
      # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x5a588479, pid=8660, tid=7840
      # JRE version: Java(TM) SE Runtime Environment (8.0_66-b18) (build 1.8.0_66-b18)
      # Java VM: Java HotSpot(TM) Client VM (25.66-b18 mixed mode, sharing windows-x86 )
      # Problematic frame:
      # V [jvm.dll+0x8479]
      # 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.java.com/bugreport/crash.jsp

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

      Current thread (0x00a1b400): VMThread [stack: 0x14610000,0x14660000] [id=7840]

      siginfo: ExceptionCode=0xc0000005, reading address 0x00000000

      EAX=0x0000001e, EBX=0xffffffff, ECX=0x00000000, EDX=0x5a88694c
      ESP=0x1465ed74, EBP=0x1465ed7c, ESI=0x00000000, EDI=0x5a88694d
      EIP=0x5a588479, EFLAGS=0x00010216

      Top of Stack: (sp=0x1465ed74)
      0x1465ed74: 00a1b400 1465ee40 1465ee10 5a73edd0
      0x1465ed84: 5a88694c 00000000 00000000 00000000
      0x1465ed94: 00000000 00000000 00000000 00000202
      0x1465eda4: 00000000 7efad000 00000000 0050fd20
      0x1465edb4: 00000000 0050eaf0 00000000 75312450
      0x1465edc4: 1465ee34 1465edd8 707f952b 00312e38
      0x1465edd4: 1465ee34 1465edec 00000011 00000000
      0x1465ede4: 1465ef64 1465ee34 1465ee00 7079f8f7

      Instructions: (pc=0x5a588479)
      0x5a588459: c2 08 00 cc cc cc cc 55 8b ec 8b 55 08 56 8b c2
      0x5a588469: 57 8b f1 8d 78 01 90 8a 08 40 84 c9 75 f9 2b c7
      0x5a588479: 8b 3e 50 8b 47 04 52 8b ce ff d0 8b ce e8 55 b5
      0x5a588489: 19 00 5f 5e 5d c2 04 00 cc cc cc cc cc cc cc cc

      Register to memory mapping:

      [error occurred during error reporting (printing register info), id 0xc0000005]

      Stack: [0x14610000,0x14660000], sp=0x1465ed74, free space=315k
      Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
      V [jvm.dll+0x8479]
      V [jvm.dll+0x1bedd0]
      V [jvm.dll+0x1c0708]
      C [msvcr100.dll+0x5c556]
      C [msvcr100.dll+0x5c600]
      C [kernel32.dll+0x1337a]
      C [ntdll.dll+0x39882]
      C [ntdll.dll+0x39855]

      VM_Operation (0x00c8f5d0): Exit, mode: safepoint, requested by thread 0x009ac400

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

      Java Threads: ( => current thread )
        0x00a53c00 JavaThread "Service Thread" daemon [_thread_blocked, id=12072, stack(0x14670000,0x146c0000)]
        0x00a34400 JavaThread "C1 CompilerThread0" daemon [_thread_blocked, id=6180, stack(0x15a00000,0x15a50000)]
        0x00a32c00 JavaThread "Attach Listener" daemon [_thread_blocked, id=10600, stack(0x153a0000,0x153f0000)]
        0x00a2f400 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=5876, stack(0x147c0000,0x14810000)]
        0x00a24000 JavaThread "Finalizer" daemon [_thread_blocked, id=7740, stack(0x14720000,0x14770000)]
        0x00a1f000 JavaThread "Reference Handler" daemon [_thread_blocked, id=8172, stack(0x00fc0000,0x01010000)]
        0x009ac400 JavaThread "main" [_thread_blocked, id=7448, stack(0x00c40000,0x00c90000)]

      Other Threads:
      =>0x00a1b400 VMThread [stack: 0x14610000,0x14660000] [id=7840]

      VM state:at safepoint (shutting down)

      VM Mutex/Monitor currently owned by a thread: ([mutex/lock_event])
      [0x009aa7d0] Threads_lock - owner thread: 0x00a1b400

       def new generation total 4928K, used 972K [0x04600000, 0x04b50000, 0x09b50000)
        eden space 4416K, 22% used [0x04600000, 0x046f3398, 0x04a50000)
        from space 512K, 0% used [0x04a50000, 0x04a50000, 0x04ad0000)
        to space 512K, 0% used [0x04ad0000, 0x04ad0000, 0x04b50000)
       tenured generation total 10944K, used 0K [0x09b50000, 0x0a600000, 0x14600000)
         the space 10944K, 0% used [0x09b50000, 0x09b50000, 0x09b50200, 0x0a600000)
       Metaspace used 185K, capacity 2280K, committed 2368K, reserved 4480K

      Card table byte_map: [0x00b40000,0x00bd0000] byte_map_base: 0x00b1d000

      Polling page: 0x00450000

      CodeCache: size=32768Kb used=703Kb max_used=703Kb free=32064Kb
       bounds [0x024b0000, 0x02560000, 0x044b0000]
       total_blobs=171 nmethods=27 adapters=76
       compilation: enabled

      Compilation events (10 events):
      Event: 1.856 Thread 0x00a34400 23 java.lang.String::indexOf (166 bytes)
      Event: 1.856 Thread 0x00a34400 nmethod 23 0x0255b108 code [0x0255b220, 0x0255b450]
      Event: 1.858 Thread 0x00a34400 24 java.io.BufferedInputStream::getBufIfOpen (21 bytes)
      Event: 1.858 Thread 0x00a34400 nmethod 24 0x0255b788 code [0x0255b890, 0x0255b98c]
      Event: 1.858 Thread 0x00a34400 25 s java.io.BufferedInputStream::read (49 bytes)
      Event: 1.858 Thread 0x00a34400 nmethod 25 0x0255ba08 code [0x0255bb30, 0x0255be18]
      Event: 1.860 Thread 0x00a34400 26 java.util.StringTokenizer::scanToken (179 bytes)
      Event: 1.861 Thread 0x00a34400 nmethod 26 0x0255bf88 code [0x0255c100, 0x0255c4e8]
      Event: 1.865 Thread 0x00a34400 27 java.io.WinNTFileSystem::normalize (231 bytes)
      Event: 1.868 Thread 0x00a34400 nmethod 27 0x0255cf88 code [0x0255d1d0, 0x0255e70c]

      GC Heap History (0 events):
      No events

      Deoptimization events (0 events):
      No events

      Internal exceptions (6 events):
      Event: 0.038 Thread 0x009ac400 Exception <a 'java/lang/NoSuchMethodError': Method sun.misc.Unsafe.defineClass(Ljava/lang/String;[BII)Ljava/lang/Class; name or signature does not match> (0x0460bf70) thrown at [C:\re\workspace\8-2-build-windows-i586-cygwin\jdk8u66\5298\hotspot\src\share\vz•§Ýúl£?
      Event: 0.038 Thread 0x009ac400 Exception <a 'java/lang/NoSuchMethodError': Method sun.misc.Unsafe.prefetchRead(Ljava/lang/Object;J)V name or signature does not match> (0x0460c240) thrown at [C:\re\workspace\8-2-build-windows-i586-cygwin\jdk8u66\5298\hotspot\src\share\vm\prims\jni.cpp, lxÕÇ%1¦ý?
      Event: 1.853 Thread 0x009ac400 Exception <a 'java/security/PrivilegedActionException'> (0x046999e0) thrown at [C:\re\workspace\8-2-build-windows-i586-cygwin\jdk8u66\5298\hotspot\src\share\vm\prims\jvm.cpp, line 1386]
      Event: 1.853 Thread 0x009ac400 Exception <a 'java/security/PrivilegedActionException'> (0x04699dc0) thrown at [C:\re\workspace\8-2-build-windows-i586-cygwin\jdk8u66\5298\hotspot\src\share\vm\prims\jvm.cpp, line 1386]
      Event: 1.854 Thread 0x009ac400 Exception <a 'java/security/PrivilegedActionException'> (0x046b3ed8) thrown at [C:\re\workspace\8-2-build-windows-i586-cygwin\jdk8u66\5298\hotspot\src\share\vm\prims\jvm.cpp, line 1386]
      Event: 1.854 Thread 0x009ac400 Exception <a 'java/security/PrivilegedActionException'> (0x046b42b8) thrown at [C:\re\workspace\8-2-build-windows-i586-cygwin\jdk8u66\5298\hotspot\src\share\vm\prims\jvm.cpp, line 1386]

      Events (10 events):
      Event: 1.868 loading class java/util/concurrent/CountDownLatch done
      Event: 1.868 loading class java/util/concurrent/CountDownLatch$Sync
      Event: 1.868 loading class java/util/concurrent/CountDownLatch$Sync done
      Event: 2.882 Thread 0x15b6d800 Thread added: 0x15b6d800
      Event: 2.886 loading class java/util/Formattable
      Event: 2.886 loading class java/util/Formattable done
      Event: 3.895 Thread 0x15b6d800 Thread exited: 0x15b6d800
      Event: 4.113 Executing VM operation: EnableBiasedLocking
      Event: 4.114 Executing VM operation: EnableBiasedLocking done
      Event: 7.889 Executing VM operation: Exit

      Dynamic libraries:
      0x01060000 - 0x01093000 C:\ProgramData\Oracle\Java\javapath\java.exe
      0x779e0000 - 0x77b60000 C:\Windows\SysWOW64\ntdll.dll
      0x753f0000 - 0x75500000 C:\Windows\syswow64\kernel32.dll
      0x753a0000 - 0x753e7000 C:\Windows\syswow64\KERNELBASE.dll
      0x70770000 - 0x7091e000 C:\Program Files (x86)\Norton Security\NortonData\\Definitions\IPSDefs\20151221.001\IPSEng32.dll
      0x77210000 - 0x772b1000 C:\Windows\syswow64\ADVAPI32.dll
      0x76670000 - 0x7671c000 C:\Windows\syswow64\msvcrt.dll
      0x76760000 - 0x76779000 C:\Windows\SysWOW64\sechost.dll
      0x75520000 - 0x75610000 C:\Windows\syswow64\RPCRT4.dll
      0x75340000 - 0x753a0000 C:\Windows\syswow64\SspiCli.dll
      0x75330000 - 0x7533c000 C:\Windows\syswow64\CRYPTBASE.dll
      0x772c0000 - 0x773c0000 C:\Windows\syswow64\USER32.dll
      0x756f0000 - 0x75780000 C:\Windows\syswow64\GDI32.dll
      0x76b90000 - 0x76b9a000 C:\Windows\syswow64\LPK.dll
      0x77170000 - 0x7720d000 C:\Windows\syswow64\USP10.dll
      0x72500000 - 0x7269e000 C:\Windows\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.7601.18837_none_41e855142bd5705d\COMCTL32.dll
      0x75780000 - 0x757d7000 C:\Windows\syswow64\SHLWAPI.dll
      0x76550000 - 0x765b0000 C:\Windows\system32\IMM32.DLL
      0x77510000 - 0x775dc000 C:\Windows\syswow64\MSCTF.dll
      0x712e0000 - 0x7139f000 C:\Program Files (x86)\Java\jre1.8.0_66\bin\msvcr100.dll
      0x5a580000 - 0x5a945000 C:\Program Files (x86)\Java\jre1.8.0_66\bin\client\jvm.dll
      0x73b80000 - 0x73b87000 C:\Windows\system32\WSOCK32.dll
      0x76f90000 - 0x76fc5000 C:\Windows\syswow64\WS2_32.dll
      0x76b70000 - 0x76b76000 C:\Windows\syswow64\NSI.dll
      0x75030000 - 0x75062000 C:\Windows\system32\WINMM.dll
      0x74c10000 - 0x74c19000 C:\Windows\system32\VERSION.dll
      0x76750000 - 0x76755000 C:\Windows\syswow64\PSAPI.DLL
      0x71510000 - 0x7151c000 C:\Program Files (x86)\Java\jre1.8.0_66\bin\verify.dll
      0x714e0000 - 0x71501000 C:\Program Files (x86)\Java\jre1.8.0_66\bin\java.dll
      0x714c0000 - 0x714d3000 C:\Program Files (x86)\Java\jre1.8.0_66\bin\zip.dll
      0x75870000 - 0x764bb000 C:\Windows\syswow64\SHELL32.dll
      0x76e30000 - 0x76f8c000 C:\Windows\syswow64\ole32.dll
      0x76780000 - 0x7678b000 C:\Windows\syswow64\profapi.dll
      0x15310000 - 0x15375000 C:\lisp\cvlw\devel-win32-shaken.java-tests\lispworks-in-java.dll
      0x75110000 - 0x751ab000 C:\Windows\WinSxS\x86_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.6195_none_d09154e044272b9a\MSVCR80.dll
      0x74ac0000 - 0x74ad7000 C:\Windows\system32\CRYPTSP.dll
      0x74930000 - 0x7496b000 C:\Windows\system32\rsaenh.dll
      0x74c20000 - 0x74d0b000 C:\Windows\system32\dbghelp.dll

      VM Arguments:
      jvm_args: -Djava.library.path=c:\lisp\cvlw\devel-win32-shaken.java-tests\
      java_command: com.lispworks.testsuite.LispWorksCaller
      java_class_path (initial): z:\clc\lib\7-1-0-0\etc\lispcalls.jar;c:\lisp\cvlw\devel-win32-shaken.java-tests\
      Launcher Type: SUN_STANDARD

      Environment Variables:
      JAVA_HOME=C:\Program Files\Java\jdk1.7.0_21
      PATH=C:\ProgramData\Oracle\Java\javapath;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\app\yeh\product\11.1.0\db_2\bin;C:\Perl\bin\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;c:\Program Files (x86)\Microsoft SQL Server\90\Tools\binn\;C:\Program Files (x86)\Windows Live\Shared;c:\Program Files (x86)\Oracle\instantclient-basic-nt-\instantclient_11_2;C:\Program Files (x86)\Oracle\instantclient-odbc-nt-\instantclient_11_2;C:\Program Files\Microsoft Windows Performance Toolkit\;C:\Program Files (x86)\PostgreSQL\9.0\bin;C:\Program Files\PostgreSQL\9.3\bin;C:\Program Files (x86)\smartmontools\bin
      PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 26 Stepping 5, GenuineIntel

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

      OS: Windows 7 , 64 bit Build 7601 (6.1.7601.19045)

      CPU:total 8 (4 cores per cpu, 2 threads per core) family 6 model 26 stepping 5, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, ht, tsc, tscinvbit, tscinv

      Memory: 4k page, physical 6279672k(1483088k free), swap 12914588k(6166392k free)

      vm_info: Java HotSpot(TM) Client VM (25.66-b18) for windows-x86 JRE (1.8.0_66-b18), built on Nov 9 2015 10:58:29 by "java_re" with MS VC++ 10.0 (VS2010)

      time: Tue Dec 22 16:20:38 2015
      elapsed time: 7 seconds (0d 0h 0m 7s)

      This bug can be reproduced always.




            fmatte Fairoz Matte
            webbuggrp Webbug Group
            0 Vote for this issue
            3 Start watching this issue