Skip to content

Latest commit

 

History

History
30 lines (16 loc) · 1.39 KB

README.md

File metadata and controls

30 lines (16 loc) · 1.39 KB

JFR Leaker

A reproducer for the JDK-8245951 JFR memory leak. The leak is jdk.jfr.internal.TypeLibrary keeps on holding to jdk.jfr.internal.PlatformEventType instances even when the underlying classes are unloaded.

This can for example happen when you redeploy a web application that contains custom JFR events.

The dominator tree shows the issue is jdk.jfr.internal.TypeLibrary.

dominator tree

The histogram shows the issue is jdk.jfr.internal.TypeLibrary holding on to jdk.jfr.internal.PlatformEventType.

histogram

The object list shows the issue is jdk.jfr.internal.TypeLibrary#types holding on to jdk.jfr.internal.PlatformEventType.

list objects

The classloader explorer shows not ClassLoader-leaks.

classloader explorer

The issue can be reproduced with

java -Xmx64m -Xms64m -XX:MaxMetaspaceSize=64m -XX:+UseSerialGC -XX:+HeapDumpOnOutOfMemoryError -jar target/jfr-leaker-0.1.0-SNAPSHOT.jar