【问题标题】:JHAT cannot analyze a memory dumpJHAT 无法分析内存转储
【发布时间】:2011-05-30 16:58:41
【问题描述】:

我有一个内存转储文件,JHAT 给出以下消息,我无法分析任何内容(因为没有显示数据。

 Resolving 0 objects...

WARNING:  hprof file does not include java.lang.Class!

WARNING:  hprof file does not include java.lang.String!

WARNING:  hprof file does not include java.lang.ClassLoader!

这是否意味着 hprof 文件不完整或损坏?

我正在使用
-XX:+HeapDumpOnOutOfMemoryError" 我的tomcat中的选项。

【问题讨论】:

  • 您是否尝试过使用另一个分析器(例如 YourKit)打开此转储?
  • yourkit 不是免费的,买不起。
  • YourKit 有一个试用版,您可以使用 30 天(左右)。先试试吧。

标签: java tomcat out-of-memory jhat


【解决方案1】:

我今天也有同样的问题。澄清一下,我使用的选项 heap=sites 与内存转储不同。我也从jhatjvisualvm 收到相同的消息。 jhat可能不支持读取HPROFheap=sites模式创建的文件。

【讨论】:

    【解决方案2】:

    我自己的堆转储也遇到了同样的问题。

    • jhat 显示您描述的警告,并且没有显示有用的数据
    • Eclipse MAT 抱怨 NullPointerException
    • VisualVM 根本无法打开堆转储文件

    看起来这种情况发生在堆转储时没有足够的磁盘空间,因此文件确实不完整/损坏。

    http://forums.oracle.com/forums/thread.jspa?threadID=1175621&tstart=135

    【讨论】:

      猜你喜欢
      • 2012-10-07
      • 1970-01-01
      • 2011-02-28
      • 2013-10-31
      • 2011-04-26
      • 1970-01-01
      • 2011-04-14
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多