Fails to start on arm64 with illegal instruction via box64
When testing startup failure with
docker run -it --rm -e EULA=true -v bds:/data itzg/minecraft-bedrock-server
docker run -it --rm -e EULA=true -v bds:/data --entrypoint box64 itzg/minecraft-bedrock-server ./bedrock_server-1.21.62.01
The following details of the failure are visible
root@b3b0410dc928:/data# box64 ./bedrock_server-1.21.62.01
[BOX64] Dynarec for ARM64, with extension: ASIMD AES CRC32 PMULL ATOMICS SHA1 SHA2 USCAT FLAGM FLAGM2 FRINT
[BOX64] Running on - with 10 cores, pagesize: 4096
[BOX64] Will use hardware counter measured at 24.0 MHz emulating 3.0 GHz
[BOX64] Box64 with Dynarec v0.3.3 a50d34e4 built on Feb 11 2025 06:29:09
[BOX64] Detected 48bits at least of address space
[BOX64] Counted 12 Env var
[BOX64] BOX64 LIB PATH:
[BOX64] BOX64 BIN PATH: ./:bin/:/usr/local/sbin/:/usr/local/bin/:/usr/sbin/:/usr/bin/:/sbin/:/bin/
[BOX64] Looking for ./bedrock_server-1.21.62.01
[BOX64] Rename process to "bedrock_server-1.21.62.01"
[BOX64] Using native(wrapped) libdl.so.2
[BOX64] Using native(wrapped) libcurl.so.4
[BOX64] Using native(wrapped) libm.so.6
[BOX64] Using emulated /usr/lib/box64-x86_64-linux-gnu/libgcc_s.so.1
[BOX64] Using native(wrapped) libpthread.so.0
[BOX64] Using native(wrapped) libc.so.6
[BOX64] Using native(wrapped) ld-linux-x86-64.so.2
[BOX64] Using native(wrapped) libutil.so.1
[BOX64] Using native(wrapped) librt.so.1
[BOX64] Using native(wrapped) libbsd.so.0
[BOX64] 0030|SIGILL @0xffffa4338e18 (???(0xffffa4338e18)) (x64pc=0x10630eab0/"/data/bedrock_server-1.21.62.01 + 0x630eab0", rsp=0xffffa61fec80, stack=0xffffa5a00000:0xffffa6200000 own=(nil) fp=0x17), for accessing 0xffffa4338e18 (code=1/prot=7), db=0xffffa356a220(0xffffa4338e18:0xffffa4338e93/0x10630eab0:0x10630eac7//data/bedrock_server-1.21.62.01 + 0x630eab0:clean, hash:4e1c18ad/4e1c18ad) handler=(nil)
RAX:0x000000003d4b0560 RCX:0x000000003d4b0560 RDX:0x000000003d4af001 RBX:0x0000ffffa61ff7b8
RSP:0x0000ffffa61fec80 RBP:0x0000ffffa61ffc78 RSI:0x000000003d4af050 RDI:0x000000003d4b05b0
R8:0x0000000000000016 R9:0x0000000000000004 R10:0x000000010a807fd8 R11:0x332d027c6fdcdfc3
R12:0x0000ffffa61ff798 R13:0x0000ffffa61ff7d8 R14:0x0000ffffa61ffc58 R15:0x000000010a2cf3c8
ES:0x002b CS:0x0033 SS:0x002b DS:0x002b FS:0x0043 GS:0x0053
RSP-0x20:0x0000ffffa61ffc58 RSP-0x18:0x000000010a2cf3c8 RSP-0x10:0x0000ffffa61ffc78 RSP-0x08:0x000000010630eab0
RSP+0x00:0x0000000000000000 RSP+0x08:0x0000000000000000 RSP+0x10:0x0000000000000000 RSP+0x18:0x0000000000000000 opcode=11 F9 8F D2 11 50 A1 F2 (48 8D 3D 11 95)
Illegal instruction
Will need to also investigate why mc-server-runner suppressed the "illegal instruction" error output.
It's something about the box64 build. This one from image tag itzg/minecraft-bedrock-server:2024.11.0 works
Box64 with Dynarec v0.3.1 08085be3 built on Nov 4 2024 06:30:46
but the failure above is using
[BOX64] Box64 with Dynarec v0.3.3 a50d34e4 built on Feb 11 2025 06:29:09
Still an issue with box64 v0.3.5
Reported an issue with box64
https://github.com/ptitSeb/box64/issues/2482
Great workaround for those on Macs: use Rosetta and Docker Desktop's support for that:
https://github.com/itzg/docker-minecraft-bedrock-server/issues/508#issuecomment-2848660738
Latest image installed 0.3.5+20250503.889dd64-1. Need to see if that helps...