简体   繁体   English

打开堆转储时出错

[英]Error Opening heap dump

I'm unable to open a heap dump using the standalone eclipse memory analyzer, or visualVM.我无法使用独立的 eclipse 内存分析器或 visualVM 打开堆转储。 I've tried two different hprof files.我尝试了两个不同的 hprof 文件。 VisualVM just hangs at loading heap dump, and eclipse memory analyzer gives me the below error. VisualVM 只是在加载堆转储时挂起,而 Eclipse 内存分析器给了我以下错误。

Error opening heap dump 'java_pid15751.hprof'. Check the error log for further details.
Error opening heap dump 'java_pid15751.hprof'. Check the error log for further     details.
Not a HPROF heap dump (java.io.IOException)
Not a HPROF heap dump

I'm using windows 7 32 bit.我正在使用 Windows 7 32 位。 The application server is on jboss 7.1.1 with the java version below.应用服务器在 jboss 7.1.1 上,java 版本如下。 OpenJDK Runtime Environment (IcedTea6 1.10.6) (rhel-1.43.1.10.6.el6_2-x86_64) OpenJDK 64-Bit Server VM (build 20.0-b11, mixed mode) OpenJDK 运行时环境 (IcedTea6 1.10.6) (rhel-1.43.1.10.6.el6_2-x86_64) OpenJDK 64 位服务器 VM(构建 20.0-b11,混合模式)

I suspect your heap dump file is corrupted.我怀疑您的堆转储文件已损坏。 How did you capture the heap dump file?你是如何捕获堆转储文件的? This article outlines several different options to capture heap dumps. 本文概述了捕获堆转储的几种不同选项。 'jmap' tool that is present in JDK is a great tool to capture heap dumps. JDK 中的“jmap”工具是捕获堆转储的绝佳工具。 You can invoke it by passing following command:您可以通过传递以下命令来调用它:

  jmap -dump:format=b,file=<heap-dump-file-path> <process-id>

where在哪里
heap-dump-file-path: is the file path where heap dump will be written in to. heap-dump-file-path:是堆转储将写入的文件路径。
process-id: is the Java Process Id, whose heap dump should be captured process-id:是Java进程ID,应该捕获其堆转储

Example:例子:
jmap -dump:format=b,file=/opt/tmp/heapdump.bin 37320 jmap -dump:format=b,file=/opt/tmp/heapdump.bin 37320

These heapdumps were taken due to out of memory issues in JBoss, where automatic heaps were taken.这些堆转储是由于 JBoss 中的内存不足问题而采取的,其中采用了自动堆。 I used jmap to take one, and it opened fine.我用jmap拍了一张,打开没问题。 I'm thinking the heap dump was corrupted for some reason.我认为由于某种原因堆转储已损坏。

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

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