开发者社区> 问答> 正文

windows下,Dragonwell JDK开启JWarmup功能,但是Jvm Crash了

机器:Windows系统
软件:idea
jdk版本:
image.png
本着想测试一下jwarmup功能的目的,但是遇到了jvm崩溃的问题。
运行的代码如下:
image.png
jvm参数:
-XX:+CompilationWarmUpRecording
-XX:CompilationWarmUpRecordTime=10
-XX:CompilationWarmUpLogfile=./jwarmup.log
-XX:-ClassUnloading -XX:+CreateMinidumpOnCrash

结果:到了记录时间10s时,就会出现如下的问题。
image.png
并生成了hs_err_pid19864.log文件

# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x0000000056bc10dd, pid=19864, tid=0x000000000000280c
#
# JRE version: OpenJDK Runtime Environment (8.0_345-b01) (build 1.8.0_345-b01)
# Java VM: OpenJDK 64-Bit Server VM (25.345-b01 mixed mode windows-amd64 compressed oops)
# Problematic frame:
# V  [jvm.dll+0xb10dd]
#
# Core dump written. Default location: E:\repository\springcloud\hs_err_pid19864.mdmp
#
# If you would like to submit a bug report, please visit:
#   mailto:dragonwell_use@googlegroups.com
#

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

Current thread is native thread

siginfo: ExceptionCode=0xc0000005, reading address 0x00000000000001c8

Registers:
RAX=0x0000000000000000, RBX=0x00000188b90eba20, RCX=0x000000000000001c, RDX=0x0000000000000003
RSP=0x0000001acf4ff880, RBP=0x0000001acf4ffb20, RSI=0x00000188b90fe3d0, RDI=0x00000188b90fe3d0
R8 =0x0000000000000024, R9 =0x000000000000008a, R10=0x000000005730c421, R11=0x00000188d38055e1
R12=0x0000000000000000, R13=0x0000000000000000, R14=0x0000000000000000, R15=0x0000000000000000
RIP=0x0000000056bc10dd, EFLAGS=0x0000000000010206

Top of Stack: (sp=0x0000001acf4ff880)
0x0000001acf4ff880:   0000000000000024 00007ffede36c500
0x0000001acf4ff890:   0000000000000000 000000005730c420
0x0000001acf4ff8a0:   0000000000000000 0000000000000000
0x0000001acf4ff8b0:   0000000000000000 0000000000000000
0x0000001acf4ff8c0:   0000000000000000 00000188b91205c0
0x0000001acf4ff8d0:   00000188b90fe3d0 0000001acf4ffb20
0x0000001acf4ff8e0:   00000188b90eba20 0000000056bbe112
0x0000001acf4ff8f0:   00000188b90eba20 00000188b90fe3d0
0x0000001acf4ff900:   00000188b91205c0 00007ffede36c500
0x0000001acf4ff910:   00000188cc58aa60 0000000056bbe2a3
0x0000001acf4ff920:   0000001acf4ffb20 00000188b9124a30
0x0000001acf4ff930:   00000188b91205c0 00000188b9124a30
0x0000001acf4ff940:   00000188d2645800 0000000056bc1a76
0x0000001acf4ff950:   00000188d2645800 0000018800000002
0x0000001acf4ff960:   0000000000000000 0000000000000000
0x0000001acf4ff970:   00000188d2645800 0000000056d806fa 

Instructions: (pc=0x0000000056bc10dd)
0x0000000056bc10bd:   48 83 ec 28 48 8b f9 e8 47 ce 16 00 84 c0 74 0e
0x0000000056bc10cd:   8b 0d f1 55 6f 00 ff 15 f7 52 51 00 eb 02 33 c0
0x0000000056bc10dd:   4c 8b a8 c8 01 00 00 8b 5f 18 48 8d 15 22 af 74
0x0000000056bc10ed:   00 49 8b 75 18 49 8b 6d 20 4d 8b 75 28 4d 8b 65 


Register to memory mapping:

RAX=0x0000000000000000 is an unknown value
RBX=0x00000188b90eba20 is an unknown value
RCX=0x000000000000001c is an unknown value
RDX=0x0000000000000003 is an unknown value
RSP=0x0000001acf4ff880 is an unknown value
RBP=0x0000001acf4ffb20 is an unknown value
RSI=0x00000188b90fe3d0 is an unknown value
RDI=0x00000188b90fe3d0 is an unknown value
R8 =0x0000000000000024 is an unknown value
R9 =0x000000000000008a is an unknown value
R10=0x000000005730c421 is an unknown value
R11=0x00000188d38055e1 is an unknown value
R12=0x0000000000000000 is an unknown value
R13=0x0000000000000000 is an unknown value
R14=0x0000000000000000 is an unknown value
R15=0x0000000000000000 is an unknown value


Stack: [0x0000001acf400000,0x0000001acf500000],  sp=0x0000001acf4ff880,  free space=1022k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [jvm.dll+0xb10dd]
V  [jvm.dll+0xae112]
V  [jvm.dll+0xae2a3]
V  [jvm.dll+0xb1a76]
V  [jvm.dll+0x2706fa]
C  [msvcr120.dll+0x24f7f]
C  [msvcr120.dll+0x25126]
C  [KERNEL32.DLL+0x17614]
C  [ntdll.dll+0x526a1]


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

VM state:not at safepoint (normal execution)

VM Mutex/Monitor currently owned by a thread: None

heap address: 0x00000006c4e00000, size: 4018 MB, Compressed Oops mode: Zero based, Oop shift amount: 3
Narrow klass base: 0x0000000000000000, Narrow klass shift: 3
Compressed class space size: 1073741824 Address: 0x00000007c0000000

Heap:
 par new generation   total 77440K, used 9649K [0x00000006c4e00000, 0x00000006ca200000, 0x00000006ee790000)
  eden space 68864K,  14% used [0x00000006c4e00000, 0x00000006c576c498, 0x00000006c9140000)
  from space 8576K,   0% used [0x00000006c9140000, 0x00000006c9140000, 0x00000006c99a0000)
  to   space 8576K,   0% used [0x00000006c99a0000, 0x00000006c99a0000, 0x00000006ca200000)
 concurrent mark-sweep generation total 172032K, used 0K [0x00000006ee790000, 0x00000006f8f90000, 0x00000007c0000000)
 Metaspace       used 4042K, capacity 4572K, committed 4864K, reserved 1056768K
  class space    used 441K, capacity 460K, committed 512K, reserved 1048576K

Card table byte_map: [0x00000188cae90000,0x00000188cb670000] byte_map_base: 0x00000188c7869000

Marking Bits: (CMSBitMap*) 0x00000188b9187d90
 Bits: [0x00000188cc680000, 0x00000188cfae1c00)

Mod Union Table: (CMSBitMap*) 0x00000188b9187e50
 Bits: [0x00000188cfaf0000, 0x00000188cfbc1870)

Polling page: 0x00000188bbaa0000

CodeCache: size=245760Kb used=1431Kb max_used=1451Kb free=244328Kb
 bounds [0x00000188bbad0000, 0x00000188bbd40000, 0x00000188caad0000]
 total_blobs=417 nmethods=145 adapters=181
 compilation: enabled

Compilation events (10 events):
Event: 4.504 Thread 0x00000188d3361000  141   !   4       sun.nio.cs.StreamEncoder::flushBuffer (42 bytes)
Event: 4.505 Thread 0x00000188d3361000 nmethod 141 0x00000188bbc2d890 code [0x00000188bbc2d9e0, 0x00000188bbc2dd88]
Event: 6.840 Thread 0x00000188d335e000  142       4       java.lang.Integer::getChars (131 bytes)
Event: 6.842 Thread 0x00000188d335e000 nmethod 142 0x00000188bbc2fad0 code [0x00000188bbc2fc20, 0x00000188bbc2ff78]
Event: 8.431 Thread 0x00000188d335d800  143   !   4       org.example.Test::bar (16 bytes)
Event: 8.431 Thread 0x00000188d3361000  144   !   4       java.io.PrintStream::newLine (73 bytes)
Event: 8.431 Thread 0x00000188d335e000  145       4       java.lang.Thread::sleep (53 bytes)
Event: 8.431 Thread 0x00000188d335e000 nmethod 145 0x00000188bbc30150 code [0x00000188bbc302a0, 0x00000188bbc30328]
Event: 8.439 Thread 0x00000188d3361000 nmethod 144 0x00000188bbc36650 code [0x00000188bbc36820, 0x00000188bbc37950]
Event: 8.462 Thread 0x00000188d335d800 nmethod 143 0x00000188bbc3c210 code [0x00000188bbc3c460, 0x00000188bbc3e810]

