简体   繁体   English

JVM EXCEPTION_ACCESS_VIOLATION之后需要进行堆转储

[英]Need to take Heap Dump after JVM EXCEPTION_ACCESS_VIOLATION

I found out heap dumps can be taken using java command parameters: -XX:+HeapDumpOnOutOfMemoryError writes heap dump on OutOfMemoryError and -XX:+HeapDumpOnCtrlBreak writes heap dump together with thread dump on CTRL+BREAK. 我发现可以使用java命令参数进行堆转储:-XX:+ HeapDumpOnOutOfMemoryError在OutOfMemoryError上写入堆转储,而-XX:+ HeapDumpOnCtrlBreak在CTRL + BREAK上将堆转储与线程转储一起写入。

Now I need heap dumps when I am getting the following error: 现在,当出现以下错误时,我需要堆转储:

A fatal error has been detected by the Java Runtime Environment:
EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x5fb62488, pid=6332, tid=6336

I am getting the hs_err_pid6332.log, but I need heap dump in the HPROF format so that I can run OQL on the content. 我正在获取hs_err_pid6332.log,但是我需要HPROF格式的堆转储,以便可以在内容上运行OQL。

Can you guide me here? 你可以在这里引导我吗? Thanks in advance! 提前致谢!

您可以从崩溃产生的核心文件中提取HPROF堆转储:

jmap -dump:format=b,file=heap.hprof ${path_to_java_exe} ${path_to_core}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM