minio / sha256-simd

Accelerate SHA256 computations in pure Go using AVX512, SHA Extensions for x86 and ARM64 for ARM. On AVX512 it provides an up to 8x improvement (over 3 GB/s per core). SHA Extensions give a performance boost of close to 4x over native.
Apache License 2.0
956 stars 118 forks source link

Illegal instruction crash on ARM64 #6

Closed calmh closed 7 years ago

calmh commented 7 years ago

It seems that Amlogic ARM® Cortex®-A53(ARMv8) 1.5Ghz CPUs are misdetected somehow, causing a SIGILL on these systems. The crashing instruction is here. I don't have one of these myself, but can probably extract relevant info if you suggest what's needed and how to get it. :)

(Relates to https://github.com/syncthing/syncthing/issues/3613)

harshavardhana commented 7 years ago

We will take a look. Thanks @calmh

calmh commented 7 years ago

Also, on this proc/cpuinfo output:

processor   : 0
BogoMIPS    : 48.00
Features    : fp asimd evtstrm crc32
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x0
CPU part    : 0xd03
CPU revision    : 4

processor   : 1
BogoMIPS    : 48.00
Features    : fp asimd evtstrm crc32
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x0
CPU part    : 0xd03
CPU revision    : 4

processor   : 2
BogoMIPS    : 48.00
Features    : fp asimd evtstrm crc32
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x0
CPU part    : 0xd03
CPU revision    : 4

processor   : 3
BogoMIPS    : 48.00
Features    : fp asimd evtstrm crc32
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x0
CPU part    : 0xd03
CPU revision    : 4

Hardware    : ODROID-C2
Revision    : 020b
xor-gate commented 7 years ago

Any progress on this?

calmh commented 7 years ago

Also,

Machine: Odroid-c2 (Raspberry-PI like mini computer) 
CPU: Amlogic S905 : Quad Core Cortex™-A53 (ARMv8 64bit) processor with Triple Core Mali-450 GPU
harshavardhana commented 7 years ago

@calmh do you have any server / machine where this can be verified?

calmh commented 7 years ago

Nope, these are all from reports from various users out there on the internet. I lack any similar hardware. But I can probably reach out to the reporters and have them test and collect more data etc if necessary.

harshavardhana commented 7 years ago

Looks like I found a way there are no cpuid instructions like x86 for feature detection. Will send a patch today thanks for following up @calmh

calmh commented 7 years ago

Sweet, thanks.

xor-gate commented 7 years ago

Looks good to me!