openethereum / parity-ethereum

The fast, light, and robust client for Ethereum-like networks.
Other
6.83k stars 1.68k forks source link

Illegal instruction crash on Xeon X5650 #11390

Open CryptoManiac opened 4 years ago

CryptoManiac commented 4 years ago

I'm unable to run versions higher than 2.5.10 on my machine while other machines are fine. Same happens with unstable releases newer than 2.6.4-beta and it doesn't matter whether I'm running prebuilt binaries or building from source. As the result, it's impossible to run actual version without upgrading my processors. Therefore I consider this issue as critical one.

Active Rust toolchain:

nightly-x86_64-unknown-linux-gnu (default)
rustc 1.42.0-nightly (689fca01c 2020-01-17)

Crash output:

Loading config file from /etc/parity/config.toml
Option '--no-dapps' has been removed and is no longer supported.
2020-01-19 03:13:06  Starting Parity-Ethereum/v2.5.10-stable-9f94473-20191112/x86_64-linux-gnu/rustc1.39.0
2020-01-19 03:13:06  Keys path /home/parity/.local/share/io.parity.ethereum/keys/classic
2020-01-19 03:13:06  DB path /home/parity/.local/share/io.parity.ethereum/chains/classic/db/906a34e69aec8c0d
2020-01-19 03:13:06  State DB configuration: fast
2020-01-19 03:13:06  Operating mode: active
Illegal instruction (core dumped)

lscpu output:

Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                24
On-line CPU(s) list:   0-23
Thread(s) per core:    2
Core(s) per socket:    6
Socket(s):             2
NUMA node(s):          2
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 44
Model name:            Intel(R) Xeon(R) CPU           X5650  @ 2.67GHz
Stepping:              2
CPU MHz:               1600.000
CPU max MHz:           2668,0000
CPU min MHz:           1600,0000
BogoMIPS:              5333.54
Virtualization:        VT-x
L1d cache:             32K
L1i cache:             32K
L2 cache:              256K
L3 cache:              12288K
NUMA node0 CPU(s):     0-5,12-17
NUMA node1 CPU(s):     6-11,18-23
Flags:                 fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 popcnt lahf_lm epb kaiser tpr_shadow vnmi flexpriority ept vpid dtherm ida arat

cat /proc/cpuinfo output:

processor   : 23
vendor_id   : GenuineIntel
cpu family  : 6
model       : 44
model name  : Intel(R) Xeon(R) CPU           X5650  @ 2.67GHz
stepping    : 2
microcode   : 0x14
cpu MHz     : 1600.000
cache size  : 12288 KB
physical id : 1
siblings    : 12
core id     : 10
cpu cores   : 6
apicid      : 53
initial apicid  : 53
fpu     : yes
fpu_exception   : yes
cpuid level : 11
wp      : yes
flags       : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 popcnt lahf_lm epb kaiser tpr_shadow vnmi flexpriority ept vpid dtherm ida arat
bugs        : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf
bogomips    : 5333.54
clflush size    : 64
cache_alignment : 64
address sizes   : 40 bits physical, 48 bits virtual
power management:
CryptoManiac commented 4 years ago

Looks like some module has no detection routines for some new instructions (AVX or whatever) which aren't supported by my CPUs.

I believe it's related to AES instructions somehow:

Program terminated with signal SIGILL, Illegal instruction.
#0  0x0000564fab6a86ad in parity_crypto::aes::decrypt_128_ctr::hcc0edb0bfc7852be ()

EDIT: Trying to revert be5db14160e2aa04a64f1a8fe027ad58c2f42c44 and see what will happen.

CryptoManiac commented 4 years ago

EDIT: Trying to revert be5db14 and see what will happen.

Reverting commit helped, it works now.

dvdplm commented 4 years ago

Yes, we build parity releases with aesni enabled. You can probably make it work without it by building your own binary with the proper rustc flags.

teotikalki commented 4 years ago

I ran into this too (xeon X3430). Could someone (@dvdplm ?) please kindly provide instructions for building without aesni?

Edit: I attempted the compile after having set RUSTFLAGS="-C aesni=off but still got Illegal instruction, so my guess at 'how to use rust' was incorrect.

CryptoManiac commented 4 years ago

@teotikalki Do like I did, revert the be5db14 commit and everything will be fine.