Probably a bug

Aleksey Shipilev shade at redhat.com
Tue Feb 25 21:10:41 UTC 2020


On 2/25/20 10:37 AM, Aleksey Shipilev wrote:
> On 2/24/20 11:22 PM, Kirill A. Korinsky wrote:
>> After playing really a while I've created a very trivial test case: https://github.com/catap/shenandoah-akka-bug <https://github.com/catap/shenandoah-akka-bug>
> 
> Thank you.
> 
> It can be run without docker-compose with just a naked JDK binary.
> 
> This reliably fails with Future timeout for me:
> 
> $ mvn package
> $ cd target/shenandoah-akka-bug-1.0.0-dist/shenandoah-akka-bug-1.0.0
> $ EXTERNAL_ADDR=127.0.0.1
> ~/trunks/shenandoah-jdk8/build/linux-x86_64-normal-server-fastdebug/images/j2sdk-image/bin/java
> -Xmx1g -XX:+UseShenandoahGC -XX:+UnlockDiagnosticVMOptions -XX:ShenandoahGCHeuristics=aggressive
> -XX:TieredStopAtLevel=1 -jar bin/shenandoah-akka-bug-1.0.0.jar
> 
> What it seems to tell me:
>  a) It fails only with -XX:TieredStopAtLevel=1. It does not seem to fail with -Xint or
> -XX:-TieredCompilation, which suggests this is C1 problem;
>  b) It does not seem to fail with -XX:ShenandoahGCMode=passive, which suggests this trouble  is
> somewhere in Shenandoah C1 barriers or around it;
>  c) It does not fail with -XX:ShenandoahGCMode=passive and all barriers enabled back, which suggests
> it is somewhere in the mid/slowpath of Shenandoah C1 barrier.

And here is the fix, in line with those observations:
  https://mail.openjdk.java.net/pipermail/shenandoah-dev/2020-February/011516.html

It passes the reproducer for me.

If you are running sh/jdk8 nightlies, then b575 onwards has it:

$ curl
https://builds.shipilev.net/openjdk-shenandoah-jdk8/openjdk-shenandoah-jdk8-latest-linux-x86_64-release.tar.xz
| tar xJf -

$ j2sdk-image/bin/java -version
openjdk version "1.8.0-builds.shipilev.net-openjdk-shenandoah-jdk8"
OpenJDK Runtime Environment (build 1.8.0-builds.shipilev.net-openjdk-shenandoah-jdk8-b575-20200225)
OpenJDK 64-Bit Server VM (build 25.71-b575-20200225, mixed mode)

$ grep "do_UnsafeGetAndSetObject" j2sdk-image/bom-changesets-hotspot.log
summary:     Fix LRB use in LIRGenerator::do_UnsafeGetAndSetObject

$ docker run --rm -it shipilev/openjdk-shenandoah:8 java -XX:+UseShenandoahGC -version
openjdk version "1.8.0-builds.shipilev.net-openjdk-shenandoah-jdk8"
OpenJDK Runtime Environment (build 1.8.0-builds.shipilev.net-openjdk-shenandoah-jdk8-b575-20200225)
OpenJDK 64-Bit Server VM (build 25.71-b575-20200225, mixed mode)


-- 
Thanks,
-Aleksey



More information about the shenandoah-dev mailing list