简体   繁体   English

为什么我看不到GC的根源?

[英]Why can't I see GC roots?

I have an application that crashed with an OutOfMemory. 我有一个与OutOfMemory崩溃的应用程序。 I loaded the phd file from the crash into Eclipse Memory Analyzer. 我将崩溃的phd文件加载到Eclipse Memory Analyzer中。 I promptly identified a rather suspicious ArrayList with about 5,700,000 entries, each being a String with the content of 16 null bytes(????). 我迅速找到了一个相当可疑的ArrayList,其中包含大约5,700,000个条目,每个条目都是一个内容为16个空字节的字符串(????)。 Note: I didn't check all entries but inspected a somewhat smaller sample. 注意:我没有检查所有条目,但检查了一些较小的样本。

Unsurprisingly I'm interested who is holding on to such a stupid thing, so I right clicked on the ArrayList and opened the 'Path to GC Roots' (with all references or with some exclusion, it doesn't seem to make a difference). 不出所料我感兴趣的是谁坚持这样一个愚蠢的事情,所以我右键点击了ArrayList并打开了“GC Roots的路径”(所有引用或一些排除,它似乎没有区别) 。

A new tab opens and displays only a single row, the ArrayList, with the suffix 'Unknown' appended. 将打开一个新选项卡,仅显示一行ArrayList,并附加后缀“未知”。

So my question is in the title: Why can't I see GC roots? 所以我的问题在标题中:为什么我看不到GC的根源?

Various Versions of stuff involved. 涉及的各种版本的东西。

Application is running on Websphere 8.x on some 1.6 IBM JRE 应用程序在某些1.6 IBM JRE上的Websphere 8.x上运行

Eclipse Memory Analyzer: Version 1.5.0 Eclipse Memory Analyzer:1.5.0版

Diagnostic Tool Framework for Java (for loading the IBM dumps): 1.10.0.201211161052 Java诊断工具框架(用于加载IBM转储):1.10.0.201211161052

It looks like the heap dump is just incomplete. 看起来堆转储只是不完整。 My personal theory is, that due to the lack of memory, writing out the heap doesn't work completely reliable. 我个人的理论是,由于缺乏内存,写出堆不能完全可靠。

I created a fresh heapdump from the application while it was working fine. 我在应用程序运行良好时创建了一个新的heapdump。 Sure enough there was another instance of the weird ArrayList which contained Strings consisting of NULL-Bytes. 果然有另一个奇怪的ArrayList实例,其中包含由NULL-Bytes组成的字符串。 It had only 10 entries though, and took up only a really tiny part of the Heap. 它虽然只有10个条目,但只占了Heap的一小部分。

That ArrayList had two paths to the GC-Root "System Class" one via com.ibm.ws.security.core.WSAccessManager and one through com.ibm.ws.security.util.MultiDomainHelper. 该ArrayList有两个通过com.ibm.ws.security.core.WSAccessManager到GC-Root“System Class”的路径,另一个通过com.ibm.ws.security.util.MultiDomainHelper。 For the first one, I found a bug, which might be related: http://www-01.ibm.com/support/docview.wss?uid=swg1PI33412 对于第一个,我发现了一个可能与之相关的错误: http//www-01.ibm.com/support/docview.wss?uid = swg1PI33412

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

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