[MDEV-27008] ARM64 non-lse compiled with libatomic results in SIGILL (RHEL/Centos 7&8) Created: 2021-11-09  Updated: 2022-05-11  Resolved: 2022-02-25

Status: Closed
Project: MariaDB Server
Component/s: Compiling
Affects Version/s: 10.3.32
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Daniel Black Assignee: Daniel Black
Resolution: Not a Bug Votes: 0
Labels: None
Environment:

aarch64, not other arches
aarch64 with lse not affected
RHEL & Centos 7/8 affected, not Debian or Fedora



 Description   

Linking to libatomic causes the test failure:

main.plugin_vars w7 [ fail ]
Test ended at 2021-10-28 17:43:48
CURRENT_TEST: main.plugin_vars
mysqltest: At line 70: query 'install plugin query_response_time soname 'query_response_time'' failed: 1126: Can't open shared library '/buildbot/aarch64-rhel-8/build/mysql-test/var/plugins/query_response_time.so' (errno: 11, undefined symbol: __aarch64_ldadd4_relax)

Triggered by: https://github.com/MariaDB/server/commit/f502ccbcb5dfce29067434885a23db8d1bd5f134

This doesn't occur on Huawei Kunpeng 920 ARM64 CPU, bug does occur on the bb from equinix:

equinix getauxvec

LD_SHOW_AUXV=1 /bin/true                                                                                             AT_SYSINFO_EHDR:      0xffffbdb8f000                                                                                                   AT_??? (0x33): 0x1270                                                                                                                  AT_HWCAP:             10119fff                                                                                                         AT_PAGESZ:            4096                                                                                                             AT_CLKTCK:            100                                                                                                              AT_PHDR:              0xaaaac6d90040                                                                                                   AT_PHENT:             56                                                                                                               AT_PHNUM:             9                                                                                                                AT_BASE:              0xffffbdb5f000                                                                                                  AT_FLAGS:             0x0                                                                                                              AT_ENTRY:             0xaaaac6d91710                                                                                                   AT_UID:               1000
AT_EUID:              1000                                                                                                             
AT_GID:               1000                                                                                                             
AT_EGID:              1000                                                                                                             AT_SECURE:            0                                                                                                                AT_RANDOM:            0xffffc2bc38f8                                                                                                   AT_HWCAP2:            0x0 
AT_EXECFN:            /bin/true   
AT_PLATFORM:          aarch64

equinix proc/cpu

processor       : 1
BogoMIPS        : 50.00
Features        : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop asimddp ssbs
CPU implementer : 0x41
CPU architecture: 8                                                                                                                    
CPU variant     : 0x3                                                                                                                  
CPU part        : 0xd0c
CPU revision    : 1



 Comments   
Comment by Daniel Black [ 2021-12-01 ]

per linked bug, RHEL8 fixed in gcc-8.5.0-5.el8

Comment by Daniel Black [ 2022-02-25 ]

Centos7 aarch64 appears compiling ok on bb.

Centos8 is EOL.

Centos8-stream might have a fix if we continue with it.

https://github.com/MariaDB/mariadb.org-tools/pull/110 for bb fixes.

Comment by Daniel Black [ 2022-05-11 ]

dan@eq-arm1:~$  lscpu
Architecture:                    aarch64
CPU op-mode(s):                  32-bit, 64-bit
Byte Order:                      Little Endian
CPU(s):                          160
On-line CPU(s) list:             0-159
Thread(s) per core:              1
Core(s) per socket:              80
Socket(s):                       2
NUMA node(s):                    2
Vendor ID:                       ARM
Model:                           1
Model name:                      Neoverse-N1
Stepping:                        r3p1
BogoMIPS:                        50.00
L1d cache:                       10 MiB
L1i cache:                       10 MiB
L2 cache:                        160 MiB
NUMA node0 CPU(s):               0-79
NUMA node1 CPU(s):               80-159
Vulnerability Itlb multihit:     Not affected
Vulnerability L1tf:              Not affected
Vulnerability Mds:               Not affected
Vulnerability Meltdown:          Not affected
Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:        Mitigation; __user pointer sanitization
Vulnerability Spectre v2:        Not affected
Vulnerability Srbds:             Not affected
Vulnerability Tsx async abort:   Not affected
Flags:                           fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop asimddp ssbs

RHEL8 package released - https://access.redhat.com/errata/RHBA-2022:2072

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