[
https://issues.apache.org/jira/browse/IMPALA-15369?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Zoltán Borók-Nagy reassigned IMPALA-15369:
------------------------------------------
Assignee: Zoltán Borók-Nagy
> Check for the CRC32 extension at startup on ARM64
> -------------------------------------------------
>
> Key: IMPALA-15369
> URL: https://issues.apache.org/jira/browse/IMPALA-15369
> Project: IMPALA
> Issue Type: Improvement
> Components: Backend
> Reporter: Zoltán Borók-Nagy
> Assignee: Zoltán Borók-Nagy
> Priority: Major
>
> On x86-64, {{CpuInfo::EnforceCpuRequirements()}} makes every Impala daemon
> (impalad, catalogd, statestored, admissiond) exit with a clear error message
> when the CPU lacks AVX2, or AVX in legacy mode (IMPALA-9690). There is no
> such check on
> ARM64: the function does nothing outside {{{}#ifdef _{_}x86_64{_}_{}}}.
> The ARM64 build still assumes the CRC32 extension. Native code and
> cross-compiled IR are compiled with {{-march=armv8-a+crc}}
> (be/CMakeLists.txt). CRC32 instructions are used without checking for the
> extension:
> * {{SSE4_crc32_u8/u16/u32/u64}} in be/src/util/sse-util.h emit
> {{crc32cb/ch/cw/cx}} as inline asm, or ACLE {{__crc32c*}} intrinsics in IR.
> * {{HashUtil::Hash()}} always selects {{CrcHash()}} on aarch64
> ({{{}IS_AARCH64 || ...{}}}).
> * {{LlvmCodeGen::GetHashFunction()}} emits {{aarch64_crc32c*}} intrinsics,
> also skipping the feature check on aarch64.
> CRC32 is optional in ARMv8.0 and only mandatory from ARMv8.1. On an ARMv8.0
> CPU without it, Impala does not fail at startup. It crashes with SIGILL once
> one of the code paths above runs: join/aggregation hash
> tables, Parquet dictionary encoding, the scheduler's hash ring, etc.
> Such CPUs are rare today, but the failure is confusing and hard to diagnose.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]