RFR: 8132306: java/lang/ref/ReferenceEnqueue.java fails with "RuntimeException: Error: poll() returned null; expected ref object"

Thomas Schatzl thomas.schatzl at oracle.com
Wed Jul 29 07:59:41 UTC 2015

Hi Kim,

On Wed, 2015-07-29 at 03:57 -0400, Kim Barrett wrote:
> Please review this fix of a race condition in
> j.l.r.Reference/ReferenceQueue.  See comments in the bug report for a
> description of the race.  The race is being fixed by reordering a pair
> of volatile assignments.
> CR:
> https://bugs.openjdk.java.net/browse/JDK-8132306
> Webrev:
> http://cr.openjdk.java.net/~kbarrett/8132306/webrev.00/
> Testing:
> jprt with default and hotspot testsets
> Locally tested race in original code by insertion of sleep in enqueue and
> verifying ReferenceEnqueue regression test fails consistently as
> described in the bug report.
> Locally tested fixed code by insertion of sleeps at various points and
> verifying ReferenceEnqueue regression test still passes.

  looks good.

Thanks for taking care of this so quickly,

More information about the core-libs-dev mailing list