简体   繁体   English

Mat无法打开转储文件

[英]Mat can't open the dump file

My jmap command is sudo -u flume /usr/java/jdk1.8.0_60/bin/jmap -F -dump:format=b,file=heap.hprof pid , But eclips mat can't open the dump file,and throw an exception. 我的jmap命令是sudo -u flume /usr/java/jdk1.8.0_60/bin/jmap -F -dump:format=b,file=heap.hprof pid ,但是eclips mat无法打开转储文件,并抛出一个例外。

java.lang.NullPointerException
    at org.eclipse.mat.hprof.HprofParserHandlerImpl.resolveClassHierarchy(HprofParserHandlerImpl.java:587)
    at org.eclipse.mat.hprof.Pass2Parser.readInstanceDump(Pass2Parser.java:205)
    at org.eclipse.mat.hprof.Pass2Parser.readDumpSegments(Pass2Parser.java:159)
    at org.eclipse.mat.hprof.Pass2Parser.read(Pass2Parser.java:89)
    at org.eclipse.mat.hprof.HprofIndexBuilder.fill(HprofIndexBuilder.java:94)
    at org.eclipse.mat.parser.internal.SnapshotFactoryImpl.parse(SnapshotFactoryImpl.java:222)
    at org.eclipse.mat.parser.internal.SnapshotFactoryImpl.openSnapshot(SnapshotFactoryImpl.java:126)
    at org.eclipse.mat.snapshot.SnapshotFactory.openSnapshot(SnapshotFactory.java:145)
    at org.eclipse.mat.ui.snapshot.ParseHeapDumpJob.run(ParseHeapDumpJob.java:83)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

Here is my environment. 这是我的环境。

java version "1.8.0_60"
Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)

Linux version 2.6.32-504.el6.x86_64

But jhat can analyze it correctly. 但是jhat可以正确分析它。

It appears that this is a known issue for Java 8. See Bug 471757 and Bug 476262 . 看来这是Java 8的已知问题。请参阅错误471757错误476262 Neither have fixes. 也没有修复。 As a temporary workaround, I would try Yourkit . 作为临时解决方法,我会尝试Yourkit It costs money, but it's worked well for me in the past, and at least you can get a free 2 week evaluation key that should be long enough to resolve your current issue. 它需要花钱,但过去它对我来说效果很好,至少你可以获得一个免费的2周评估密钥,该密钥应足够长,以解决您当前的问题。

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

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