巨大的堆转储(11GB) - Jhat失败& Eclipse MAT需要帮助

时间:2011-05-17 06:15:12

标签: java out-of-memory heap-dump jhat memoryanalyzer

我们的EA中出现内存错误,我们使用-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/path/to/some/dir在OOM时转储堆。

我们的堆内存为12GB,perm gen为256MB。

在我们运行应用程序并且大小为11.5GB的Linux机箱中生成堆转储。我们没有权限将其下载到我们当地。

当我们尝试使用JHAT分析11GB堆转储时,它会抛出一个OOM。

我们从Linux CLI尝试了以下命令。

jhat java_pid1491.hprof
jhat -J-Xmx16g -XX:-UseBiasedLocking java_pid1491.hprof
jhat -J-d64 -J-Xmx16g -J-XX:-UseBiasedLocking java_pid1491.hprof#1

对于所有选项,在读取转储几分钟(> 30分钟)后抛出OOM异常。

我们用Google搜索并发现MAT是一个功能强大的堆转储分析器,但不是在LINUX中使用它的方法。

任何建议都会有更大的帮助。谢谢。

修改:

在Linux x86_64计算机上安装了MAT,但在执行./MemoryAnalyzer

时遇到以下错误
(.:17319): GLib-GObject-WARNING **: invalid (NULL) pointer instance
(.:17319): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion `G_TYPE_CHECK_INSTANCE (instance)' failed
(.:17319): Gtk-CRITICAL **: gtk_settings_get_for_screen: assertion `GDK_IS_SCREEN (screen)' failed
(.:17319): GLib-GObject-CRITICAL **: g_object_get: assertion `G_IS_OBJECT (object)' failed
(.:17319): Gtk-WARNING **: Screen for GtkWindow not set; you must always set
a screen for a GtkWindow before using the window
(.:17319): Gdk-CRITICAL **: gdk_pango_context_get_for_screen: assertion `GDK_IS_SCREEN (screen)' failed
(.:17319): Pango-CRITICAL **: pango_context_set_font_description: assertion `context != NULL' failed
(.:17319): Pango-CRITICAL **: pango_context_set_base_dir: assertion `context != NULL' failed
(.:17319): Pango-CRITICAL **: pango_context_set_language: assertion `context != NULL' failed
(.:17319): Pango-CRITICAL **: pango_layout_new: assertion `context != NULL' failed
(.:17319): Pango-CRITICAL **: pango_layout_set_text: assertion `layout != NULL' failed
(.:17319): Pango-CRITICAL **: pango_layout_set_attributes: assertion `layout != NULL' failed
(.:17319): Pango-CRITICAL **: pango_layout_set_alignment: assertion `layout != NULL' failed
(.:17319): Pango-CRITICAL **: pango_layout_set_ellipsize: assertion `PANGO_IS_LAYOUT (layout)' failed
(.:17319): Pango-CRITICAL **: pango_layout_set_single_paragraph_mode: assertion `PANGO_IS_LAYOUT (layout)' failed
(.:17319): Pango-CRITICAL **: pango_layout_set_width: assertion `layout != NULL' failed
(.:17319): Pango-CRITICAL **: pango_layout_get_extents: assertion `layout != NULL' failed
(.:17319): Gtk-CRITICAL **: gtk_icon_theme_get_for_screen: assertion `GDK_IS_SCREEN (screen)' failed
(.:17319): Gtk-CRITICAL **: gtk_settings_get_for_screen: assertion `GDK_IS_SCREEN (screen)' failed
(.:17319): Gtk-CRITICAL **: gtk_icon_size_lookup_for_settings: assertion `GTK_IS_SETTINGS (settings)' failed
(.:17319): Gtk-WARNING **: Invalid icon size 6
(.:17319): Gtk-CRITICAL **: gtk_icon_theme_load_icon: assertion `GTK_IS_ICON_THEME (icon_theme)' failed
Segmentation fault

我尝试了./ParseHeapDump.sh ../java_pid1491.hprof这并得到了以下错误,

Caused by: java.lang.NoClassDefFoundError: com/ibm/dtfj/image/CorruptDataException
        at org.eclipse.mat.dtfj.InitDTFJ.stop(InitDTFJ.java:70)

3 个答案:

答案 0 :(得分:2)

昨天我在Linux上使用MAT .... 查看正确的版本here

答案 1 :(得分:1)

忘了Jhat,你需要超过100Gybte的RAM才能解析这个转储,它需要永远,而且很难找到一些东西。 我刚刚在SUSE 11机器上安装了MAT。工作完美无瑕。 你能否确保MAT使用正确的JVM?不确定我们是否用SUN / SAP JVM之外的任何东西来测试它。

此致 马库斯(kohlerm

答案 2 :(得分:0)

过去,我们使用Netbeans分析OOM错误。似乎应对Eclipse和JHAT无法应对的地方。