rspamd SIGILL at start on arm64 alpine 3.11 (and also 3.10)
The bug can be reproduced, following the tip found on another issue:
ubuntu@rpi4-01:~/test$ uname -a
Linux rpi4-01 5.3.0-1018-raspi2 #20-Ubuntu SMP Mon Feb 3 19:45:46 UTC 2020 aarch64 aarch64 aarch64 GNU/Linux
ubuntu@rpi4-01:~/test$ cat Dockerfile
FROM alpine:3.11
RUN apk add --no-cache rspamd rspamd-dbg gdb
RUN echo -e 'filename = "/dev/stdout";' > /etc/rspamd/local.d/logging.inc
USER rspamd
CMD ["gdb", "-ex", "run --no-fork", "-ex", "bt", "-ex", "quit", "rspamd"]
ubuntu@rpi4-01:~/test$ docker build -t rspamd:3.11-local .
Sending build context to Docker daemon 2.048kB
Step 1/5 : FROM alpine:3.11
---> 2ee122dcc32d
Step 2/5 : RUN apk add --no-cache rspamd rspamd-dbg gdb
---> Using cache
---> 6d926f509d55
Step 3/5 : RUN echo -e 'filename = "/dev/stdout";' > /etc/rspamd/local.d/logging.inc
---> Using cache
---> 30fdb5573aec
Step 4/5 : USER rspamd
---> Using cache
---> a6ceda9a6d15
Step 5/5 : CMD ["gdb", "-ex", "run --no-fork", "-ex", "bt", "-ex", "quit", "rspamd"]
---> Using cache
---> b76d8a7bbc5d
Successfully built b76d8a7bbc5d
Successfully tagged rspamd:3.11-local
ubuntu@rpi4-01:~/test$ docker run --rm -it rspamd:3.11-local
GNU gdb (GDB) 8.3.1
Copyright (C) 2019 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "aarch64-alpine-linux-musl".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from rspamd...
Reading symbols from /usr/lib/debug//usr/sbin/rspamd.debug...
Starting program: /usr/sbin/rspamd --no-fork
warning: Error disabling address space randomization: Operation not permitted
Program received signal SIGILL, Illegal instruction.
0x0000ffff84ec94c8 in ?? () from /lib/libcrypto.so.1.1
#0 0x0000ffff84ec94c8 in ?? () from /lib/libcrypto.so.1.1
#1 0x0000ffff85703000 in ?? () from /lib/ld-musl-aarch64.so.1
--Type <RET> for more, q to quit, c to continue without paging--q
Quit
A debugging session is active.
Inferior 1 [process 7] will be killed.
Quit anyway? (y or n) y
Thanks !