JDK-8213134 : AArch64: vector shift failed with MaxVectorSize=8
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 8-aarch64,11,12
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: linux
  • CPU: aarch64
  • Submitted: 2018-10-30
  • Updated: 2021-12-21
  • Resolved: 2018-12-14
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 11 JDK 12 JDK 13 Other
11.0.11-oracleFixed 12 b25Fixed 13Fixed openjdk8u292Fixed
Related Reports
Relates :  
Relates :  
Description
Test case:
  public static void shiftL(int[] a, int b, int[] c) {
    for (int i = 0; i < a.length; i++) {
        c[i] = (int)(a[i] << b);
    }
  }

  public static void aShiftR(int[] a, int b, int[] c) {
    for (int i = 0; i < a.length; i++) {
        c[i] = (int)(a[i] >> b);
    }
  }

  public static void shiftR(int[] a, int b, int[] c) {
    for (int i = 0; i < a.length; i++) {
        c[i] = (int)(a[i] >>> b);
    }
  }

Java option:
-XX:MaxVectorSize=8


error log:
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x0000ffffae170980, pid=30399, tid=30410
#
# JRE version: OpenJDK Runtime Environment (12.0) (fastdebug build 12-internal+0-adhoc.yanzha01.jdksrc)
# Java VM: OpenJDK 64-Bit Server VM (fastdebug 12-internal+0-adhoc.yanzha01.jdksrc, compiled mode, sharing, compressed oops, g1 gc, linux-aarch64)
# Problematic frame:
# V  [libjvm.so+0x2fd980]  MachNode::ideal_reg() const+0x38
#
# Core dump will be written. Default location: Core dumps may be processed with "/usr/share/apport/apport %p %s %c %d %P" (or dumping to /home/yanzha01/jdk/test/samples/java/vectorization/core.30399)
#
# An error report file with more information is saved as:
# /home/yanzha01/jdk/test/samples/java/vectorization/hs_err_pid30399.log
#
# Compiler replay data is saved as:
# /home/yanzha01/jdk/test/samples/java/vectorization/replay_pid30399.log
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
#

Root cause:
Current vshiftcntL/R instructions didn't support 64-bit vector.



Comments
Fix Request for jdk11u What: Original patch applies as is to jdk11u Why: it stops a potential VM crash Testing: tier1 testing succeeds Updated TestXXXVect tests succeed after the patch (where previously the *updated* tests failed) Risk: low and restricted only to AArch64 builds
13-08-2019

URL: http://hg.openjdk.java.net/jdk/jdk12/rev/11f59b9c72fe User: aph Date: 2018-12-14 15:04:31 +0000
14-12-2018

http://mail.openjdk.java.net/pipermail/hotspot-dev/2018-November/035280.html I have sent the patch for review. I think it might be merged soon.
30-11-2018

Hi [~yzhang], Request your help. (Please note based on JDK 12 schedule I am checking possible deferral candidates of JDK 12 hotspot/compiler tasks - http://openjdk.java.net/projects/jdk/12/) Are you planning 8213134 fix to be in JDK 12? (else you may please change the 'Fix Version' in JBS to 'tbd' for now and update with a correct version later when available). Thanks.
29-11-2018