Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker-compose does not work on Mac M1 (backend segmentation fault) #9470

Open
adrienthiery opened this issue Feb 26, 2024 · 9 comments
Open
Labels

Comments

@adrienthiery
Copy link

adrienthiery commented Feb 26, 2024

Description

Hi there,
I'm attempting to run blockscout locally on my Mac M1 Max.
But it keeps failing with a Segmentation fault on the backend container.

What I do:

docker-compose -f hardhat-network.yml up

Output:

backend          | Segmentation fault
backend exited with code 139
backend          | Segmentation fault
backend exited with code 139
backend          | Segmentation fault
backend exited with code 139
backend          | Segmentation fault
backend exited with code 139
backend          | Segmentation fault
backend exited with code 139

I saw 2 issues related to that ( #7990 & #7999 ) but they are marked as resolved by #7745 which in itself has been closed in favor of #8040

But I still have the issue.

Type of the installation

Docker-compose

Type of the JSON RPC archive node

Hardhat?

Type of the chain

Hardhat (dev)

Link to the page

No response

Steps to reproduce

git clone git@github.com:blockscout/blockscout.git
cd blockscout/docker-compose/
docker-compose -f hardhat-network.yml up

Backend version

master (commit c9a2d14) from this repo
latest docker image from https://hub.docker.com/r/blockscout/blockscout/tags (DIGEST:sha256:50c629f0334306ad09123d20f0e62ee6e5bc1b84bcb32bd02178d7bec0f0afd5)

Frontend version

master (commit c9a2d14) from this repo
latest docker image from ghcr.io/blockscout/frontend (DIGEST:sha256:bad18037a2c99abef61e884a6eac1f1c5813ead8dff770d50a4fed5177dac9b0)

Elixir & Erlang/OTP versions

24.2.2 according to https://hub.docker.com/layers/blockscout/blockscout/latest/images/sha256-50c629f0334306ad09123d20f0e62ee6e5bc1b84bcb32bd02178d7bec0f0afd5?context=explore

Operating system

MacOS Sonoma (14.3.1)

Additional information

Docker version: 4.27.2 (137060)

@ekawibisono
Copy link

Please Read it, Thanks
#6787

@adrienthiery
Copy link
Author

adrienthiery commented Feb 27, 2024

Hi @ekawibisono,

Thanks a lot for the link.

So, after re-reading it (I remember indeed reading that a few weeks ago), several questions arise:

  • Following Update Docker image tag latest with release only #7328 , shouldn't it work using the latest tag (so since April 2023) ?
  • Using DOCKER_TAG=5.1.0 docker-compose -f hardhat-network.yml up --build gives me the exact same error. What should I do? (Tried this considering the docker-compose-no-build-hardhat-network.yml file does not exist anymore)
  • Should Run docker-compose on M1 chip #6787 be closed considering it still doesn't work on master ? 🤔

Happy to help debug further.

@ekawibisono
Copy link

Hi @ekawibisono,

Thanks a lot for the link.

So, after re-reading it (I remember indeed reading that a few weeks ago), several questions arise:

  • Following Update Docker image tag latest with release only #7328 , shouldn't it work using the latest tag (so since April 2023) ?
  • Using DOCKER_TAG=5.1.0 docker-compose -f hardhat-network.yml up --build gives me the exact same error. What should I do? (Tried this considering the docker-compose-no-build-hardhat-network.yml file does not exist anymore)
  • Should Run docker-compose on M1 chip #6787 be closed considering it still doesn't work on master ? 🤔

Happy to help debug further.

Hello @adrienthiery For New Version, name file not use docker-compose, maybe can you inform me version blockscout you use ?

@adrienthiery
Copy link
Author

adrienthiery commented Feb 28, 2024

Hi @ekawibisono ,
I'm using master, so latest docker image as mentioned in the issue.

image

@ekawibisono
Copy link

Hi @ekawibisono , I'm using master, so latest docker image as mentioned in the issue.

image

can you change version docker images, before latest to 6.1.0
image

@ekawibisono
Copy link

image

@adrienthiery
Copy link
Author

adrienthiery commented Feb 29, 2024

Hi @ekawibisono ,

Following what you mentioned, I ended up on the fact that I was using docker-compose -f hardhat-network.yml up because I'm using hardhat, but you seem to suggest I should use docker-compose up (using the default docker-compose.yaml, I guess?) considering it's the only one specifying a release version:
image

So I tried to run docker-compose up --build as some of the comments in #6787 mentioned, but I'm encountering a build error now:

❯ docker-compose up --build
[+] Running 4/4
 ✔ visualizer Pulled                                                                                                                                                                                             0.9s
 ✔ sig-provider Pulled                                                                                                                                                                                           0.9s
 ✔ stats Pulled                                                                                                                                                                                                  0.9s
 ✔ frontend Pulled                                                                                                                                                                                               0.9s
[+] Building 1.0s (16/31)                                                                                                                                                                        docker:desktop-linux
 => [backend internal] load build definition from Dockerfile                                                                                                                                                     0.0s
 => => transferring dockerfile: 2.49kB                                                                                                                                                                           0.0s
 => [backend internal] load metadata for docker.io/hexpm/elixir:1.14.5-erlang-24.2.2-alpine-3.18.2                                                                                                               0.4s
 => [backend internal] load .dockerignore                                                                                                                                                                        0.0s
 => => transferring context: 193B                                                                                                                                                                                0.0s
 => [backend builder  1/21] FROM docker.io/hexpm/elixir:1.14.5-erlang-24.2.2-alpine-3.18.2@sha256:3a5ac628c5d782f914a2e1922a5c17b34899a6d8cae2b6e5c99ab931ab546a95                                               0.0s
 => [backend internal] load build context                                                                                                                                                                        0.1s
 => => transferring context: 186.67kB                                                                                                                                                                            0.1s
 => CACHED [backend stage-1 2/7] RUN apk --no-cache --update add jq curl                                                                                                                                         0.0s
 => CACHED [backend stage-1 3/7] WORKDIR /app                                                                                                                                                                    0.0s
 => CACHED [backend builder  2/21] WORKDIR /app                                                                                                                                                                  0.0s
 => CACHED [backend builder  3/21] RUN apk --no-cache --update add alpine-sdk gmp-dev automake libtool inotify-tools autoconf python3 file gcompat                                                               0.0s
 => CACHED [backend builder  4/21] RUN set -ex &&     apk --update add libstdc++ curl ca-certificates gcompat                                                                                                    0.0s
 => CACHED [backend builder  5/21] ADD mix.exs mix.lock ./                                                                                                                                                       0.0s
 => CACHED [backend builder  6/21] ADD apps/block_scout_web/mix.exs ./apps/block_scout_web/                                                                                                                      0.0s
 => CACHED [backend builder  7/21] ADD apps/explorer/mix.exs ./apps/explorer/                                                                                                                                    0.0s
 => CACHED [backend builder  8/21] ADD apps/ethereum_jsonrpc/mix.exs ./apps/ethereum_jsonrpc/                                                                                                                    0.0s
 => CACHED [backend builder  9/21] ADD apps/indexer/mix.exs ./apps/indexer/                                                                                                                                      0.0s
 => ERROR [backend builder 10/21] RUN mix local.hex --force                                                                                                                                                      0.5s
------
 > [backend builder 10/21] RUN mix local.hex --force:
------
failed to solve: process "/bin/sh -c mix local.hex --force" did not complete successfully: exit code: 139

Still getting the same exit code: 139 that I'm getting when running the latest version

@adrienthiery
Copy link
Author

adrienthiery commented Mar 12, 2024

Hi @ekawibisono ,

any news on that?

@adrienthiery
Copy link
Author

adrienthiery commented Apr 4, 2024

Hey @vbaranov, you seem to be the one in charge of the repo, any idea if blockscout is supposed to be supporting M* chips out-of-the-box?
We'd love to use it for development (running on each dev machine).

Don't hesitate to ask for more tests/feedback if ever, I'm open to spend some time on this.

With the latest master, I'm still unable to run it:

❯ docker-compose up --build
[+] Running 31/31
 ✔ frontend 27 layers [⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿]      0B/0B      Pulled                                                                                                                                                                   9.2s
   ✔ 4abcf2066143 Already exists                                                                                                                                                                                                             0.0s
   ✔ 5b75e07a693b Already exists                                                                                                                                                                                                             0.0s
   ✔ cc3c2d870af4 Already exists                                                                                                                                                                                                             0.0s
   ✔ 48fd2423f425 Already exists                                                                                                                                                                                                             0.0s
   ✔ b59b96bd9bff Pull complete                                                                                                                                                                                                              0.8s
   ✔ d9601bad3c78 Pull complete                                                                                                                                                                                                              0.5s
   ✔ 57058a6cabc9 Pull complete                                                                                                                                                                                                              0.6s
   ✔ 4e93e255a946 Pull complete                                                                                                                                                                                                              1.0s
   ✔ 6fb9648e13c7 Pull complete                                                                                                                                                                                                              1.1s
   ✔ 9a3a71deadb3 Pull complete                                                                                                                                                                                                              1.4s
   ✔ 1ddac9642595 Pull complete                                                                                                                                                                                                              1.5s
   ✔ cc49e731eba9 Pull complete                                                                                                                                                                                                              1.9s
   ✔ 5cddfa017ed3 Pull complete                                                                                                                                                                                                              1.9s
   ✔ 5e6a1d6be87e Pull complete                                                                                                                                                                                                              2.1s
   ✔ 9c68251fbfbb Pull complete                                                                                                                                                                                                              2.5s
   ✔ 752ec1ffd561 Pull complete                                                                                                                                                                                                              2.4s
   ✔ 24101e9e9c7a Pull complete                                                                                                                                                                                                              2.6s
   ✔ 6af067d6c692 Pull complete                                                                                                                                                                                                              3.0s
   ✔ b5ede5c521aa Pull complete                                                                                                                                                                                                              3.0s
   ✔ 1b8de90038d5 Pull complete                                                                                                                                                                                                              3.3s
   ✔ 7b377a234abb Pull complete                                                                                                                                                                                                              3.6s
   ✔ 0e42a72db282 Pull complete                                                                                                                                                                                                              3.5s
   ✔ ad9da1699c46 Pull complete                                                                                                                                                                                                              4.1s
   ✔ 53e4c71a9274 Pull complete                                                                                                                                                                                                              4.0s
   ✔ 54c060be50f7 Pull complete                                                                                                                                                                                                              4.0s
   ✔ 928c20ea8bdf Pull complete                                                                                                                                                                                                              5.0s
   ✔ a426ec97c189 Pull complete                                                                                                                                                                                                              5.2s
 ✔ sig-provider Pulled                                                                                                                                                                                                                       1.1s
 ✔ stats Pulled                                                                                                                                                                                                                              1.2s
 ✔ visualizer Pulled                                                                                                                                                                                                                         1.2s
[+] Building 11.6s (16/31)                                                                                                                                                                                                   docker:desktop-linux
 => [backend internal] load build definition from Dockerfile                                                                                                                                                                                 0.0s
 => => transferring dockerfile: 2.49kB                                                                                                                                                                                                       0.0s
 => [backend internal] load metadata for docker.io/hexpm/elixir:1.14.5-erlang-24.2.2-alpine-3.18.2                                                                                                                                           1.9s
 => [backend internal] load .dockerignore                                                                                                                                                                                                    0.0s
 => => transferring context: 193B                                                                                                                                                                                                            0.0s
 => [backend internal] load build context                                                                                                                                                                                                    0.4s
 => => transferring context: 16.09MB                                                                                                                                                                                                         0.3s
 => [backend builder  1/21] FROM docker.io/hexpm/elixir:1.14.5-erlang-24.2.2-alpine-3.18.2@sha256:3a5ac628c5d782f914a2e1922a5c17b34899a6d8cae2b6e5c99ab931ab546a95                                                                           0.1s
 => => resolve docker.io/hexpm/elixir:1.14.5-erlang-24.2.2-alpine-3.18.2@sha256:3a5ac628c5d782f914a2e1922a5c17b34899a6d8cae2b6e5c99ab931ab546a95                                                                                             0.0s
 => => sha256:3a5ac628c5d782f914a2e1922a5c17b34899a6d8cae2b6e5c99ab931ab546a95 772B / 772B                                                                                                                                                   0.0s
 => => sha256:fb6e48113296f3761403380e198dc4eb0f0d1eec151405a25d607c7f9cb7b044 1.16kB / 1.16kB                                                                                                                                               0.0s
 => => sha256:9d86128269d494549b69f85193f5005c5f160d0c2f72fc1d8c98f469191af89b 1.55kB / 1.55kB                                                                                                                                               0.0s
 => [backend builder  2/21] WORKDIR /app                                                                                                                                                                                                     0.1s
 => [backend stage-1 2/7] RUN apk --no-cache --update add jq curl                                                                                                                                                                            1.7s
 => [backend builder  3/21] RUN apk --no-cache --update add alpine-sdk gmp-dev automake libtool inotify-tools autoconf python3 file gcompat                                                                                                  8.0s
 => [backend stage-1 3/7] WORKDIR /app                                                                                                                                                                                                       0.0s
 => [backend builder  4/21] RUN set -ex &&     apk --update add libstdc++ curl ca-certificates gcompat                                                                                                                                       1.0s
 => [backend builder  5/21] ADD mix.exs mix.lock ./                                                                                                                                                                                          0.0s
 => [backend builder  6/21] ADD apps/block_scout_web/mix.exs ./apps/block_scout_web/                                                                                                                                                         0.0s
 => [backend builder  7/21] ADD apps/explorer/mix.exs ./apps/explorer/                                                                                                                                                                       0.0s
 => [backend builder  8/21] ADD apps/ethereum_jsonrpc/mix.exs ./apps/ethereum_jsonrpc/                                                                                                                                                       0.0s
 => [backend builder  9/21] ADD apps/indexer/mix.exs ./apps/indexer/                                                                                                                                                                         0.0s
 => ERROR [backend builder 10/21] RUN mix local.hex --force                                                                                                                                                                                  0.3s
------
 > [backend builder 10/21] RUN mix local.hex --force:
------
failed to solve: process "/bin/sh -c mix local.hex --force" did not complete successfully: exit code: 139

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants