发布于2020-11-19 20:51 阅读(1270) 评论(0) 点赞(8) 收藏(4)
java程序运行的时候,突然JVM发生错误导致崩溃时,会生成一个hs_err_pid_xxx.log这样的文件,该文件包含了导致 JVM crash 的重要信息,我们可以通过分析该文件定位到导致 JVM Crash 的原因,从而修复保证系统稳定,默认该文件出生在项目得根目录。
这个文件主要包含如下内容:
翻译过来的意思大概就是:
没有足够的内存,Java运行时环境无法继续。本机内存分配(malloc)无法为ChunkPool :: allocate分配32744个字节可能的原因:系统没有物理RAM或交换空间该进程正在启用CompressedOops的情况下运行,并且Java Heap可能阻止了本机堆的增长可能的解决方案:
减少系统上的内存负载
增加物理内存或交换内存
检查交换后备存储是否已满
减小Java堆大小(-Xmx / -Xms)
减小Java线程数减小Java线程堆栈大小(-Xss)
设置较大的代码-XX:ReservedCodeCacheSize =
进行高速缓存JVM以基于零的压缩Oops模式运行,在该模式下,Java堆位于前32GB地址空间中。 Java堆基址是本机堆增长的最大限制。请使用-XX:HeapBaseMinAddress
设置Java Heap基础并将Java Heap放置在32GB以上的虚拟地址上。
该输出文件可能被截断或不完整。内存不足错误(allocation.cpp:272),pid = 16756,tid = 0x0000000000006b78
JRE版本:Java(TM)SE运行时环境(8.0_231-b11)(内部版本1.8.0_231-b11)
Java VM:Java HotSpot(TM) )64位服务器VM(25.231-b11混合模式Windows-amd64压缩的oops)
无法写入核心转储。默认情况下,在Windows客户端版本上不启用小型转储
这段信息简述了发生异常的信息,是服务器内存不足,除此之外,JVM 自身的 bug,应用程序错误,JVM 参数,JNI 调用错误,版本信息和配置信息等也会导致JVM Crash。
Out of Memory Error (allocation.cpp:272), pid=16756, tid=0x0000000000006b78
复制代码
--------------- T H R E A D ---------------
Current thread (0x000000001fd37800): JavaThread "C2 CompilerThread0" daemon [_thread_in_native, id=27512, stack(0x0000000020170000,0x0000000020270000)]
Stack: [0x0000000020170000,0x0000000020270000]
[error occurred during error reporting (printing stack bounds), id 0xc0000005]
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
Current CompileTask:
C2: 19813 10229 4 java.net.URLClassLoader$1::run (5 bytes)
复制代码
线程信息
Current thread (0x0000000001e94800): JavaThread "pool-1-thread-2" [_thread_in_native, id=30111, stack(0x00007f3d567e5000,0x00007f3d568e6000)]
复制代码
--------------- P R O C E S S ---------------
Java Threads: ( => current thread )
0x000000002404f000 JavaThread "com.alibaba.nacos.naming.beat.sender" daemon [_thread_blocked, id=7612, stack(0x0000000021740000,0x0000000021840000)]
0x0000000024047800 JavaThread "DestroyJavaVM" [_thread_blocked, id=25856, stack(0x0000000002fb0000,0x00000000030b0000)]
0x0000000024048800 JavaThread "http-nio-51000-AsyncTimeout" daemon [_thread_blocked, id=12996, stack(0x0000000030020000,0x0000000030120000)]
0x000000002404e800 JavaThread "http-nio-51000-Acceptor-0" daemon [_thread_in_native, id=22020, stack(0x000000002ff20000,0x0000000030020000)]
0x000000002404d800 JavaThread "http-nio-51000-ClientPoller-1" daemon [_thread_in_native, id=11852, stack(0x000000002fe20000,0x000000002ff20000)]
0x0000000024046000 JavaThread "http-nio-51000-ClientPoller-0" daemon [_thread_in_native, id=23656, stack(0x000000002fd20000,0x000000002fe20000)]
0x0000000024047000 JavaThread "http-nio-51000-exec-10" daemon [_thread_blocked, id=11672, stack(0x000000002fc20000,0x000000002fd20000)]
0x000000002404b800 JavaThread "http-nio-51000-exec-9" daemon [_thread_blocked, id=6460, stack(0x000000002fb20000,0x000000002fc20000)]
0x000000002404d000 JavaThread "http-nio-51000-exec-8" daemon [_thread_blocked, id=4524, stack(0x000000002fa20000,0x000000002fb20000)]
0x000000002404c000 JavaThread "http-nio-51000-exec-7" daemon [_thread_blocked, id=7536, stack(0x000000002f920000,0x000000002fa20000)]
0x000000002404a800 JavaThread "http-nio-51000-exec-6" daemon [_thread_blocked, id=15648, stack(0x000000002f820000,0x000000002f920000)]
0x0000000024045800 JavaThread "http-nio-51000-exec-5" daemon [_thread_blocked, id=17580, stack(0x000000002f720000,0x000000002f820000)]
0x0000000022175800 JavaThread "http-nio-51000-exec-4" daemon [_thread_blocked, id=23840, stack(0x000000002f620000,0x000000002f720000)]
0x0000000021bf9000 JavaThread "http-nio-51000-exec-3" daemon [_thread_blocked, id=20868, stack(0x000000002f520000,0x000000002f620000)]
0x0000000021bfc000 JavaThread "http-nio-51000-exec-2" daemon [_thread_blocked, id=9416, stack(0x000000002f420000,0x000000002f520000)]
0x0000000021bff800 JavaThread "http-nio-51000-exec-1" daemon [_thread_blocked, id=7856, stack(0x000000002f320000,0x000000002f420000)]
0x0000000021bfc800 JavaThread "NioBlockingSelector.BlockPoller-1" daemon [_thread_in_native, id=17036, stack(0x000000002f060000,0x000000002f160000)]
0x0000000021bf8000 JavaThread "dubbo-remoting-server-heartbeat-thread-1" daemon [_thread_blocked, id=11892, stack(0x000000002edf0000,0x000000002eef0000)]
0x0000000021bf9800 JavaThread "NettyServerBoss-7-1" daemon [_thread_in_native, id=8756, stack(0x000000002e8a0000,0x000000002e9a0000)]
0x0000000021bfe000 JavaThread "Keep-Alive-Timer" daemon [_thread_blocked, id=15228, stack(0x000000002f220000,0x000000002f320000)]
0x0000000021bfd800 JavaThread "xxl-job, executor ExecutorRegistryThread" daemon [_thread_blocked, id=20704, stack(0x000000002e7a0000,0x000000002e8a0000)]
0x0000000021bfb000 JavaThread "nioEventLoopGroup-5-1" [_thread_in_native, id=19896, stack(0x000000002e6a0000,0x000000002e7a0000)]
0x0000000021bfa800 JavaThread "Thread-17" daemon [_thread_blocked, id=23024, stack(0x000000002eaf0000,0x000000002ebf0000)]
0x0000000021bf0800 JavaThread "Thread-16" daemon [_thread_blocked, id=9520, stack(0x000000002e9f0000,0x000000002eaf0000)]
0x0000000021bf6000 JavaThread "xxl-job, executor TriggerCallbackThread" daemon [_thread_blocked, id=15680, stack(0x000000002e2f0000,0x000000002e3f0000)]
0x0000000021bf4800 JavaThread "xxl-job, executor JobLogFileCleanThread" daemon [_thread_blocked, id=18152, stack(0x000000002ada0000,0x000000002aea0000)]
0x0000000021bf6800 JavaThread "com.alibaba.nacos.naming.beat.sender" daemon [_thread_blocked, id=856, stack(0x000000002e400000,0x000000002e500000)]
0x0000000021bf5000 JavaThread "JetCacheDefaultExecutor" daemon [_thread_blocked, id=4936, stack(0x000000002e5a0000,0x000000002e6a0000)]
0x0000000021bf3000 JavaThread "DubboClientReconnectTimer-thread-2" daemon [_thread_blocked, id=20420, stack(0x000000002d9f0000,0x000000002daf0000)]
0x0000000021bf1800 JavaThread "com.alibaba.nacos.client.naming.updater" daemon [_thread_blocked, id=13332, stack(0x000000002d6f0000,0x000000002d7f0000)]
0x0000000021bf2000 JavaThread "com.alibaba.nacos.client.naming.updater" daemon [_thread_blocked, id=12236, stack(0x000000002d5f0000,0x000000002d6f0000)]
0x0000000022179000 JavaThread "com.alibaba.nacos.client.naming.updater" daemon [_thread_blocked, id=12008, stack(0x000000002d4f0000,0x000000002d5f0000)]
0x0000000022178800 JavaThread "com.alibaba.nacos.client.naming.updater" daemon [_thread_blocked, id=26380, stack(0x000000002d3f0000,0x000000002d4f0000)]
0x0000000022177800 JavaThread "com.alibaba.nacos.client.naming.updater" daemon [_thread_blocked, id=5812, stack(0x000000002d2f0000,0x000000002d3f0000)]
0x0000000022176000 JavaThread "dubbo-remoting-client-heartbeat-thread-1" daemon [_thread_blocked, id=27148, stack(0x000000002c020000,0x000000002c120000)]
0x000000002217d000 JavaThread "NettyClientWorker-4-1" daemon [_thread_in_native, id=22332, stack(0x000000002bf20000,0x000000002c020000)]
0x000000002217c000 JavaThread "DubboClientReconnectTimer-thread-1" daemon [_thread_blocked, id=22356, stack(0x000000002be20000,0x000000002bf20000)]
0x000000002217b800 JavaThread "DubboSaveRegistryCache-thread-1" daemon [_thread_blocked, id=23092, stack(0x000000002bd20000,0x000000002be20000)]
0x000000002216e800 JavaThread "com.alibaba.nacos.client.naming.updater" daemon [_thread_blocked, id=23676, stack(0x000000002b680000,0x000000002b780000)]
0x0000000022172800 JavaThread "DubboRegistryFailedRetryTimer-thread-1" daemon [_thread_blocked, id=22928, stack(0x000000002b920000,0x000000002ba20000)]
0x0000000022171000 JavaThread "com.alibaba.nacos.naming.push.receiver" daemon [_thread_in_native, id=11576, stack(0x000000002b820000,0x000000002b920000)]
0x000000002216e000 JavaThread "com.alibaba.nacos.naming.failover" daemon [_thread_blocked, id=16176, stack(0x000000002b230000,0x000000002b330000)]
0x0000000022173000 JavaThread "com.alibaba.nacos.naming.beat.sender" daemon [_thread_blocked, id=22464, stack(0x000000002b580000,0x000000002b680000)]
0x000000002216f800 JavaThread "com.alibaba.nacos.naming.beat.sender" daemon [_thread_blocked, id=17320, stack(0x000000002b480000,0x000000002b580000)]
0x0000000022171800 JavaThread "com.alibaba.nacos.naming.client.listener" daemon [_thread_blocked, id=26024, stack(0x000000002b380000,0x000000002b480000)]
0x0000000022174000 JavaThread "Timer-0" daemon [_thread_blocked, id=23244, stack(0x0000000022f40000,0x0000000023040000)]
0x0000000022174800 JavaThread "Log4j2-TF-9-Scheduled-3" daemon [_thread_blocked, id=11696, stack(0x000000002aee0000,0x000000002afe0000)]
0x000000002659f800 JavaThread "qos-boss-1-1" daemon [_thread_in_native, id=12388, stack(0x000000002aca0000,0x000000002ada0000)]
0x00000000265a1000 JavaThread "Druid-ConnectionPool-Destroy-613765444" daemon [_thread_blocked, id=16984, stack(0x000000002a6a0000,0x000000002a7a0000)]
0x00000000265a0000 JavaThread