我們在EA中遇到內存錯誤,我們使用-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/path/to/some/dir
在OOM時轉儲堆。巨大的堆轉儲(11GB) - Jhat失敗和Eclipse MAT需要幫助
我們有一個12GB的堆內存和256MB的perm gen。
堆轉儲是在我們運行我們的應用程序並且其大小爲11.5GB的Linux框中生成的。我們無權將其下載到我們的本地。
當我們試圖用JHAT它拋出OOM來分析11GB堆轉儲。
我們從我們的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使用它。
任何建議會有更大的幫助。謝謝。
修改:
了MAT安裝在Linux的x86_64的機器,但在執行時./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)
第一誤差是很正常的,因爲沒有可用的顯示,你是在SSH。 對於第二個錯誤,也許你可以找到答案[這裏](http://www.eclipse.org/forums/index.php?t=msg&goto=652942&S=237ea1900130ae87306793cd0f38015f) – Grooveek 2011-05-18 09:44:14
SAP捐贈MAT代碼Eclipse基金會,並在缺少dtfj的情況下提供[link](http://wiki.eclipse.org/index.php/MemoryAnalyzer#System_Dumps_and_Heap_Dumps_from_IBM_Virtual_Machines)。也許如果你安裝它... – Grooveek 2011-05-18 09:50:41
我已經檢查了第一[link](http://www.eclipse.org/forums/index.php?t=msg&goto=652942&S=237ea1900130ae87306793cd0f38015f)你給。我用可用的特徵罐替換了給定的罐子。它使整個MAT損壞。第二[鏈接](http://wiki.eclipse.org/index.php/MemoryAnalyzer#System_Dumps_and_Heap_Dumps_from_IBM_Virtual_Machines),我還沒有測試,並會回覆你。謝謝。 – raksja 2011-05-18 10:47:06