JDK-8209920 : runtime/logging/RedefineClasses.java fail with OOME with ZGC
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 12
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: linux
  • CPU: x86_64
  • Submitted: 2018-08-24
  • Updated: 2022-05-18
  • Resolved: 2018-08-27
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11 JDK 12
11.0.16Fixed 12 b09Fixed
Related Reports
Relates :  
Description
----------System.err:(13/791)----------
java.lang.OutOfMemoryError: Java heap space
	at RedefineClasses.main(RedefineClasses.java:56)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
	at java.base/java.lang.Thread.run(Thread.java:834)

JavaTest Message: Test threw exception: java.lang.OutOfMemoryError: Java heap space
JavaTest Message: shutting down test

STATUS:Failed.`main' threw exception: java.lang.OutOfMemoryError: Java heap space
Comments
Fix request [11u] I backport this test-only change for parity with 11.0.17-oracle. No risk, only a test change. Clean backport. Test passes. SAP nighlty testing passed.
18-05-2022

A pull request was submitted for review. URL: https://git.openjdk.java.net/jdk11u-dev/pull/1088 Date: 2022-05-16 11:53:09 +0000
16-05-2022

Git URL: https://github.com/openjdk/jdk/commit/f71d1cb124eb40067845653cb24a19a3ea545625
16-05-2022

URL: http://hg.openjdk.java.net/jdk/jdk/rev/f23312250f25 User: lmesnik Date: 2018-08-27 19:46:21 +0000
27-08-2018

The failure itself might be avoided by increasing heap/metaspace. While the whole idea id to redefine and trigger unloading so vm.opt.final.ClassUnloading is still required to make this test useful
24-08-2018

The failure is ZGC specific, needs to mark test with @requires vm.opt.final.ClassUnloading
24-08-2018