RFR (XXS): 8054362: gc/g1/TestEagerReclaimHumongousRegions2.java timeout

Dmitry Fazunenko dmitry.fazunenko at oracle.com
Mon Aug 18 10:14:00 UTC 2014


Hi Thomas,

On 11.08.2014 13:12, Thomas Schatzl wrote:
> Hi Bengt, Dima,
>
> On Fri, 2014-08-08 at 14:35 +0200, Bengt Rutisson wrote:
>> Hi Thomas and Dima,
>>
>> On 2014-08-07 18:35, Dmitry Fazunenko wrote:
>>
>>> Hi Thomas,
>>>
>>> The fix you made is certainly safe but it makes the test weaker.
>>>
>>> As I see from your explanation the timeout happens only on very slow
>>> machines.
>>> What if test tries to detect if the machine is slow or not and set
>>> the iteration number accordingly.
>>> I mean something like:
>>>
>>> int iterations = 20;
>>> if (Runtime.getRuntime().availableProcessors() < 2 ||
>>>           Runtime.getRuntime().maxMemory() < 1G) {
>>>    // perhaps the machine is slow, reducing iterations to avoid timeout
>>>    iterations = 2;
>>> }
>>>
>>> Another suggestion (not related to that bug). What if update the test to check with various region sizes?
>>> Not only with 1M?
> There does not seem to be new information gain when running the test
> with different region sizes as the problem is independent of it. Also,
> the test has been set up to be highly reproducible using a 1M region
> size and the given heap and object sizes.
>
> It would take considerable effort to modify it for multiple region sizes
> for no noticable gain.

Yes, TestEagerReclaimHumongousRegions2 is the regression test for 
8051973 problem.
Minimal effort is required to update it to cover more. If you don't mind 
I can file an RFE for it.


>> Could we make the test check the time? Maybe do the loop for 1 minute
>> but no more than 20 iterations?
> I implemented this idea as it seems less failure prone than trying to
> guess the speed of the machine. Fast machine easily finish the test
> within the given time, slower ones should get enough coverage.

I agree, this approach is better. The fix looks good to me.
One minor note: I would reduce timeout from 60 seconds to 50 to finish 
normally if timeout is set to 1 minute.

Thanks,
Dima

>
> CR:
> https://bugs.openjdk.java.net/browse/JDK-8054362
>
> Webrev:
> http://cr.openjdk.java.net/~tschatzl/8054362/webrev.1/
>
> Testing:
> jprt, local jtreg
>
> Thanks,
> Thomas
>



More information about the hotspot-gc-dev mailing list