[GH-ISSUE #580] qemu segmentation fault on Apple M1 / arm64 #104

Closed
opened 2026-03-03 12:08:19 +03:00 by kerem · 6 comments
Owner

Originally created by @markerdmann on GitHub (Sep 23, 2021).
Original GitHub issue: https://github.com/fsouza/fake-gcs-server/issues/580

The container crashes immediately after startup on an M1 Macbook. This is the log output:

fakegcs_1 | time="2021-09-23T18:41:16Z" level=info msg="server started at https://[::]:4443"
fakegcs_1 | qemu: uncaught target signal 11 (Segmentation fault) - core dumped

Originally created by @markerdmann on GitHub (Sep 23, 2021). Original GitHub issue: https://github.com/fsouza/fake-gcs-server/issues/580 The container crashes immediately after startup on an M1 Macbook. This is the log output: fakegcs_1 | time="2021-09-23T18:41:16Z" level=info msg="server started at https://[::]:4443" fakegcs_1 | qemu: uncaught target signal 11 (Segmentation fault) - core dumped
kerem 2026-03-03 12:08:19 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@fsouza commented on GitHub (Sep 23, 2021):

@markerdmann thanks for reporting. I don't have an M1 currently, so hard for me to investigate this 😞

Are you able to reproduce it when running natively, without a container?

<!-- gh-comment-id:926087098 --> @fsouza commented on GitHub (Sep 23, 2021): @markerdmann thanks for reporting. I don't have an M1 currently, so hard for me to investigate this 😞 Are you able to reproduce it when running natively, without a container?
Author
Owner

@markerdmann commented on GitHub (Sep 23, 2021):

My current workaround is just to clone this repo and run with the fake-gcs-server/Dockerfile.

This might be the solution? https://www.docker.com/blog/multi-arch-build-and-images-the-simple-way/

<!-- gh-comment-id:926134540 --> @markerdmann commented on GitHub (Sep 23, 2021): My current workaround is just to clone this repo and run with the fake-gcs-server/Dockerfile. This might be the solution? https://www.docker.com/blog/multi-arch-build-and-images-the-simple-way/
Author
Owner

@fsouza commented on GitHub (Sep 23, 2021):

Oh I see, is the problem only when you pull the image from Docker Hub? I'll investigate more later.

<!-- gh-comment-id:926139446 --> @fsouza commented on GitHub (Sep 23, 2021): Oh I see, is the problem only when you pull the image from Docker Hub? I'll investigate more later.
Author
Owner

@markerdmann commented on GitHub (Sep 23, 2021):

Yes, I think when building locally, Docker is able to use the multiarch builds of the two base images referenced in the Dockerfile.

<!-- gh-comment-id:926195370 --> @markerdmann commented on GitHub (Sep 23, 2021): Yes, I think when building locally, Docker is able to use the multiarch builds of the two base images referenced in the Dockerfile.
Author
Owner

@fafrd commented on GitHub (Oct 8, 2021):

Can confirm- I was able to work around this by cloning the repo and building/running the image manually:

git clone https://github.com/fsouza/fake-gcs-server.git
docker build -t fsouza/fake-gcs-server .
docker run fsouza/fake-gcs-server

in my case, I exposed the necessary ports/served on localhost for development:

docker run -p 4443:4443 fsouza/fake-gcs-server -scheme http -port 4443 -external-url http://localhost:4443
<!-- gh-comment-id:939126365 --> @fafrd commented on GitHub (Oct 8, 2021): Can confirm- I was able to work around this by cloning the repo and building/running the image manually: ```bash git clone https://github.com/fsouza/fake-gcs-server.git docker build -t fsouza/fake-gcs-server . docker run fsouza/fake-gcs-server ``` in my case, I exposed the necessary ports/served on localhost for development: ```bash docker run -p 4443:4443 fsouza/fake-gcs-server -scheme http -port 4443 -external-url http://localhost:4443 ```
Author
Owner

@stoffeastrom commented on GitHub (Dec 28, 2021):

@fsouza Looks like you are using github actions. There are some actions available.

https://github.com/docker/setup-buildx-action#with-qemu

Something like: (note haven't tested this myself yet)

name: docker-push
on: create

jobs:
  release:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2.4.0
        if: github.event.ref_type == 'tag'

      - uses: actions/setup-go@v2.1.5
        if: github.event.ref_type == 'tag'
        id: go
        with:
          go-version: 1.17

      - name: go-build
        if: github.event.ref_type == 'tag'
        run: go build -o fake-gcs-server
        env:
          CGO_ENABLED: 0

      - name: sanity-check
        if: github.event.ref_type == 'tag'
        uses: docker://alpine
        with:
          entrypoint: sh
          args: -c "./fake-gcs-server -h"

      - name: docker-publish
        if: github.event.ref_type == 'tag'
        uses: fsouza/docker-publish-action@v1.0.1
        with:
          dockerfile: ci/Dockerfile
          docker-image: fsouza/fake-gcs-server
          DOCKER-USERNAME: ${{ secrets.DOCKER_USERNAME }}
          docker-password: ${{ secrets.DOCKER_PASSWORD }}

      - name: setup qemu
        if: github.event.ref_type == 'tag'
        uses: docker/setup-qemu-action@v1
      - name: setup buildx
        if: github.event.ref_type == 'tag'
        id: buildx
        uses: docker/setup-buildx-action@v1
      - name: available platforms
        if: github.event.ref_type == 'tag'
        run: echo ${{ steps.buildx.outputs.platforms }}
      - name: login to docker hub
        if: github.event.ref_type == 'tag'
        uses: docker/login-action@v1
        with:
          username: ${{ secrets.DOCKER_USERNAME }}
          password: ${{ secrets.DOCKER_TOKEN }}
      - name: build the image
        if: github.event.ref_type == 'tag'
        run: |
          docker buildx build \
          --push \
          --tag ${{ secrets.DOCKER_USERNAME }}/fake-gcs-server:latest \
          --platform linux/amd64,linux/arm64 .
<!-- gh-comment-id:1002171194 --> @stoffeastrom commented on GitHub (Dec 28, 2021): @fsouza Looks like you are using github actions. There are some actions available. https://github.com/docker/setup-buildx-action#with-qemu Something like: (*note* haven't tested this myself yet) ```yaml name: docker-push on: create jobs: release: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2.4.0 if: github.event.ref_type == 'tag' - uses: actions/setup-go@v2.1.5 if: github.event.ref_type == 'tag' id: go with: go-version: 1.17 - name: go-build if: github.event.ref_type == 'tag' run: go build -o fake-gcs-server env: CGO_ENABLED: 0 - name: sanity-check if: github.event.ref_type == 'tag' uses: docker://alpine with: entrypoint: sh args: -c "./fake-gcs-server -h" - name: docker-publish if: github.event.ref_type == 'tag' uses: fsouza/docker-publish-action@v1.0.1 with: dockerfile: ci/Dockerfile docker-image: fsouza/fake-gcs-server DOCKER-USERNAME: ${{ secrets.DOCKER_USERNAME }} docker-password: ${{ secrets.DOCKER_PASSWORD }} - name: setup qemu if: github.event.ref_type == 'tag' uses: docker/setup-qemu-action@v1 - name: setup buildx if: github.event.ref_type == 'tag' id: buildx uses: docker/setup-buildx-action@v1 - name: available platforms if: github.event.ref_type == 'tag' run: echo ${{ steps.buildx.outputs.platforms }} - name: login to docker hub if: github.event.ref_type == 'tag' uses: docker/login-action@v1 with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_TOKEN }} - name: build the image if: github.event.ref_type == 'tag' run: | docker buildx build \ --push \ --tag ${{ secrets.DOCKER_USERNAME }}/fake-gcs-server:latest \ --platform linux/amd64,linux/arm64 . ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/fake-gcs-server#104
No description provided.