docker / for-mac

Bug reports for Docker Desktop for Mac
https://www.docker.com/products/docker#/mac
2.42k stars 116 forks source link

Calling fakeroot (in an Archlinux container) hangs forever #7331

Open denschub opened 3 weeks ago

denschub commented 3 weeks ago

Description

fakeroot v1.35 to be broken. It just freezes forever, and you have to kill the container. I'm not sure if this is Archlinux-specific, but it worked ~2 weeks ago, and no longer does.

This is a Docker for Mac-issue, it works fine in Docker-for-Linux with the same Docker version. Because it works on Linux, I'll report this here - but if this turns out not to be a Docker issue, please let me know. :)

Reproduce

  1. docker run -it --platform=linux/amd64 archlinux/archlinux:base-devel sh -c "fakeroot"

Expected behavior

I should see a shell that's interactive.

docker version

Client:
 Version:           26.1.4
 API version:       1.45
 Go version:        go1.21.11
 Git commit:        5650f9b
 Built:             Wed Jun  5 11:26:02 2024
 OS/Arch:           darwin/arm64
 Context:           desktop-linux

Server: Docker Desktop 4.31.0 (153195)
 Engine:
  Version:          26.1.4
  API version:      1.45 (minimum version 1.24)
  Go version:       go1.21.11
  Git commit:       de5c9cf
  Built:            Wed Jun  5 11:29:12 2024
  OS/Arch:          linux/arm64
  Experimental:     false
 containerd:
  Version:          1.6.33
  GitCommit:        d2d58213f83a351ca8f528a95fbd145f5654e957
 runc:
  Version:          1.1.12
  GitCommit:        v1.1.12-0-g51d5e94
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

docker info

Client:
 Version:    26.1.4
 Context:    desktop-linux
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.14.1-desktop.1
    Path:     /Users/denschub/.docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.27.1-desktop.1
    Path:     /Users/denschub/.docker/cli-plugins/docker-compose
  debug: Get a shell into any image or container (Docker Inc.)
    Version:  0.0.32
    Path:     /Users/denschub/.docker/cli-plugins/docker-debug
  dev: Docker Dev Environments (Docker Inc.)
    Version:  v0.1.2
    Path:     /Users/denschub/.docker/cli-plugins/docker-dev
  extension: Manages Docker extensions (Docker Inc.)
    Version:  v0.2.24
    Path:     /Users/denschub/.docker/cli-plugins/docker-extension
  feedback: Provide feedback, right in your terminal! (Docker Inc.)
    Version:  v1.0.5
    Path:     /Users/denschub/.docker/cli-plugins/docker-feedback
  init: Creates Docker-related starter files for your project (Docker Inc.)
    Version:  v1.2.0
    Path:     /Users/denschub/.docker/cli-plugins/docker-init
  sbom: View the packaged-based Software Bill Of Materials (SBOM) for an image (Anchore Inc.)
    Version:  0.6.0
    Path:     /Users/denschub/.docker/cli-plugins/docker-sbom
  scout: Docker Scout (Docker Inc.)
    Version:  v1.9.3
    Path:     /Users/denschub/.docker/cli-plugins/docker-scout

Server:
 Containers: 6
  Running: 0
  Paused: 0
  Stopped: 6
 Images: 3
 Server Version: 26.1.4
 Storage Driver: overlayfs
  driver-type: io.containerd.snapshotter.v1
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Cgroup Version: 2
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: d2d58213f83a351ca8f528a95fbd145f5654e957
 runc version: v1.1.12-0-g51d5e94
 init version: de40ad0
 Security Options:
  seccomp
   Profile: unconfined
  cgroupns
 Kernel Version: 6.6.31-linuxkit
 Operating System: Docker Desktop
 OSType: linux
 Architecture: aarch64
 CPUs: 9
 Total Memory: 23.44GiB
 Name: docker-desktop
 ID: ab34bb1d-206d-4686-9896-f47df089dd0d
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 HTTP Proxy: http.docker.internal:3128
 HTTPS Proxy: http.docker.internal:3128
 No Proxy: hubproxy.docker.internal
 Labels:
  com.docker.desktop.address=unix:///Users/denschub/Library/Containers/com.docker.docker/Data/docker-cli.sock
 Experimental: false
 Insecure Registries:
  hubproxy.docker.internal:5555
  127.0.0.0/8
 Live Restore Enabled: false

Diagnostics ID

7200E6FD-1BC6-461B-878E-83E3CBF00FC6/20240614231450

Additional Info

No response

denschub commented 3 weeks ago

I should add that there was a previous issue, https://github.com/moby/moby/issues/45436, and I have set the following engine config:

{
  // ...
  "default-ulimits": {
    "nofile": {
      "Name": "nofile",
      "Hard": 1024,
      "Soft": 524288
    }
  },
  // ...
}

but it's freezing with and without this.

usk-tkhs commented 2 weeks ago

Exactly. I am currently encountering this same problem at the Archlinux container, where building packages for Archilinux for armv7l at that container using makepkg fails. During the process of makepkg, fakeroot is called, but it freezes and does not move forward.

drzee99 commented 1 week ago

I can confirm that I have the same issue with all my containers building AUR packages for Arch Linux (x86_64).

Forcing a downgrade of the fakeroot package to the previous version: pacman -U --noconfirm https://archive.archlinux.org/packages/f/fakeroot/fakeroot-1.34-1-x86_64.pkg.tar.zst

prior to running the makepkg command allows the build to run successfully.

thaJeztah commented 1 week ago

This is a Docker for Mac-issue, it works fine in Docker-for-Linux with the same Docker version. Because it works on Linux, I'll report this here - but if this turns out not to be a Docker issue, please let me know. :)

Are you running the same version of runc on your Linux installation? Would you be able to post the docker version and docker info of your Linux installation as well?

As the previous issue (linked in the moby repo) was related to Ulimits, and I'm aware that runc v1.1.13 had fixes to work around an issue in the Go runtime (see https://github.com/opencontainers/runc/pull/4277, and https://github.com/opencontainers/runc/pull/4299), which could result in the ulimits not always being applied. The next release of Docker Desktop, should come with runc 1.1.13 (in case that's the cause)

Forcing a downgrade of the fakeroot package to the previous version:

@drzee99 do you know what the version of fakeroot was that didn't work? (In case colleagues want to look at differences between those versions to narrow down what could cause it).

thaJeztah commented 1 week ago

do you know what the version of fakeroot was that didn't work? (In case colleagues want to look at differences between those versions to narrow down what could cause it).

Nevermind, I see the original comment at the top mentions it; 😅

fakeroot v1.35 to be broken.