OpenJDK 11.0.6 crashes on Windows with EXCEPTION_ILLEGAL_INSTRUCTION immediately after starting
Environment
- OpenJDK 11.0.6
- Windows
*JBoss Enterprise Application Platform 7.2
Issue
- OpenJDK 11.0.6 crashes immediately after starting
Resolution
The following are possible workarounds:
- Add the following JVM option:
-XX:UseAVX=0
Note, it has been reported in some environments that adding this option results in JBoss EAP7.2 failing to start with the following error:
org.jboss.modules.ModuleNotFoundException: java.se
- Roll back to a prior version of OpenJDK 11 (e.g. 11.0.5.10-2).
Root Cause
This is a regression in OpenJDK 11.0.6 which causes the JRE to crash immediately with EXCEPTION_ILLEGAL_INSTRUCTION on CPUs without Advanced Vector Extensions (AVX).
Diagnostic Steps
Check EXCEPTION_ILLEGAL_INSTRUCTION and Windows in thehs_error_pid file:
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ILLEGAL_INSTRUCTION (0xc000001d) at pc=0x000002141ac90c06, pid=2764, tid=8772
#
# JRE version: (11.0.6+10) (build )
# Java VM: OpenJDK 64-Bit Server VM (11.0.6+10-LTS, mixed mode, tiered, compressed oops, g1 gc, windows-amd64)
# Problematic frame:
# v ~StubRoutines::call_stub
Verify the cpu information in the hs_error_pid file does not include avx. For example:
CPU:total 3 (initial active 3) (4 cores per cpu, 1 threads per core) family 6 model 85 stepping 4, cmov, cx8, fxsr, mmx, sse, sse2, sse3, tsc
The following is example cpu information for a cpu with AVX, for comparison:
CPU:total 8 (initial active 8) (4 cores per cpu, 2 threads per core) family 6 model 79 stepping 1, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, avx, avx2, aes, clmul, erms, rtm, 3dnowpref, lzcnt, ht, tsc, bmi1, bmi2, adx
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.