RFR: 8029186: regression-hotspot nightly failure: assert(FLAG_IS_DEFAULT(MaxNewSize) || MaxNewSize < MaxHeapSize) failed
Jesper Wilhelmsson
jesper.wilhelmsson at oracle.com
Wed Mar 26 14:59:48 UTC 2014
Oh how I love the duplicated storage. Good thing it's going away at some point...
Looks even better with this change ;-)
Ship it!
/Jesper
Stefan Johansson skrev 26/3/14 11:48:
> Thanks Jesper for looking at this.
>
> I actually found an issue myself when going over the code. The problem is in
> initialize_flags for the TwoGenerationalPolicy, where I verify that the desired
> new_size is within the allowed bounds. I realized that I need to check against
> the flag MaxNewSize since the member might not have been initialized yet. Below
> is the diff for the change and an updated webrev can be found here:
> http://cr.openjdk.java.net/~sjohanss/8029186/webrev.01/
>
> ---
> @@ -422,7 +422,9 @@
> if (FLAG_IS_CMDLINE(OldSize) && !FLAG_IS_CMDLINE(NewSize)) {
> if (OldSize < _initial_heap_byte_size) {
> size_t new_size = _initial_heap_byte_size - OldSize;
> - if (new_size >= _min_gen0_size && new_size <= _max_gen0_size) {
> + // Need to compare against the flag value for max since _max_gen0_size
> + // might not have been set yet.
> + if (new_size >= _min_gen0_size && new_size <= MaxNewSize) {
> FLAG_SET_ERGO(uintx, NewSize, new_size);
> _initial_gen0_size = NewSize;
> }
> ---
>
> Thanks,
> Stefan
>
> On 2014-03-25 17:33, Jesper Wilhelmsson wrote:
>> Ship it!
>> /Jesper
>>
>> Stefan Johansson skrev 25/3/14 16:29:
>>> Hi,
>>>
>>> Please review this fix for:
>>> https://bugs.openjdk.java.net/browse/JDK-8029186
>>>
>>> Webrev:
>>> http://cr.openjdk.java.net/~sjohanss/8029186/webrev.00/
>>>
>>> Summary:
>>> There have been a lot of bugs due to corner cases with heap sizing flags. This
>>> change strives to fix this particular problem and at the same time somewhat
>>> simplify the collector policy. I've also added some assertions to ensure that
>>> the sizing of the heap is more correct.
>>>
>>> Testing:
>>> * JPRT sanity and JTREG
>>> * Adhoc aurora run for tmtools tests
>>> * Script that verifies that we don't get assertions during startup for different
>>> combinations of NewSize, MaxNewSize, OldSize, Xms and Xmx.
>>>
>>> Thanks,
>>> StefanJ
>
More information about the hotspot-gc-dev
mailing list