user3714601
user3714601

Reputation: 1281

GC roots in IBM java heapdump - is the list complete?

I'm analyzing .phd dump written by IBM JVM with Eclipse MAT.

The view named "gc_roots" displays the following list:

enter image description here

Can I be sure that the list of GC roots is complete?
Does it mean all local variables in stack of running threads are included in "Unknown" section?

Why it was named such BTW?

My doubts about completeness of GC roots list are based on the fact that heap contains several pretty big weakly-referenced char buffers at the moment when OOM is thrown. Which looks to be a violation of the contract, as even SoftReferences must be cleared before OOM.

UPDATE

Here is a list of GC roots from core dump written at the same time, which makes the things even less clear for me. enter image description here

There is no "Unknown" section, but "JNI Global" appears instead. And I still wonder where could be local variables from the stack.

Upvotes: 0

Views: 263

Answers (1)

the8472
the8472

Reputation: 43160

Last-ditch collections are not applicable to some OOME-causes. For example allocation attempts larger than the maximum heap size obviously can never be satisfied and no collection will change that.

You should check the message property of the OOME.

And I still wonder where could be local variables from the stack.

Presumably the Thread category.

Upvotes: 0

Related Questions