GC Heap History (0 events):
No events

Deoptimization events (0 events):
No events

Classes redefined (0 events):
No events

Internal exceptions (6 events):
Event: 0.026 Thread 0x00000188b90ef800 Exception <a 'java/lang/NoSuchMethodError': Method sun.misc.Unsafe.defineClass(Ljava/lang/String;[BII)Ljava/lang/Class; name or signature does not match> (0x00000006c4e0a808) thrown at [C:\workspace\openjdk-build\workspace\build\src\hotspot\src\share\vm\p
Event: 0.026 Thread 0x00000188b90ef800 Exception <a 'java/lang/NoSuchMethodError': Method sun.misc.Unsafe.prefetchRead(Ljava/lang/Object;J)V name or signature does not match> (0x00000006c4e0aaf0) thrown at [C:\workspace\openjdk-build\workspace\build\src\hotspot\src\share\vm\prims\jni.cpp, line
Event: 0.825 Thread 0x00000188d2893800 Exception <a 'java/security/PrivilegedActionException'> (0x00000006c5535be8) thrown at [C:\workspace\openjdk-build\workspace\build\src\hotspot\src\share\vm\prims\jvm.cpp, line 1578]
Event: 0.825 Thread 0x00000188d2893800 Exception <a 'java/security/PrivilegedActionException'> (0x00000006c5535fe0) thrown at [C:\workspace\openjdk-build\workspace\build\src\hotspot\src\share\vm\prims\jvm.cpp, line 1578]
Event: 0.825 Thread 0x00000188d2893800 Exception <a 'java/security/PrivilegedActionException'> (0x00000006c55389f0) thrown at [C:\workspace\openjdk-build\workspace\build\src\hotspot\src\share\vm\prims\jvm.cpp, line 1578]
Event: 0.825 Thread 0x00000188d2893800 Exception <a 'java/security/PrivilegedActionException'> (0x00000006c5538de8) thrown at [C:\workspace\openjdk-build\workspace\build\src\hotspot\src\share\vm\prims\jvm.cpp, line 1578]

Events (10 events):
Event: 0.830 loading class java/util/ResourceBundle$BundleReference
Event: 0.830 loading class java/util/ResourceBundle$BundleReference done
Event: 0.830 loading class sun/util/resources/en/TimeZoneNames_en
Event: 0.830 loading class sun/util/resources/en/TimeZoneNames_en done
Event: 0.831 loading class java/util/LinkedHashMap$LinkedKeySet
Event: 0.831 loading class java/util/LinkedHashMap$LinkedKeySet done
Event: 0.832 loading class sun/util/locale/provider/LocaleResources$ResourceReference
Event: 0.832 loading class sun/util/locale/provider/LocaleResources$ResourceReference done
Event: 4.162 Executing VM operation: EnableBiasedLocking
Event: 4.162 Executing VM operation: EnableBiasedLocking done


Dynamic libraries:
0x00007ff7e31d0000 - 0x00007ff7e320a000     D:\dragonwell-8.12.13\jre\bin\java.exe
0x00007ffefead0000 - 0x00007ffefecc8000     C:\Windows\SYSTEM32\ntdll.dll
0x00007ffefd7c0000 - 0x00007ffefd87f000     C:\Windows\System32\KERNEL32.DLL
0x00007ffefc360000 - 0x00007ffefc656000     C:\Windows\System32\KERNELBASE.dll
0x00007ffed8f40000 - 0x00007ffed9454000     C:\Windows\System32\TSafeDoc64.dll
0x00007ffec2030000 - 0x00007ffec2130000     C:\Windows\SYSTEM32\winhafnt64.dll
0x00007ffefe590000 - 0x00007ffefe72d000     C:\Windows\System32\USER32.dll
0x00007ffefe1a0000 - 0x00007ffefe20b000     C:\Windows\System32\WS2_32.dll
0x00007ffefe870000 - 0x00007ffefe996000     C:\Windows\System32\RPCRT4.dll
0x00007ffefca90000 - 0x00007ffefcab2000     C:\Windows\System32\win32u.dll
0x00007ffefe090000 - 0x00007ffefe0bc000     C:\Windows\System32\GDI32.dll
0x00007ffefc660000 - 0x00007ffefc775000     C:\Windows\System32\gdi32full.dll
0x00007ffefd8b0000 - 0x00007ffefd95f000     C:\Windows\System32\ADVAPI32.dll
0x00007ffed8ea0000 - 0x00007ffed8f38000     C:\Windows\SYSTEM32\WINSPOOL.DRV
0x00007ffefc200000 - 0x00007ffefc29d000     C:\Windows\System32\msvcp_win.dll
0x00007ffefd720000 - 0x00007ffefd7be000     C:\Windows\System32\msvcrt.dll
0x00007ffefc8e0000 - 0x00007ffefc9e0000     C:\Windows\System32\ucrtbase.dll
0x00007ffefe210000 - 0x00007ffefe2ac000     C:\Windows\System32\sechost.dll
0x00007ffefcf50000 - 0x00007ffefd694000     C:\Windows\System32\SHELL32.dll
0x00007ffefe730000 - 0x00007ffefe85a000     C:\Windows\System32\ole32.dll
0x00007ffefafa0000 - 0x00007ffefafaa000     C:\Windows\SYSTEM32\VERSION.dll
0x00007ffefcb30000 - 0x00007ffefce84000     C:\Windows\System32\combase.dll
0x00007ffefe4c0000 - 0x00007ffefe58d000     C:\Windows\System32\OLEAUT32.dll
0x00007ffed8e80000 - 0x00007ffed8e9d000     C:\Windows\SYSTEM32\MPR.dll
0x00007ffed6790000 - 0x00007ffed6a2a000     C:\Windows\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.19041.1110_none_60b5254171f9507e\COMCTL32.dll
0x00007ffefd880000 - 0x00007ffefd8b0000     C:\Windows\System32\IMM32.DLL
0x00007ffec1570000 - 0x00007ffec1a7a000     C:\Windows\SYSTEM32\winhadnt64.dll
0x00007ffefe460000 - 0x00007ffefe4b5000     C:\Windows\System32\SHLWAPI.dll
0x00007ffee57e0000 - 0x00007ffee5807000     C:\Windows\SYSTEM32\WINMM.dll
0x00007ffefb650000 - 0x00007ffefb71b000     C:\Windows\SYSTEM32\Dnsapi.dll
0x00007ffefb610000 - 0x00007ffefb64c000     C:\Windows\SYSTEM32\IPHLPAPI.DLL
0x00007ffefea60000 - 0x00007ffefea68000     C:\Windows\System32\NSI.dll
0x00007ffed8ad0000 - 0x00007ffed8cec000     C:\Windows\SYSTEM32\DtFrame64.dll
0x00007ffec97d0000 - 0x00007ffec9801000     C:\Windows\SYSTEM32\TIjtdrvd64.dll
0x00007ffebd3c0000 - 0x00007ffebd4dd000     C:\Windows\SYSTEM32\DtsFrame64.dll
0x00007ffefb970000 - 0x00007ffefb9da000     C:\Windows\SYSTEM32\mswsock.dll
0x00007ffef95e0000 - 0x00007ffef95ec000     C:\Windows\SYSTEM32\WinUsb.dll
0x00007ffefe860000 - 0x00007ffefe868000     C:\Windows\System32\psapi.dll
0x00007ffec1470000 - 0x00007ffec1564000     C:\Windows\SYSTEM32\TMailHook64.dll
0x00007ffefc2d0000 - 0x00007ffefc352000     C:\Windows\System32\bcryptPrimitives.dll
0x00007ffec0e90000 - 0x00007ffec0eb6000     C:\Windows\SYSTEM32\hlink.dll
0x00007ffeeda50000 - 0x00007ffeedd01000     C:\Windows\SYSTEM32\iertutil.dll
0x00007ffefe9b0000 - 0x00007ffefea5d000     C:\Windows\System32\shcore.dll
0x00007ffefafb0000 - 0x00007ffefafbc000     C:\Windows\SYSTEM32\secur32.dll
0x00007ffefc0a0000 - 0x00007ffefc0d2000     C:\Windows\SYSTEM32\SSPICLI.DLL
0x00007ffede290000 - 0x00007ffede37f000     D:\dragonwell-8.12.13\jre\bin\msvcr120.dll
0x00007ffede1e0000 - 0x00007ffede286000     D:\dragonwell-8.12.13\jre\bin\msvcp120.dll
0x0000000056b10000 - 0x000000005739b000     D:\dragonwell-8.12.13\jre\bin\server\jvm.dll
0x00007ffef64e0000 - 0x00007ffef64e9000     C:\Windows\SYSTEM32\WSOCK32.dll
0x00007ffee3970000 - 0x00007ffee397f000     D:\dragonwell-8.12.13\jre\bin\verify.dll
0x00007ffee3580000 - 0x00007ffee35aa000     D:\dragonwell-8.12.13\jre\bin\java.dll
0x00007ffee3af0000 - 0x00007ffee3b1a000     D:\dragonwell-8.12.13\jre\bin\instrument.dll
0x00007ffee2880000 - 0x00007ffee2896000     D:\dragonwell-8.12.13\jre\bin\zip.dll
0x00007ffefa000000 - 0x00007ffefa793000     C:\Windows\SYSTEM32\windows.storage.dll
0x00007ffefbc10000 - 0x00007ffefbc3e000     C:\Windows\SYSTEM32\Wldp.dll
0x00007ffefc0f0000 - 0x00007ffefc10f000     C:\Windows\SYSTEM32\profapi.dll
0x00007ffee2e90000 - 0x00007ffee2eaa000     D:\idea\IntelliJ IDEA 2023.2\bin\breakgen64.dll
0x00007ffee39e0000 - 0x00007ffee39fa000     D:\dragonwell-8.12.13\jre\bin\net.dll
0x00007ffef3f40000 - 0x00007ffef3f5d000     C:\Windows\SYSTEM32\dhcpcsvc.DLL
0x00007ffeb2a00000 - 0x00007ffeb2bf0000     C:\Windows\SYSTEM32\winncap364.dll
0x00007ffef9b90000 - 0x00007ffef9d74000     C:\Windows\system32\DBGHELP.DLL
0x00007ffed2c20000 - 0x00007ffed2c54000     C:\Windows\SYSTEM32\dbgcore.DLL

看样子是jvm的本地调用jni有问题。

请问大佬们,这个问题咋解。

展开
收起
游客ocuw4kssfnit4 2023-08-18 15:10:00 262 0
1 条回答
写回答
取消 提交回答
  • 北京阿里云ACE会长

    我已经认真阅读了 你的问题:

    【 windows下,Dragonwell JDK开启JWarmup功能,但是Jvm Crash了

    并思考了

    建议如下:


    更新Java:确保你正在使用最新版本的Java。你可以前往Oracle或OpenJDK的官方网站下载最新版本的JRE或JDK,并安装它们。

    检查应用程序和环境:检查你的应用程序和环境是否与该Java版本兼容。确保你的应用程序和相关库与所使用的Java版本兼容,并且没有冲突或不兼容的因素。

    检查代码:如果你是开发人员,仔细检查你的代码是否存在潜在的内存访问错误或其他错误。特别注意访问数组、指针或本机方法时是否存在问题。

    检查硬件和操作系统:有时,硬件问题或操作系统问题可能导致访问冲突或异常。确保你的计算机硬件正常工作,并且操作系统稳定。你可以运行硬件诊断工具和操作系统更新来排除潜在的问题。

    2023-08-18 20:44:01
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
基于JVM的脚本语言开发、运用实践 立即下载
TAKING WINDOWS 10 KERNEL 立即下载
ECS运维指南之Windows系统诊断 立即下载