JDK-8222786 : Shenandoah get_barrier_strength should accept all shapes of (Weak)CAS reference barriers
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 11-shenandoah,13
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2019-04-20
  • Updated: 2019-10-21
  • Resolved: 2019-04-22
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 13
13 b18Fixed
Related Reports
Blocks :  
Description
I have multiple test failures while running jcstress on current jdk/jdk. All of them seem to point to the same thing:

# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/home/shade/trunks/jdk-jdk/src/hotspot/share/gc/shenandoah/c2/shenandoahSupport.cpp:3248), pid=27815, tid=27831
#  Error: ShouldNotReachHere()

This is not fatal for product builds, as it would default to STRONG barrier, but it breaks fastdebug testing with superfluous failures.

Reproduces easily with:

$ jdk-jdk/build/linux-x86_64-server-fastdebug/images/jdk/bin/java -jar jcstress-latest.jar --jvmArgs "-XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC" -t varHandles -m quick

The failing nodes are either WeakCompareAndSwapN or CompareAndExchangeN:

         1912		===  1949  1947  1913  1030  1032  [[ 1909  1911  1953 ]]  !orig=1034 !jvms: VarHandleReferences$FieldInstanceReadWrite::weakCompareAndSetAcquire @ bci:34 VarHandleGuards::guard_LLL_Z @ bci:37 WeakCompareAndSetAcquireString::actor2 @ bci:8 WeakCompareAndSetAcquireString_jcstress::actor2 @ bci:80
         1921	WeakCompareAndSwapN	===  1960  1958  1922  1034  1036  [[ 1918  1920  1964 ]]  !orig=1038 !jvms: VarHandleReferences$FieldInstanceReadWrite::weakCompareAndSet @ bci:34 VarHandleGuards::guard_LLL_Z @ bci:37 WeakCompareAndSetString::actor1 @ bci:8 WeakCompareAndSetString_jcstress::actor1 @ bci:80
         1921	WeakCompareAndSwapN	===  1960  1958  1922  1034  1036  [[ 1918  1920  1964 ]]  !orig=1038 !jvms: VarHandleReferences$FieldInstanceReadWrite::weakCompareAndSet @ bci:34 VarHandleGuards::guard_LLL_Z @ bci:37 WeakCompareAndSetString::actor1 @ bci:8 WeakCompareAndSetString_jcstress::actor1 @ bci:80
         1901	WeakCompareAndSwapN	===  1938  1936  1902  1029  1031  [[ 1898  1900 ]]  !orig=1033 !jvms: VarHandleReferences$FieldInstanceReadWrite::weakCompareAndSetPlain @ bci:34 VarHandleGuards::guard_LLL_Z @ bci:37 WeakCompareAndSetPlainString::actor2 @ bci:8 WeakCompareAndSetPlainString_jcstress::actor2 @ bci:80
         1756	WeakCompareAndSwapN	===  1790  1788  1757  894  896  [[ 1753  1755 ]]  !orig=898 !jvms: VarHandleReferences$FieldInstanceReadWrite::weakCompareAndSetRelease @ bci:34 VarHandleGuards::guard_LLL_Z @ bci:37 WeakCompareAndSetReleaseString::actor1 @ bci:8 WeakCompareAndSetReleaseString_jcstress::actor1 @ bci:80
         1911	WeakCompareAndSwapN	===  1950  1948  1912  1034  1036  [[ 1908  1910 ]]  !orig=1038 !jvms: VarHandleReferences$FieldInstanceReadWrite::weakCompareAndSetRelease @ bci:34 VarHandleGuards::guard_LLL_Z @ bci:37 WeakCompareAndSetReleaseString::actor1 @ bci:8 WeakCompareAndSetReleaseString_jcstress::actor1 @ bci:80
         3373	WeakCompareAndSwapN	===  3405  3403  3374  884  886  [[ 3370  3372 ]]  !orig=888 !jvms: VarHandleReferences$FieldInstanceReadWrite::weakCompareAndSetPlain @ bci:34 VarHandleGuards::guard_LLL_Z @ bci:37 WeakCompareAndSetPlainString::actor1 @ bci:8 WeakCompareAndSetPlainString_jcstress::actor1 @ bci:80
         1039	CompareAndExchangeN	===  1028  1029  1022  1035  1037  [[ 1040  1041  1047 ]]  !jvms: VarHandleReferences$FieldInstanceReadWrite::compareAndExchange @ bci:34 VarHandleGuards::guard_LLL_L @ bci:37 CompareAndExchangeString::actor1 @ bci:8 CompareAndExchangeString_jcstress::actor1 @ bci:80
         893	CompareAndExchangeN	===  882  883  880  889  891  [[ 894  895  901 ]]  !jvms: VarHandleReferences$FieldInstanceReadWrite::compareAndExchangeAcquire @ bci:34 VarHandleGuards::guard_LLL_L @ bci:37 CompareAndExchangeAcquireString::actor2 @ bci:8 CompareAndExchangeAcquireString_jcstress::actor2 @ bci:80
         2102	WeakCompareAndSwapN	===  2139  2137  2103  1030  1032  [[ 2099  2101  2143 ]]  !orig=1034 !jvms: VarHandleReferences$FieldInstanceReadWrite::weakCompareAndSetAcquire @ bci:34 VarHandleGuards::guard_LLL_Z @ bci:37 WeakCompareAndSetAcquireString::actor1 @ bci:8 WeakCompareAndSetAcquireString_jcstress::actor1 @ bci:80
         1039	CompareAndExchangeN	===  1028  1029  1022  1035  1037  [[ 1040  1041 ]]  !jvms: VarHandleReferences$FieldInstanceReadWrite::compareAndExchangeRelease @ bci:34 VarHandleGuards::guard_LLL_L @ bci:37 CompareAndExchangeReleaseString::actor1 @ bci:8 CompareAndExchangeReleaseString_jcstress::actor1 @ bci:80