juno icon indicating copy to clipboard operation
juno copied to clipboard

Bug: Docker image won't run on ARM64 systems with non 4KB page size

Open xJonathanLEI opened this issue 1 year ago • 4 comments

This is because the default build option in jemalloc uses the host page size, even when cross-compiling. See https://github.com/jemalloc/jemalloc/issues/467#issuecomment-2054282344 for details.

The --with-lg-page option must be set to fix this.

Running the ARM64 images on such devices results in an immediate seg fault.

This affects lots of ARM64 devices like Macs with Apple Silicon and Raspberry Pi 5 running Raspberry Pi OS (Ubuntu on RPI 5 uses 4KB page size so it still works).

xJonathanLEI avatar May 02 '24 01:05 xJonathanLEI

Hi @xJonathanLEI , could you please describe in more detail how to reproduce this? I tried on macbook pro m2 with page size 16384 and I don't have this bug.

AnkushinDaniil avatar Jul 13 '24 14:07 AnkushinDaniil

Are you running with Docker Desktop on macOS? I'm pretty sure it uses a Linux VM whose page size is still 4KB.

Dojo and Pathfinder both had the same bug but both have resolved.

xJonathanLEI avatar Jul 13 '24 15:07 xJonathanLEI

telegram-cloud-photo-size-2-5229065169429192205-y

AnkushinDaniil avatar Jul 13 '24 15:07 AnkushinDaniil

Yeah Docker Desktop works by running a Linux virtual machine. The macOS page size has nothing to do with the VM page size. You can run getconf PAGESIZE inside the container to find out.

Here are the Dojo and Pathfinder issues for your reference:

https://github.com/eqlabs/pathfinder/issues/1982

https://github.com/dojoengine/dojo/issues/1913

xJonathanLEI avatar Jul 13 '24 16:07 xJonathanLEI