-
Bug
-
Resolution: Fixed
-
P4
-
17, 21
-
b06
DwarfParser class creates a cleaner using this code:
https://github.com/openjdk/jdk/blob/739769c8fc4b496f08a92225a12d07414537b6c0/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/linux/amd64/DwarfParser.java#L51-L52
Cleaner.create()
.register(this, () -> DwarfParser.destroyDwarfContext(p_dwarf_context));
There are 2 problems with this:
- each new DwarfParser creates a new Cleaner instance. Each cleaner instance has an associated thread, so with a large number of live instances, the number of threads might hit the platform thread limit.
- the created lambda captures the enclosing instance, which in turn means that it will never be eligible for collection, and the cleaner will never run.
https://github.com/openjdk/jdk/blob/739769c8fc4b496f08a92225a12d07414537b6c0/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/linux/amd64/DwarfParser.java#L51-L52
Cleaner.create()
.register(this, () -> DwarfParser.destroyDwarfContext(p_dwarf_context));
There are 2 problems with this:
- each new DwarfParser creates a new Cleaner instance. Each cleaner instance has an associated thread, so with a large number of live instances, the number of threads might hit the platform thread limit.
- the created lambda captures the enclosing instance, which in turn means that it will never be eligible for collection, and the cleaner will never run.
- relates to
-
JDK-8234624 jstack mixed mode should refer DWARF
-
- Resolved
-