[MDEV-23030] ARM crash on Raspberry Pi 4 Created: 2020-06-26  Updated: 2020-08-21  Resolved: 2020-07-30

Status: Closed
Project: MariaDB Server
Component/s: Compiling, Packaging
Affects Version/s: 10.5.0, 10.5.4, 10.5
Fix Version/s: 10.5.5

Type: Bug Priority: Blocker
Reporter: Wolfgang Ettlinger Assignee: Marko Mäkelä
Resolution: Fixed Votes: 0
Labels: regression
Environment:

Raspberry Pi 4
Ubuntu 19.10 aarch64


Issue Links:
Relates
relates to MDEV-23495 Refine Arm64 PMULL runtime check in M... Closed

 Description   

After update from 10.4.x to 10.5.4 mariadb crashes with an "illegal instruction" signal.

The offending instruction is in the function crc32c_aarch64:

0x0000000000e2eadc <+1204>: pmull v2.1q, v2.1d, v3.1d
see https://github.com/MariaDB/server/blob/0d6d63e1505bbf9898d46fa641a7a0579a4ae460/mysys/crc32/crc32_arm64.c#L202

I'm using the Docker image which pulls the arm64 binary deb distribution.

I'm not entirely sure wheher this is intended behaviour (i.e. whether Raspberry Pi is simply no longer supported in 10.5.x binary distribution).



 Comments   
Comment by Vincent Milum Jr [ 2020-07-21 ]

I've ran into what I believe is this exact same bug.

Pinebook Pro with FreeBSD 13.0-CURRENT testing both MariaDB-10.4.13 and MariaDB-10.5.4
Raspberry Pi 3B+ with FreeBSD 13-CURRENT testing with MariaDB-10.4.13

So this is an issue with more than just 10.5.x

It looks like an "optimized" set of ARM SIMD ASM code was inserted , but never actually tested.

This entirely prevents MariaDB from even starting. This is a 100% blocker.

Comment by Krunal Bauskar [ 2020-07-29 ]

Based on the discussion it sounds like you are hitting the same issues.
https://github.com/docker-library/mariadb/issues/318

And it seems like it is problem with pmull instruction support with some of the arm processor model that are based on armv8 architecture.

Adding a runtime check just like crc32 should help.

((getauxval(AT_HWCAP) & HWCAP_PMULL)

Comment by Marko Mäkelä [ 2020-07-29 ]

This looks like a regression due to pull request #772.

Comment by Marko Mäkelä [ 2020-07-29 ]

darkain, I believe that your MariaDB 10.4 FreeBSD (clang) issue is actually MDEV-23249.

Generated at Thu Feb 08 09:19:19 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.