JDK-8158214 : Crash with "assert(VM_Version::supports_sse4_1()) failed" if UseSSE < 4 is set
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 8u92,9
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • CPU: x86,x86_64
  • Submitted: 2016-05-31
  • Updated: 2021-09-15
  • Resolved: 2016-06-02
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 9
9 b126Fixed
Related Reports
Relates :  
Relates :  
Description
If UseSSE is set to a value smaller than 4, the VM crashes during startup:

#  Internal Error (/oracle/8157842/hotspot/src/cpu/x86/vm/assembler_x86.cpp:3621), pid=3642, tid=3643
#  Error: assert(VM_Version::supports_sse4_1()) failed

Stack: [0x00007fc28eabc000,0x00007fc28ebbd000],  sp=0x00007fc28ebbaf80,  free space=1019k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0x158e45f]  VMError::report_and_die(int, char const*, char const*, __va_list_tag*, Thread*, unsigned char*, void*, void*, char const*, int, unsigned long)+0x18f
V  [libjvm.so+0x158f24a]  VMError::report_and_die(Thread*, char const*, int, char const*, char const*, __va_list_tag*)+0x4a
V  [libjvm.so+0xa2812a]  report_vm_error(char const*, int, char const*, char const*, ...)+0xea
V  [libjvm.so+0x64b4d3]  Assembler::pinsrd(XMMRegisterImpl*, RegisterImpl*, int)+0x183
V  [libjvm.so+0x10f35ad]  MacroAssembler::kernel_crc32(RegisterImpl*, RegisterImpl*, RegisterImpl*, RegisterImpl*, RegisterImpl*)+0x73d
V  [libjvm.so+0x1463bec]  StubGenerator::generate_initial()+0x155c
V  [libjvm.so+0x1441ac7]  StubGenerator_generate(CodeBuffer*, bool)+0x37
V  [libjvm.so+0x14671a0]  StubRoutines::initialize1()+0x120
V  [libjvm.so+0xd137f1]  init_globals()+0x71
V  [libjvm.so+0x1504afe]  Threads::create_vm(JavaVMInitArgs*, bool*)+0x2ae
V  [libjvm.so+0xe50c9b]  JNI_CreateJavaVM+0x9b
C  [libjli.so+0x3933]  JavaMain+0x83
C  [libpthread.so.0+0x8182]  start_thread+0xc2
Comments
URL: http://hg.openjdk.java.net/jdk9/jdk9/hotspot/rev/1605f0d9b2d1 User: lana Date: 2016-07-06 20:17:31 +0000
06-07-2016

URL: http://hg.openjdk.java.net/jdk9/hs-comp/hotspot/rev/1605f0d9b2d1 User: thartmann Date: 2016-06-02 14:55:12 +0000
02-06-2016

New webrev using pinsrw and shift if SSE 4.1 is not available: http://cr.openjdk.java.net/~thartmann/8158214/webrev.01/
01-06-2016

ILW = Crash or unsupported code being emitted, only on old platforms or with UseSSE < 4, workaround with -XX:-UseCRC32Intrinsics = HLL = P4
31-05-2016

The VM crashes during stub generation if UseSSE = 3 is set. The problem is that even if SSE 4 is not available or disabled, MacroAssembler::kernel_crc32() emits the 'pinsrd' instruction which is a SSE 4.1 instruction. The solution is to only emit CRC32 intrinsics if SSE 4.1 is available (the UseSSE > 2 check is not strong enough). I also removed the unnecessary UseSSE >= 4 checks because they are included in the supports_sse4_2() check. http://cr.openjdk.java.net/~thartmann/8158214/webrev.00
31-05-2016