-
Bug
-
Resolution: Fixed
-
P3
-
11, 12, 13
-
b25
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8215667 | 13 | Per Liden | P3 | Resolved | Fixed | b01 |
JDK-8216097 | 12.0.1 | Per Liden | P3 | Resolved | Fixed | master |
JDK-8228887 | 11.0.5 | Per Liden | P3 | Resolved | Fixed | b02 |
JNI IsSameObject should resolve the JNIHandles its comparing without keeping the objects they point to alive. Otherwise, checking if a jweak is reachable by doing IsSameObject(jweak, NULL) will be counter productive, as it will make sure that jweak stays alive.
This is currently only a problem when using ZGC, which does concurrent jweak processing.
This was found by the "test/hotspot/jtreg/serviceability/jvmti/HeapMonitor/MyPackage/HeapMonitorThreadTest.java" test, which keeps a list of jweaks, which it will periodically iterate over and do IsSameObject(jweak, NULL) to determine if any of them have been cleared. The end result is the these jweaks will never be cleared and the heap eventually gets full and an OOME is thrown.
This is currently only a problem when using ZGC, which does concurrent jweak processing.
This was found by the "test/hotspot/jtreg/serviceability/jvmti/HeapMonitor/MyPackage/HeapMonitorThreadTest.java" test, which keeps a list of jweaks, which it will periodically iterate over and do IsSameObject(jweak, NULL) to determine if any of them have been cleared. The end result is the these jweaks will never be cleared and the heap eventually gets full and an OOME is thrown.
- backported by
-
JDK-8215667 JNI IsSameObject should not keep objects alive
- Resolved
-
JDK-8216097 JNI IsSameObject should not keep objects alive
- Resolved
-
JDK-8228887 JNI IsSameObject should not keep objects alive
- Resolved
- is blocked by
-
JDK-8210063 ZGC: Enable load barriers for IN_NATIVE runtime barriers
- Resolved