JDK-8232712 : Shenandoah: SIGBUS in load_reference_barrier_native
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 14
  • Priority: P1
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2019-10-21
  • Updated: 2020-03-03
  • Resolved: 2019-10-21
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 14
14 b20Fixed
Related Reports
Relates :  
Relates :  
This readily happens on AArch64 and jcstress with Shenandoah enabled after JDK-8232010.

$ wget https://builds.shipilev.net/jcstress/jcstress-tests-all-20191016.jar
$ build/linux-aarch64-server-fastdebug/images/jdk/bin/java -jar jcstress-tests-all-20191016.jar --jvmArgsPrepend "-XX:+UnlockExperimentalVMOptions -XX:+UnlockDiagnosticVMOptions -XX:+UseShenandoahGC" -m quick -t CAE

# A fatal error has been detected by the Java Runtime Environment:
#  SIGBUS (0x7) at pc=0x0000ffffbd2cc2e4, pid=29007, tid=29010
# JRE version: OpenJDK Runtime Environment (14.0) (fastdebug build 14-internal+0-adhoc.shade.jdk-jdk)
# Java VM: OpenJDK 64-Bit Server VM (fastdebug 14-internal+0-adhoc.shade.jdk-jdk, mixed mode, sharing, compressed oops, shenandoah gc, linux-aarch64)
# Problematic frame:
# V  [libjvm.so+0x10bc2e4]  ShenandoahHeap::cas_oop(oop, oop*, oop)+0x70
# No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp

---------------  S U M M A R Y ------------

Command Line: -XX:+UnlockExperimentalVMOptions -XX:+UnlockDiagnosticVMOptions -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=aggressive -XX:-TieredCompilation -XX:+UnlockDiagnosticVMOptions -XX:+StressLCM -XX:+StressGCM org.openjdk.jcstress.vm.SimpleTestMain

Host: merino.lab2.eng.bos.redhat.com, AArch64, 46 cores, 95G, Red Hat Enterprise Linux Server release 7.6 (Maipo)
Time: Mon Oct 21 07:28:00 2019 EDT elapsed time: 0 seconds (0d 0h 0m 0s)

---------------  T H R E A D  ---------------

Current thread (0x0000ffffb4061000):  JavaThread "main" [_thread_in_Java, id=29010, stack(0x0000ffffbbf50000,0x0000ffffbc150000)]

Stack: [0x0000ffffbbf50000,0x0000ffffbc150000],  sp=0x0000ffffbc14d2f0,  free space=2036k
Native frames: (J=compiled Java code, A=aot compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0x10bc2e4]  ShenandoahHeap::cas_oop(oop, oop*, oop)+0x70
V  [libjvm.so+0x12a3594]  oop ShenandoahBarrierSet::load_reference_barrier_native_impl<oop>(oop, oop*)+0x1ac
V  [libjvm.so+0x129f674]  ShenandoahBarrierSet::load_reference_barrier_native(oop, oop*)+0x44
V  [libjvm.so+0x1344ca8]  ShenandoahRuntime::load_reference_barrier_native(oopDesc*, oop*)+0x108

This is only relevant with native-barriers, which don't exist in 8u and 11. Dropping affects-versions.

URL: https://hg.openjdk.java.net/jdk/jdk/rev/190ec5fae2af User: zgu Date: 2019-10-21 18:26:36 +0000

I totally missed aarch64 in recent load barrier changes. In aarch64 load barrier, it did not setup load_addr parameter for runtime call, hence, it cas'ed on bogus address.