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

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

Open
denschub opened this issue Jun 14, 2024 · 6 comments
Open

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

denschub opened this issue Jun 14, 2024 · 6 comments

Comments

@denschub
Copy link

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
Copy link
Author

I should add that there was a previous issue, moby/moby#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
Copy link

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
Copy link

drzee99 commented Jun 29, 2024

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
Copy link
Member

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 opencontainers/runc#4277, and opencontainers/runc#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
Copy link
Member

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.

bostjan added a commit to ciready/ciready that referenced this issue Sep 6, 2024
Snoopy arch package builds started to hang unexpectedly at some point.
Found the workaround described here:
docker/for-mac#7331
@vincent-163
Copy link

fakeroot v1.36 continues to be broken as well, I found this issue while running makepkg -si in a systemd-nspawn environment and fixed the problem by downgrading to v1.34

bostjan added a commit to bostjan/snoopy that referenced this issue Oct 24, 2024
Packaging-related Actions for Arch Linux started failing because the whole process
gets stuck on a hanged `fakeroot` process. This seems to be the relevant issue:
docker/for-mac#7331

Disabling Arch Linux packaging support until this issue is resolved.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants