[lworld] RFR: 8376461: [lworld] serviceability/jvmti/valhalla/HeapDump/HeapDump.java fails More than 1 instances of 'TestClass' found

Alex Menkov amenkov at openjdk.org
Thu Feb 19 23:06:29 UTC 2026


On Thu, 19 Feb 2026 02:29:43 GMT, Chris Plummer <cjplummer at openjdk.org> wrote:

> I assume we don't have any test library code that will determine liveness of objects in the heap dump.

I think no.

> Could we possibly fix this with a forced GC before the heap dump?

Digged a bit deeper here.
The test uses `jcmd <pid> GC.heap_dump` and by default it dumps only live object.
So my assumption that the object is unreachable was incorrect.
JDK-8376135 introduced `null_reset_value instance` (instance with zero fields) and the instance is live, so it's dumped.

-------------

PR Comment: https://git.openjdk.org/valhalla/pull/2109#issuecomment-3930638172


More information about the valhalla-dev mailing list