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

[BUG] Compose hangs indefinitely when build of a dependency dies #10718

Closed
Regrau opened this issue Jun 15, 2023 · 7 comments · Fixed by #10725
Closed

[BUG] Compose hangs indefinitely when build of a dependency dies #10718

Regrau opened this issue Jun 15, 2023 · 7 comments · Fixed by #10725

Comments

@Regrau
Copy link

Regrau commented Jun 15, 2023

Description

The docker compose output is stuck and can't be closed with Ctrl+C when the build of a dependency container fails.
Killing the docker compose process from an outside shell seems to be the only workaround

Steps To Reproduce

For convenience sake, here's a repos with both files

https://github.com/Regrau/docker-compose-bug-report

git clone https://github.com/Regrau/docker-compose-bug-report && cd docker-compose-bug-report
docker compose up -d --build

docker-compose.yml

services:
  web:
    image: busybox
    command: tail -f /dev/null
    depends_on:
      - db
  db:
    container_name: test
    build:
      dockerfile: Dockerfile
      context: .

Dockerfile

FROM alpine:3.17

RUN exit 1

CMD [ "echo", "hello" ]

Compose Version

Docker Compose version 2.18.1

Docker Environment

Client: Docker Engine - Community
 Version:    24.0.2
 Context:    colima
 Debug Mode: false
 Plugins:
  compose: Docker Compose (Docker Inc.)
    Version:  2.18.1
    Path:     /Users/regrau/.docker/cli-plugins/docker-compose

Server:
 Containers: 15
  Running: 10
  Paused: 0
  Stopped: 5
 Images: 15
 Server Version: 23.0.6
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Using metacopy: false
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Cgroup Version: 1
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: runc io.containerd.runc.v2
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 1fbd70374134b891f97ce19c70b6e50c7b9f4e0d
 runc version: 860f061b76bb4fc671f0f9e900f7d80ff93d4eb7
 init version: 
 Security Options:
  seccomp
   Profile: builtin
 Kernel Version: 6.1.29-0-virt
 Operating System: Alpine Linux v3.18
 OSType: linux
 Architecture: aarch64
 CPUs: 4
 Total Memory: 7.754GiB
 Name: colima
 ID: 1956e4ba-3df0-4b39-bce9-a04a0473cb57
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

Anything else?

No response

@RealAlphabet
Copy link

It's incredible that this bug still hasn't been fixed, I've had this problem on several of my machines for several weeks now, even after a clean reinstall. It's not as if Docker isn't used by a huge number of developers and companies...

@ndeloof
Copy link
Contributor

ndeloof commented Jun 20, 2023

@RealAlphabet why didn't you reported this issue earlier then ?
@Regrau AFAICT this is fixed by #10725, can you please build binary from this PR (make install) to confirm ?

@RealAlphabet
Copy link

I must have deleted part of my message before sending it. I first encountered the problem 1 week ago. Someone had already reported the problem in the Github issues at the time.

What I wanted to say is that I downgraded Docker to v23.0 (released in February according to the Docker site) and was able to reproduce the problem on bare metal after a fresh install of Debian 11. This proves that the problem has existed for at least several months now.

@ndeloof
Copy link
Contributor

ndeloof commented Jun 20, 2023

That's indeed surprising nobody reported this before. Would you have a chance to confirm #10725 fix this ?

@fho
Copy link

fho commented Jun 20, 2023

That's indeed surprising nobody reported this before.

It is the same as #10648

@RealAlphabet
Copy link

That's indeed surprising nobody reported this before. Would you have a chance to confirm #10725 fix this ?

I tried to do this as soon as you replied, but unfortunately I don't have enough disk space to build at the moment. I'll try again as soon as I have access to another machine (in approximately 2-4 hours).

@Regrau
Copy link
Author

Regrau commented Jun 20, 2023

@Regrau AFAICT this is fixed by #10725, can you please build binary from this PR (make install) to confirm ?

Hi @ndeloof The provided PR does indeed solve the issue for me thanks for the fix! Waiting for the next version than.

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

Successfully merging a pull request may close this issue.

4 participants