RFC 8175887: C1 value numbering handling of Unsafe.get*Volatile is incorrect?
Stuart Monteith
stuart.monteith at linaro.org
Mon Feb 27 14:32:05 UTC 2017
Hi,
I've run this particular test with no options manually and a build from
today and see the following:
Will throw any pending exceptions at this point.
Exception in thread "main" java.lang.AssertionError: TEST FAILURES:
org.openjdk.jcstress.tests.coherence.varHandles.fields.opaque.ShortTest
[-client, -XX:-TieredCompilation]: Observed forbidden state: -1, 0
org.openjdk.jcstress.tests.coherence.varHandles.fields.opaque.ShortTest
[-server, -XX:+UnlockDiagnosticVMOptions, -XX:+StressLCM,
-XX:+StressGCM]: Observed forbidden state: -1, 0
org.openjdk.jcstress.tests.coherence.varHandles.fields.opaque.ShortTest
[-server]: Observed forbidden state: -1, 0
org.openjdk.jcstress.tests.coherence.varHandles.fields.opaque.ShortTest
[-server, -XX:-TieredCompilation]: Observed forbidden state: -1, 0
org.openjdk.jcstress.tests.coherence.varHandles.fields.opaque.ShortTest
[-client]: Observed forbidden state: -1, 0
org.openjdk.jcstress.tests.coherence.varHandles.fields.opaque.ShortTest
[-server, -XX:-TieredCompilation, -XX:+UnlockDiagnosticVMOptions,
-XX:+StressLCM, -XX:+StressGCM]: Observed forbidden state: -1, 0
Applying your patch and rerunning this test on the aarch64 machine
causes these tests to pass. Now doing a full run. It should be finished
by Tuesday.
BR,
Stuart
On 27/02/17 09:53, Aleksey Shipilev wrote:
> Hi,
>
> Seeing failures on new jcstress runs:
> http://openjdk.linaro.org/jdk9/jcstress-nightly-runs/2017/056/results/
>
> These "opaque" tests should never fail. I eyeballed the test, and this is not a
> test bug.
>
> C1 does not have intrinsics for Opaque, and therefore it should delegate Opaque
> ops to volatile via fallbacks in Unsafe.java. But now I read the C1
> Unsafe.getObject handling, and my hair stand on end, because I think C1 {L,G}VN
> does not treat volatile Unsafe ops any specially, while it probably should:
> https://bugs.openjdk.java.net/browse/JDK-8175887
>
> Makes sense?
>
> Thanks,
> -Aleksey
>
> P.S. Linaro CI seems misconfigured by always running with C1, so can't see if
> that is C1 specific or not:
> http://mail.openjdk.java.net/pipermail/aarch64-port-dev/2017-February/004246.html
>
More information about the hotspot-compiler-dev
mailing list