JDK-8227222 : vmTestbase/jit/FloatingPoint/gen_math/Loops04/Loops04.java hits assert(((!attributes->uses_vl()) || (attributes->get_vector_len() == AVX_512bit) || (!_legacy_mode_vl) || (attributes->is_legacy_mode()))) failed: XMM register should be 0-15
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 11.0.12,13,14
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2019-07-03
  • Updated: 2021-03-22
  • Resolved: 2019-07-09
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 13 JDK 14
11.0.12Fixed 13 b29Fixed 14Fixed
Related Reports
Relates :  
Description
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (open/src/hotspot/cpu/x86/assembler_x86.cpp:7829), pid=12091, tid=12105
#  assert(((!attributes->uses_vl()) || (attributes->get_vector_len() == AVX_512bit) || (!_legacy_mode_vl) || (attributes->is_legacy_mode()))) failed: XMM register should be 0-15
#
# JRE version: Java(TM) SE Runtime Environment (14.0+4) (fastdebug build 14-ea+4-82)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 14-ea+4-82, compiled mode, sharing, compressed oops, g1 gc, linux-amd64)
# Problematic frame:
# V  [libjvm.so+0x622bd4]  Assembler::vex_prefix_and_encode(int, int, int, Assembler::VexSimdPrefix, Assembler::VexOpcode, InstructionAttr*) [clone .constprop.66]+0x2d4
#
# Core dump will be written. Default location: /opt/mach5/mesos/work_dir/slaves/ae206c0d-865c-4d69-a16b-c4e90bf2719f-S2048/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/c736fb7f-2a1b-4073-9ba6-bb9c2b5e2de0/runs/f77b5315-7882-4d87-a406-6a6c890af981/testoutput/test-support/jtreg_open_test_hotspot_jtreg_vmTestbase_vm_compiler/scratch/3/core.12091
#
# An error report file with more information is saved as:
# /opt/mach5/mesos/work_dir/slaves/ae206c0d-865c-4d69-a16b-c4e90bf2719f-S2048/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/c736fb7f-2a1b-4073-9ba6-bb9c2b5e2de0/runs/f77b5315-7882-4d87-a406-6a6c890af981/testoutput/test-support/jtreg_open_test_hotspot_jtreg_vmTestbase_vm_compiler/scratch/3/hs_err_pid12091.log
#
Comments
Fix Request [11u]. This is the second of three patches associated with the 11u backport of JDK-8217561. The first is JDK-8217561 itself, the third is JDK-8220407. Patch applies cleanly after JDK-8217561.
16-03-2021

URL: https://hg.openjdk.java.net/jdk/jdk13/rev/d6600ddb85fb User: vdeshpande Date: 2019-07-09 22:46:59 +0000
09-07-2019

[~jbhateja] I've verified that your patch makes the test pass with -Xcomp on my Skylake machine. Also ran Tier 1 on Windows/Mac/Linux and didn't see any issues there.
09-07-2019

[~jbhateja] Your fix seems reasonable to me and reflects my previous comment. However, I'm not able to reproduce the crash on my newer linux/xeon system and I'm not sure I'll have time to sponsor your contribution. So, feel free to post a review request on the mailing list to gather more comments and hopefully an approval.
08-07-2019

In this case, we have vand/vor instructions operating over 32/64 bits operands and crash dump shows that the target is AVX512 but does not support AVX512VL feature. RA constraints the allocation set of an operand by using the register masks associated with operand's register classes. Thus using legacy register classes in the instruction patterns for reduction case will guide allocator to assign register from lower register bank (0-15). Please find below a patch for the same. http://cr.openjdk.java.net/~jbhateja/8227222/webrev.00/
08-07-2019

It seems 'Loops04' involves reductions, so I guess we should try to restrict register allocation to 0-15 in such cases, see: http://hg.openjdk.java.net/jdk/jdk/rev/ff399127078a#l5.254
04-07-2019

# ILW = HML = P2; For now triaging this task as a P2 for JDK 13.
04-07-2019

[~vdeshpande] Please, look and reassign. The code was introduced by JDK-8217561 X86: Add floating-point Math.min/max intrinsics
03-07-2019

Reproduces when running with just -Xcomp: java -Xcomp Loops04 # To suppress the following error report, specify this argument # after -XX: or in .hotspotrc: SuppressErrorAt=/assembler_x86.cpp:7829 # # A fatal error has been detected by the Java Runtime Environment: # # Internal Error (open/src/hotspot/cpu/x86/assembler_x86.cpp:7829), pid=18921, tid=18932 # assert(((!attributes->uses_vl()) || (attributes->get_vector_len() == AVX_512bit) || (!_legacy_mode_vl) || (attributes->is_legacy_mode()))) failed: XMM register should be 0-15 # # JRE version: Java(TM) SE Runtime Environment (14.0+4) (fastdebug build 14-ea+4-97) # Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 14-ea+4-97, compiled mode, sharing, tiered, compressed oops, g1 gc, linux-amd64) # Problematic frame: # V [libjvm.so+0x623164] Assembler::vex_prefix_and_encode(int, int, int, Assembler::VexSimdPrefix, Assembler::VexOpcode, InstructionAttr*) [clone .constprop.66]+0x2d4 # # Core dump will be written. Default location: /opt/mach5/ctornqvi/core.18921 /proc/cpuinfo: processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 85 model name : Intel(R) Xeon(R) Platinum 8167M CPU @ 2.00GHz stepping : 4 microcode : 0x1 cpu MHz : 1995.310 cache size : 16384 KB physical id : 0 siblings : 8 core id : 0 cpu cores : 4 apicid : 0 initial apicid : 0 fpu : yes fpu_exception : yes cpuid level : 13 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon rep_good nopl xtopology cpuid tsc_known_freq pni pclmulqdq vmx ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx avx512f rdseed adx smap avx512cd xsaveopt xsavec xgetbv1 xsaves arat md_clear bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds bogomips : 3990.62 clflush size : 64 cache_alignment : 64 address sizes : 40 bits physical, 48 bits virtual power management:
03-07-2019