2

We got a memory error in our EA and we used -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/path/to/some/dir to dump the heap at the time of OOM.

We had a heap memory of 12GB and perm gen of 256MB.

The heap dump is generated in the Linux box where we have our application running and its size is 11.5GB. We don't have privileges to download it to our local.

When we tried to analyze that 11GB heap dump using JHAT it thrown an OOM.

We tried the following commands from our 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

For all the options its throwing an OOM exception after reading the dump for several minutes(>30 mins).

We googled it and found MAT as a powerful heap dump analyzer, but not a way to use it in LINUX.

Any suggestions would be of greater help. Thanks.

Modified:

Got MAT installed in Linux x86_64 machine but got following error when executed ./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

I tried ./ParseHeapDump.sh ../java_pid1491.hprof this and got following error,

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

3 回答 3

2

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

于 2011-05-17T07:50:54.553 回答
1

忘记 Jhat,你需要超过 100Gybte 的 RAM 来解析这个转储,这将花费很长时间,而且很难找到一些东西。我最近在 SUSE 11 机器上安装了 MAT。完美无瑕地工作。您能否确保 MAT 使用的是正确的 JVM?不确定我们是否使用 SUN/SAP JVM 之外的任何其他东西对其进行测试。

问候,马库斯(科勒姆

于 2011-05-20T12:57:06.023 回答
0

我们过去曾成功使用 Netbeans 分析 OOM 错误。它似乎可以应付 Eclipse 和 JHAT 无法解决的问题。

于 2011-05-20T05:21:35.493 回答