JVM crash in String.compareTo(Object) on AVX2 processor
Environment
- OpenJDK 8
- Adoptium Temurin
- Oracle
- Red Hat build of OpenJDK
- x86
- AVX2
Issue
- JVM crashes with the following in the fatal error log header:
# Problematic frame:
# J 3917 C2 java.lang.String.compareTo(Ljava/lang/Object;)I (9 bytes) @ 0x00007f414557b275 [0x00007f414557b1a0+0xd5]
Resolution
Add the following JVM option to turn off the use of AVX instructions:
-XX:UseAVX=0
Root Cause
There is a hardware issue with AVX2 instructions.
By default, the JVM selects the highest-supported version of AVX available.
Product(s)
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.