RFR (XXS): 6771058: TEST_BUG: java/lang/ref/Basic.java may fail with -server -Xcomp (original) (raw)

Christian Thalinger christian.thalinger at oracle.com
Thu Oct 18 22:37:36 UTC 2012


On Oct 18, 2012, at 3:31 PM, Mandy Chung <mandy.chung at oracle.com> wrote:

Hi Christian,

Thanks for taking on this bug.

Sure. I'm trying to get HotSpot nightly failures down.

Just curious - the test runs with a max of 10 GCs. You reproduced this bug on a slower machine with fastdebug build. If you increase the max number of GCs, I wonder how long the test will take to complete/pass?

Around 14 GCs (runtime with -Xcomp approximately 40 seconds on that particular machine).

With your fix, how many GC does it take to complete? I suspect it's one.

Between 2 and 3 GCs.

I am guessing that the test might want to test that the finalizers are being invoked during GC and references are dequeued. I wonder if there is another alternate fix instead of forcing the finalizers to be run. Just a thought.

The fix was not my idea. I just picked the bug and tried the suggested fix and it worked. The other suggested fix is to increase the sleep time (but I don't like that).

-- Chris

Mandy

On 10/18/2012 2:43 PM, Christian Thalinger wrote: http://cr.openjdk.java.net/~twisti/6771058

6771058: TESTBUG: java/lang/ref/Basic.java may fail with -server -Xcomp Reviewed-by: This test can fail if finalizer of Basic is not called for some reason. It happens in compiled mode if compilation is more slow than execution of the main loop. The fix is to call System.runFinalization() after System.gc() to ensure that finalizer is run. test/java/lang/ref/Basic.java



More information about the core-libs-dev mailing list