Skip to content

🐛 [fiberplane-provider-runtime] FPD crashes on start in Docker on M1 Mac  #55

@gagbo

Description

@gagbo

Wasmer in fiberplane-provider-runtime might need to be bumped to 3

Environment information

Running on M1 mac, either with Docker Desktop or with CoLiMa to drive Docker images.

The issue was found by @actualwitch while trying to setup a "quickstart" docker image on MacOS for FPD.

Note that the issue seems to be the same as wasmerio/wasmer#3461 which got solved and merged in tree for versions >= 3.2.0 wasmerio/wasmer@580baeb

I couldn't find any "release 2" branch in a very quick look, so there might

What happened?

  1. Use a dockerfile in the fpd repo
FROM ubuntu:latest
WORKDIR /app
ENV DEBUG=true
RUN apt-get update && apt-get install -y curl unzip
RUN curl --proto '=https' --tlsv1.2 -sSf https://fp.dev/proxy/latest/x86_64-unknown-linux-gnu/proxy.zip -o proxy.zip
RUN unzip proxy.zip
ADD config/data_sources.yaml /root/.config/proxy/data_sources.yaml
ENTRYPOINT ./proxy --token=<Valid Token here>
  1. Build the image for amd64 platform, and run it
docker build --platform=amd64 --rm -t quickstart . 
docker run --platform=linux/amd64 --rm -it -p 127.0.0.1:8080:8080 quickstart
  1. The proxy blows up with an assertion error in the singlepass compiler that seems to be related to register reuse
thread 'thread '<unnamed>' panicked at 'assertion failed: `(left != right)`
  left: `XMM3`,
 right: `XMM3`', <unnamed>' panicked at 'assertion failed: `(left != right)`
  left: `XMM3`,
 right: `XMM3`', /cargo/registry/src/github.com-1ecc6299db9ec823/wasmer-compiler-singlepass-2.3.0/src/emitter_x64.rs:/cargo/registry/src/github.com-1ecc6299db9ec823/wasmer-compiler-singlepass-2.3.0/src/emitter_x64.rs:1624:40
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
1624:40
thread '<unnamed>' panicked at 'assertion failed: `(left != right)`
  left: `XMM3`,
 right: `XMM3`', /cargo/registry/src/github.com-1ecc6299db9ec823/wasmer-compiler-singlepass-2.3.0/src/emitter_x64.rs:1624:40
thread '<unnamed>' panicked at 'assertion failed: `(left != right)`
  left: `XMM3`,
 right: `XMM3`', /cargo/registry/src/github.com-1ecc6299db9ec823/wasmer-compiler-singlepass-2.3.0/src/emitter_x64.rs:1624:40
thread '<unnamed>' panicked at 'assertion failed: `(left != right)`
  left: `XMM3`,
 right: `XMM3`', /cargo/registry/src/github.com-1ecc6299db9ec823/wasmer-compiler-singlepass-2.3.0/src/emitter_x64.rs:1624:40
thread '<unnamed>' panicked at 'assertion failed: `(left != right)`
  left: `XMM3`,
 right: `XMM3`', /cargo/registry/src/github.com-1ecc6299db9ec823/wasmer-compiler-singlepass-2.3.0/src/emitter_x64.rs:1624:40
thread '<unnamed>' panicked at 'assertion failed: `(left != right)`
  left: `XMM0`,
 right: `XMM0`', /cargo/registry/src/github.com-1ecc6299db9ec823/wasmer-compiler-singlepass-2.3.0/src/emitter_x64.rs:1421:40
thread '<unnamed>' panicked at 'assertion failed: `(left != right)`
  left: `XMM0`,
 right: `XMM0`', /cargo/registry/src/github.com-1ecc6299db9ec823/wasmer-compiler-singlepass-2.3.0/src/emitter_x64.rs:1421:40
thread '<unnamed>' panicked at 'assertion failed: `(left != right)`
  left: `XMM0`,
 right: `XMM0`', /cargo/registry/src/github.com-1ecc6299db9ec823/wasmer-compiler-singlepass-2.3.0/src/emitter_x64.rs:1421:40
thread '<unnamed>' panicked at 'assertion failed: `(left != right)`
  left: `XMM3`,
 right: `XMM3`', /cargo/registry/src/github.com-1ecc6299db9ec823/wasmer-compiler-singlepass-2.3.0/src/emitter_x64.rs:1624:40
thread '<unnamed>' panicked at 'assertion failed: `(left == right)`
  left: `XMM0`,
 right: `XMM1`', /cargo/registry/src/github.com-1ecc6299db9ec823/wasmer-compiler-singlepass-2.3.0/src/emitter_x64.rs:1684:17
thread '<unnamed>' panicked at 'assertion failed: `(left != right)`
  left: `XMM0`,
 right: `XMM0`', /cargo/registry/src/github.com-1ecc6299db9ec823/wasmer-compiler-singlepass-2.3.0/src/emitter_x64.rs:1421:40
thread '<unnamed>' panicked at 'assertion failed: `(left != right)`
  left: `XMM0`,
 right: `XMM0`', /cargo/registry/src/github.com-1ecc6299db9ec823/wasmer-compiler-singlepass-2.3.0/src/emitter_x64.rs:1421:40
thread '<unnamed>' panicked at 'assertion failed: `(left != right)`
  left: `XMM0`,
 right: `XMM0`', /cargo/registry/src/github.com-1ecc6299db9ec823/wasmer-compiler-singlepass-2.3.0/src/emitter_x64.rs:1421:40
thread '<unnamed>' panicked at 'assertion failed: `(left != right)`
  left: `XMM3`,
 right: `XMM3`', /cargo/registry/src/github.com-1ecc6299db9ec823/wasmer-compiler-singlepass-2.3.0/src/emitter_x64.rs:1624:40
thread '<unnamed>' panicked at 'assertion failed: `(left != right)`
  left: `XMM3`,
 right: `XMM3`', /cargo/registry/src/github.com-1ecc6299db9ec823/wasmer-compiler-singlepass-2.3.0/src/emitter_x64.rs:1463:40
  1. Note that in the container, uname -a returns different results depending on whether the docker image was built with the CoLiMa agent or the Docker Desktop agent, but both fail the same way anyway
# CoLiMa
Linux e615947012e7 5.15.82-0-virt #1-Alpine SMP Mon, 12 Dec 2022 09:15:17 +0000 x86_64 x86_64 x86_64 GNU/Linux
# Docker Desktop
Linux 787a109effc9 5.15.49-linuxkit #1 SMP PREEMPT Tue Sep 13 07:51:32 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

Expected result

It should start without crashing

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions