RFR: 8129590: TestShrinkDefragmentedHeap.java runs out of memory

Thomas Schatzl thomas.schatzl at oracle.com
Wed Jul 1 14:37:02 UTC 2015


Hi Stefan,

On Wed, 2015-07-01 at 15:51 +0200, Stefan Johansson wrote:
> Hi,
> 
> Please review this test-fix to avoid:
> https://bugs.openjdk.java.net/browse/JDK-8129590
> 
> Webrev:
> http://cr.openjdk.java.net/~sjohanss/8129590/hotspot.00/
> 
> Summary:
> The test specified the initial heap size and the young generation size 
> but not the maximum heap size. It needs more memory than the initial 
> heap size and in most cases this is not a problem, because the heap can 
> be expanded. But on hosts with very little memory it becomes a problem, 
> because the maximum heap size gets limited to the same size as the 
> initial heap size.
> 
> A simple fix for the issue is to set the the maximum heap size to 
> something a little larger than the initial heap size to make sure the 
> expansion is possible. This might come with other problems if the host 
> can't support the needed heap size, but in such cases I think we should 
> avoid running this test.
> 
> Testing:
> * Verified fix on failing host.
> * Reproduced failure locally by setting small Xmx and verified that 
> making it larger fixes the issue.

  looks good. Could you add this bug id to the @bug line?

Thomas




More information about the hotspot-gc-dev mailing list