[aarch64-port-dev ] JCStress Failure -WCAS_WCAS

Stuart Monteith stuart.monteith at linaro.org
Fri Sep 16 12:52:01 UTC 2016


Thanks Aleksey,
   I've have tests-chapter-1a compiling by generating a jar to use
"--add-patch" against so that @sun.misc.Contended will apparently be
in the jdk.unsupported module, but of course, that's not the problem
once you actually try to run.

Your changes look good to me, with the exception of the Padding. There
is an Aarch64 system that requires 128 bytes of padding to avoid
contention. If I interpret what you've written correctly, the booleans
you use for padding will be 64 bytes in length. Am I correct in
thinking booleans are 4 bytes in Hotspot fields?  The @Contended flag
has the correct behaviour as it can query the appropriate granule
size.

I guess it would be possible run launch java with
"-XX:+PrintFlagsFinal" and parse out:
     intx ContendedPaddingWidth                    = 128
                       {product} {default}

or take a property to configure JCStress explicitly. Or just have the
largest known value for everyone.

I'll have a go with your patches.

Thanks again,
   Stuart

On 16 September 2016 at 12:10, Aleksey Shipilev <shade at redhat.com> wrote:
> Hi Stuart,
>
> On 09/15/2016 07:15 PM, Stuart Monteith wrote:
>> These failures indicate that both actor's calls to weakCompareAndSet
>> are failing. However, as the test cases don't test for that they are
>> marked as "FORBIDDEN".
>>
>> I don't believe that that is correct. Because the compare and sets are
>> weak, they will be subject to spurious failures, and that is what I'll
>> be seeing.
>>
>> Would it be appropriate to set the testcases to something like the following?
>>
>>     @Outcome(id = "1, 10", expect = Expect.ACCEPTABLE_SPEC, desc = "T1
>> & T2 spurious failure")
>>
>> and for boolean:
>>
>>     @Outcome(id = "0, 0", expect = Expect.ACCEPTABLE, desc = "T1 & T2
>> failed spuriously")
>
> Agreed. This is the error in test grading. Both suggestions look fine, I
> did this change:
>   http://hg.openjdk.java.net/code-tools/jcstress/rev/3040c983b52c
>
>
>> I might have submitted a patch, but currently I'm unable to build
>> JCStress. This patch in langtools has cause the use of
>> "-Xmodule:jdk.unsupported" in tests-chapter-1a/pom.xml to no longer
>> work:
>>
>> 8164745: javac -Xmodule compiles the module in a way that reads the
>> unnamed module Summary: Ensuring proper separation between named
>> modules the unnamed module when using -Xmodule
>
> Yes, thanks. The day of reckoning is upon us for using that
> Jigsaw-specific hack. Rewritten to avoid dealing with Jigsaw:
>   http://hg.openjdk.java.net/code-tools/jcstress/rev/5938d81bff44
>
>
>> In addition, "weakCompareAndSetVolatile" has been changed to
>> "weakCompareAndSetPlain" which requires more changes to jcstress.
>
> This, and other API fixes for VarHandles are done now. jcstress should
> now be buildable with JDK 9b135 (latest EA):
>   http://hg.openjdk.java.net/code-tools/jcstress/rev/162fe8f8a34c
>
> Please let me know if you run into more problems. We would need to dust
> off the VarHandles testing in jcstress pretty soon anyway.
>
> Thanks,
> -Aleksey
>


More information about the aarch64-port-dev mailing list