box64 icon indicating copy to clipboard operation
box64 copied to clipboard

Minecraft bedrock dedicated server fails at startup with illegal instruction

Open itzg opened this issue 9 months ago • 3 comments

Downloaded from https://www.minecraft.net/bedrockdedicatedserver/bin-linux/bedrock-server-1.21.71.01.zip

Please let me know if there is any more information that will help.

[BOX64] Box64 with Dynarec v0.3.5 e7b71cba built on Mar 30 2025 06:28:18
[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] Detected 48bits at least of address space
[BOX64] Counted 12 Env var
[BOX64] Library search path: 
[BOX64] Binary search path: ./:bin/:/usr/local/sbin/:/usr/local/bin/:/usr/sbin/:/usr/bin/:/sbin/:/bin/
[BOX64] Looking for ./bedrock_server-1.21.71.01
[BOX64] Rename process to "bedrock_server-1.21.71.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] 0019|SIGILL @0xffff932f5c20 (???(0xffff932f5c20)) (x64pc=0x1059f4a5d/"/data/bedrock_server-1.21.71.01 + 0x59f4a5d", rsp=0xffff94fff6a0, stack=0xffff94800000:0xffff95000000 own=(nil) fp=0x4fc), for accessing 0xffff932f5c20 (code=1/prot=7), db=0xffff92cb9b88(0xffff932f5c20:0xffff932f5c9b/0x1059f4a5d:0x1059f4a6c//data/bedrock_server-1.21.71.01 + 0x59f4a5d:clean, hash:d438e501/d438e501) handler=(nil)
RAX:0x0000000100d19d99 RCX:0x0000000000000000 RDX:0x0000000000000000 RBX:0x000000010a9e52d8 
RSP:0x0000ffff94fff6a0 RBP:0x0000ffff94fffc50 RSI:0x0000ffff94fffc38 RDI:0x000000010a9e5740 
 R8:0x0000000000000020  R9:0x0000000000000020 R10:0x0000000067b27b00 R11:0x332d027c6fdcdfc3 
R12:0x0000ffff94fffbf8 R13:0x0000ffff94fffc38 R14:0x0000ffff94fffc40 R15:0x0000ffff94fff8d8 
ES:0x002b CS:0x0033 SS:0x002b DS:0x002b FS:0x0043 GS:0x0053 
RSP-0x20:0x0000ffff94fff8e8 RSP-0x18:0x0000ffff94fff8f0 RSP-0x10:0x0000ffff94fffc48 RSP-0x08:0x00000001059f4a5d
RSP+0x00:0x0000000000000000 RSP+0x08:0x0000000000000000 RSP+0x10:0x0000000000000000 RSP+0x18:0x0000000000000000 opcode=11 E9 8A D2 D1 53 A1 F2 (48 8D 3D E4 0C)
Illegal instruction

itzg avatar Mar 31 '25 00:03 itzg

looks like a wrapper issue. I'll download the server and see if I can reproduce on my side.

ptitSeb avatar Mar 31 '25 06:03 ptitSeb

I start the bedrock server just fine on my side. Do I need to do something special to trigger the issue?

Also, what hardware configuration is that: X-Elite or M2 (and if M1/M2: is it with muvm?).

ptitSeb avatar Mar 31 '25 08:03 ptitSeb

Thanks for your prompt response.

Sorry, yes, some more details:

  • this is running on an Apple M1 Max
  • the issue is observed within a Docker container running https://github.com/itzg/docker-minecraft-bedrock-server on Docker Desktop 4.39.0

If it helps I could create a minimal image to test; however, my current steps to reproduce are:

Start the image in order to download the server software and prepare the volume:

docker run -it --rm -e EULA=true -v bds:/data itzg/minecraft-bedrock-server

(The execution quietly fails because I have a tool that runs the process to intercept container stop signals. There is currently some issue with it losing the error output from box64.)

Start an interactive shell using the prepared volume:

docker run -it --rm -v bds:/data --entrypoint bash itzg/minecraft-bedrock-server

Within that shell, invoke box64:

box64 ./bedrock_server-1.21.71.01

If it helps, here is the image's installation of box64:

https://github.com/itzg/docker-minecraft-bedrock-server/blob/master/build/setup-arm64

where BOX64_PACKAGE is initialized to box64.

Also let me know if there are some things I can try on my side to help diagnose if you would prefer to avoid the Docker setup.

itzg avatar Mar 31 '25 12:03 itzg