JDK-8075071 : [TEST_BUG] TimSortStackSize2.java: OOME: Java heap space: MaxHeap shrinked by MaxRAMFraction
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.util
  • Affected Version: 9
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2015-03-12
  • Updated: 2021-06-28
  • Resolved: 2015-03-24
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 8 JDK 9 Other
8u311Fixed 9 b57Fixed openjdk8u302Fixed
Related Reports
Duplicate :  
Relates :  
Description
In the latest night run the following error was encountered:

----------messages:(3/165)----------
command: main -Xms385m TimSortStackSize2 67108864
reason: User specified action: run main/othervm -Xms385m TimSortStackSize2 67108864 
elapsed time (seconds): 1.758
----------System.out:(0/0)----------
----------System.err:(15/829)----------
java.lang.OutOfMemoryError: Java heap space
	at TimSortStackSize2.createArray(TimSortStackSize2.java:164)
	at TimSortStackSize2.doTest(TimSortStackSize2.java:59)
	at TimSortStackSize2.main(TimSortStackSize2.java:43)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:502)
	at com.sun.javatest.regtest.MainWrapper$MainThread.run(MainWrapper.java:94)
	at java.lang.Thread.run(Thread.java:745)

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
Review approval: https://mail.openjdk.java.net/pipermail/jdk8u-dev/2021-March/013553.html
18-03-2021

Fix Request (JDK8u) Request for a JDK8u-friendly version of this changeset to be backported to JDK8u as part of a set of changes to prevent an OOM being thrown during a -XX:-UseCompressedOops run (See JDK-8263099). https://cr.openjdk.java.net/~phh/8075071/webrev.8u.jdk.03/ The only modification made to the changeset was switching /../../test/lib for /lib, as per JDK-8140189. Otherwise this test wouldn't work after this change.
15-03-2021

Problem is that -XX:MaxRAMFraction= may shrink MaxHeapSize down to -Xms specified value, despite default ergonomics-driven MaxHeapSize of -UseCompressedOops. Test will pass with -Xmx770m on -XX:-UseCompressedOops. posted for review: http://mail.openjdk.java.net/pipermail/core-libs-dev/2015-March/032316.html
16-03-2015