Bug 1801230

Summary: SIGILL due to AVX instruction on SSE2 cpu
Product: Red Hat Enterprise Linux 7 Reporter: Paulo Andrade <pandrade>
Component: java-11-openjdkAssignee: Andrew John Hughes <ahughes>
Status: CLOSED ERRATA QA Contact: OpenJDK QA <java-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 7.7CC: ahughes, dbhole, jandrlik, jvanek
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: java-11-openjdk-11.0.7.4-0.1.ea.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-09-29 19:53:57 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Paulo Andrade 2020-02-10 13:31:42 UTC
Problem happens with 'java --version' on:

$ rpm -q java-11-openjdk
java-11-openjdk-11.0.6.10-1.el7_7.x86_64

reverting to an older version works correctly.

  In the computer, there is this message:

var/log/dmesg:[    0.361134] sha1_ssse3: Neither AVX nor AVX2 nor SSSE3/SHA-NI is available/usable.
var/log/dmesg:[    0.361138] sha256_ssse3: Neither AVX nor SSSE3/SHA-NI is available/usable.

  The first cpu:

# cat proc/cpuinfo 
processor	: 0
vendor_id	: GenuineIntel
cpu family	: 6
model		: 85
model name	: Intel(R) Xeon(R) Gold 6140 CPU @ 2.30GHz
stepping	: 4
microcode	: 0xffffffff
cpu MHz		: 2299.999
cache size	: 25344 KB
physical id	: 0
siblings	: 4
core id		: 0
cpu cores	: 2
apicid		: 0
initial apicid	: 0
fpu		: yes
fpu_exception	: yes
cpuid level	: 21
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 lm constant_tsc rep_good nopl xtopology eagerfpu pni cx16 hypervisor lahf_lm ssbd ibrs ibpb spec_ctrl flush_l1d arch_capabilities
bogomips	: 4599.99
clflush size	: 64
cache_alignment	: 64
address sizes	: 44 bits physical, 48 bits virtual
power management:
...

Comment 2 Paulo Andrade 2020-02-10 13:44:00 UTC
  This CPU should support AVX2. Maybe there is some bios option to disable it.
  Apparently the processor should emulate AVX instructions with SSE ones when
there is a bios option to disable AVX. Maybe there is also a bios option to
disable such emulation.

Comment 3 Paulo Andrade 2020-02-11 17:10:27 UTC
  The problem is Hyper-V in a mode that allows live migration if I
understand correctly.
  Also, it appears it partially implements the instructions openjdk
uses to check for AVX support.
  This is arguably a bug in Hyper-V.

Comment 4 Andrew John Hughes 2020-02-12 18:35:49 UTC
Can you be more specific as to which older version works correctly?

I can then look into exactly what change triggered the regression in behaviour.

Comment 5 Paulo Andrade 2020-02-13 13:29:03 UTC
Waiting for user feedback. Only report so far was that it was required do
downgrade the java version for it to work. It is failing with
java-11-openjdk-11.0.6.10-1.el7_7 and I presume a version that did work is
java-11-openjdk-11.0.3.7-1.el7

If there is information on specific version that did work the bug report
will be updated.

Comment 8 Paulo Andrade 2020-02-17 11:54:00 UTC
The last known working package for the user is java-11-openjdk-11.0.2.7-0.el7_6
User was previously told to temporarily either a known to work older version, or
experiment with "java -XX:UseAVX=N --version" or "java -XX:UseSSE=N --version"
and see what works for different values of N.
The other alternative is check the Hyper-V setup options that also allow enabling
AVX instructions.

Comment 15 errata-xmlrpc 2020-09-29 19:53:57 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (java-11-openjdk bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:3919