RFR: 8248266: ZGC: TestUncommit.java fails due to "Exception: Uncommitted too fast" again

Per Liden per.liden at oracle.com
Fri Jun 26 13:28:29 UTC 2020


Hi,

The test gc/z/TestUncommit.java sometimes fail because of bad timing, 
caused by what appears to be an heavily loaded machine so the test 
thread doesn't get to execute in a timely manner.

I've restructured the test a bit, to be less sensitive to this. Instead 
of sleeping and then checking if uncommit has happened, the test will 
now wait until uncommit happens and record the time. When checking the 
time it now uses TIMEOUT_FACTOR to control how strict the check should be.

To keep things simple, I've also broken out the part that tests with 
uncommit disabled into a separate test.

The change in ZPage/ZPageCache rounds up the last_used/last_committed 
timestamps to the nearest second. Without this we will always be 
rounding the time down, which means we can sometimes uncommit one second 
too early, which is wrong but not a big problem, but this can also cause 
TestUncommit.java to fail with "Uncommitted too fast".

Bug: https://bugs.openjdk.java.net/browse/JDK-8248266
Webrev: http://cr.openjdk.java.net/~pliden/8248266/webrev.0

Testing: Ran TestUncommit 100+ times on all Oracle-platforms.

/Per


More information about the hotspot-gc-dev mailing list