简体   繁体   中英

Why can't I see GC roots?

I have an application that crashed with an OutOfMemory. I loaded the phd file from the crash into 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(????). 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).

A new tab opens and displays only a single row, the ArrayList, with the suffix 'Unknown' appended.

So my question is in the title: Why can't I see GC roots?

Various Versions of stuff involved.

Application is running on Websphere 8.x on some 1.6 IBM JRE

Eclipse Memory Analyzer: Version 1.5.0

Diagnostic Tool Framework for Java (for loading the IBM dumps): 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. Sure enough there was another instance of the weird ArrayList which contained Strings consisting of NULL-Bytes. It had only 10 entries though, and took up only a really tiny part of the 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. For the first one, I found a bug, which might be related: http://www-01.ibm.com/support/docview.wss?uid=swg1PI33412

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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