JDK-8209739 : [TESTBUG] javax/imageio/plugins/png/ItxtUtf8Test.java fails with OutOfMemoryError when running in CDS mode
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 12
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2018-08-20
  • Updated: 2019-05-28
  • Resolved: 2018-10-05
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 12
12 b15Fixed
Related Reports
Blocks :  
Relates :  
Description
The javax/imageio/plugins/png/ItxtUtf8Test.java test fails with OutOfMemoryError when running on a JDK binary with existing CDS archive:

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "MainThread"

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "main"
Comments
Test fix will be included in the changes for JDK-8202951.
27-08-2018

[~ccheung]Thanks for additional logs. As the test explicitly specify -Xmx4M in @run main/othervm, it overrides the heap size settings passed in. In the solaris/sparc log from Calvin, it shows 4M is committed for the java heap. The fix is to use larger java heap for the test when the CDS mode becomes default. [0.008s][info][gc,heap] Heap region size: 1M [0.011s][trace][gc,region] G1HR COMMIT(FREE) [0x00000007ffc00000, 0x00000007ffc00000, 0x00000007ffd00000] [0.011s][trace][gc,region] G1HR COMMIT(FREE) [0x00000007ffd00000, 0x00000007ffd00000, 0x00000007ffe00000] [0.011s][trace][gc,region] G1HR COMMIT(FREE) [0x00000007ffe00000, 0x00000007ffe00000, 0x00000007fff00000] [0.011s][trace][gc,region] G1HR COMMIT(FREE) [0x00000007fff00000, 0x00000007fff00000, 0x0000000800000000] [0.011s][debug][gc,alloc,region] Mutator Alloc Region: 0 NULL : initializing [0.011s][debug][gc,alloc,region] Mutator Alloc Region: 0 DUMMY : initialized [0.011s][info ][gc ] Using G1 [0.011s][info ][gc,heap,coops ] Heap address: 0x00000007ffc00000, size: 4 MB, Compressed Oops mode: Zero based, Oop shift amount: 3 [0.012s][trace][gc,region ] G1HR ALLOC(CARC) [0x00000007ffe00000, 0x00000007ffe00000, 0x00000007fff00000] [0.012s][trace][gc,region ] G1HR ALLOC(OARC) [0x00000007ffc00000, 0x00000007ffc00000, 0x00000007ffd00000]
27-08-2018