简体   繁体   中英

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.

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.

Can you guide me here? Thanks in advance!

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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