Giter VIP home page Giter VIP logo

Comments (13)

karalabe avatar karalabe commented on June 14, 2024 8

Just an update from the future. Qemu 4.2.1 and Go 1.16.5 fairly instantly blows on docker buildx (arm64), but setting GOMAXPROCS=1 does fix the scheduling problems (apparently Qemu does some weird multi-cpu, not hardware conforming).

If a signal is raised, the process still crashes, and after 5-10 minutes of build time, the builder hangs.

from buildx.

tuonga avatar tuonga commented on June 14, 2024 2

@andrewrynhard tested with QEMU 4.0.0 and that seems to have solved his problems. QEMU 4.0.0 will be in the next release of Docker Desktop. I think we can close this ticket for now. Thanks to Andrew for the testing.

from buildx.

tonistiigi avatar tonistiigi commented on June 14, 2024

Are these using QEMU? If so what version/source? We have some go patches in https://github.com/moby/qemu for (that I believe are also the patches that ship with Docker desktop).

from buildx.

tonistiigi avatar tonistiigi commented on June 14, 2024

Also, you do not need to use --platform=$TARGETPLATFORM. That is the default.

from buildx.

andrewrynhard avatar andrewrynhard commented on June 14, 2024

I have a bit of a strange setup. I run all of my development out of docker containers with a compose file using Docker Desktop on a Mac:

version: '3.7'

services:

    docker:
      image: docker:19.03.0-beta5-dind
      container_name: docker
      network_mode: "host"
      volumes:
        - var-run:/var/run
        - ${WORKSPACE}:/root:delegated
        - /dev:/dev
        - tmp:/tmp
      restart: always
      privileged: true
      command: [ '--storage-driver', 'overlay2' , '--experimental' ]

    workspace:
      image: andrewrynhard/workspace:latest
      container_name: workspace
      working_dir: /root/src/github.com/talos-systems
      network_mode: "host"
      ports:
      - "3000:3000"
      volumes:
        - var-run:/var/run
        - ${WORKSPACE}:/root:delegated
        - /dev:/dev
        - tmp:/tmp
      restart: always
      stdin_open: true
      tty: true
      privileged: true
      depends_on:
        - docker

volumes:
  var-run:
  tmp:

I don't even see QEMU installed in DIND container :/

from buildx.

tonistiigi avatar tonistiigi commented on June 14, 2024

I don't even see QEMU installed in DIND container :/

QEMU is registered directly in the kernel, you don't need anything specific inside container.

Can you post the exact version of Docker Desktop.

@tuonga Can you verify that Desktop has the qemu go patches. Do these traces look similar to the problem the patch addresses?

from buildx.

andrewrynhard avatar andrewrynhard commented on June 14, 2024

Docker Desktop 2.0.4.1 (34207)

from buildx.

tuonga avatar tuonga commented on June 14, 2024

@tonistiigi the desktop should have the patches.
@andrewrynhard can you post the output of the following? In the mean time we'll take a deeper look.

docker run arm64v8/alpine sh -c "/proc/1/exe"

from buildx.

andrewrynhard avatar andrewrynhard commented on June 14, 2024

@tuonga

From my Mac:

Andrews-MBP:~ andrewrynhard$ docker run arm64v8/alpine sh -c "/proc/1/exe"
Unable to find image 'arm64v8/alpine:latest' locally
latest: Pulling from arm64v8/alpine
0362ad1dd800: Pull complete
Digest: sha256:9d2b3c9ba598ccd7c4aa49e5ad5b4cf47fb882adc3f5955d5e160b07f26a68ee
Status: Downloaded newer image for arm64v8/alpine:latest
qemu: no user program specified

From DIND setup:

[I] $ docker run arm64v8/alpine sh -c "/proc/1/exe"
Unable to find image 'arm64v8/alpine:latest' locally
latest: Pulling from arm64v8/alpine
0362ad1dd800: Pull complete
Digest: sha256:9d2b3c9ba598ccd7c4aa49e5ad5b4cf47fb882adc3f5955d5e160b07f26a68ee
Status: Downloaded newer image for arm64v8/alpine:latest
qemu: no user program specified

from buildx.

tuonga avatar tuonga commented on June 14, 2024

@tuonga
Andrews-MBP:~ andrewrynhard$ docker run arm64v8/alpine sh -c "/proc/1/exe"

I am really sorry, I meant

``docker run arm64v8/alpine sh -c "/proc/1/exe --version"`

from buildx.

andrewrynhard avatar andrewrynhard commented on June 14, 2024
[I] $ docker run arm64v8/alpine sh -c "/proc/1/exe --version"
qemu-aarch64 version 3.1.0 (v3.1.0-1-ga67c442e89-dirty)
Copyright (c) 2003-2018 Fabrice Bellard and the QEMU Project developers

from buildx.

xonq avatar xonq commented on June 14, 2024

what's the status of qemu 4 for buildx on linux?

currently running: Docker version 19.03.5-ce, build 633a0ea838

from buildx.

benchonaut avatar benchonaut commented on June 14, 2024

(same with qemu 4.2.0 and ubunu 20.04 on ARM64 hosts)

from buildx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.