RFR  java/lang/ref/EarlyTimeout.java failed
mandy.chung at oracle.com
Wed Mar 26 17:04:51 UTC 2014
On 3/26/2014 6:15 AM, Ivan Gerasimov wrote:
> The test java/lang/ref/EarlyTimeout.java, which has been recently
> added to the repository with the fix for 6853696 has failed.
> The error message of the failure "more than one references were
> removed from queue" seems to be misguiding.
> I suspect that the real cause of the failure could have been that both
> child thread failed to get the reference during the specified timeout.
> Thus, nonNullRefCount may have been zero and not some value > 1.
Are you able to reproduce the test failure? I think the test verifies
that only one thread gets the reference is a good test.
I think the race is due to the threads get to call queue.remove as soon
as both threads decrement the count of the latch that can be well before
the reference is enqueued.
It'd be good to add additional information in the test to help
diagnosing test failure.
> Here's the trivial fix:
> Sincerely yours,
> Ivan Gerasimov
More information about the core-libs-dev