Skip to content

[BUG] Endless start of containers #11107

@madcrinkle

Description

@madcrinkle

Description

There are two containers, one in task mode, executed and exited, the second depends on the first
If for some reason you delete it after executing the first container, then after stopping the containers the launch will freeze and hang without errors.
In version 1.29.2, such containers failed and the launch continued

Steps To Reproduce

Create docker-compose.yml

version: '3.7'

services:
  busybox:
    image: busybox:latest
    command: sleep 600
    depends_on:
      busybox-init:
        condition: service_completed_successfully
  
  busybox-init:
    image: busybox:latest
    command: sh -c "exit 0"

Up containers

% docker-compose -f docker-compose-depends.yml up -d
[+] Building 0.0s (0/0)                                                                                                                                                                    docker:default
[+] Running 3/3
 ✔ Network test_default           Created                                                                                                                                                            0.1s 
 ✔ Container test-busybox-init-1  Exited                                                                                                                                                             0.0s 
 ✔ Container test-busybox-1       Started

Remove container

% docker rm -f test-busybox-init-1
test-busybox-init-1

Stop containers

% docker-compose -f docker-compose-depends.yml stop 
[+] Stopping 1/1
 ✔ Container test-busybox-1  Stopped

Start containers, and nothing happens

% docker-compose -f docker-compose-depends.yml start
[+] Running 0/0
 ⠋ Container test-busybox-1  Starting                                                                                                                                                                0.0s 
canceled

Compose Version

% docker compose version
Docker Compose version 2.22.0
% docker-compose version
Docker Compose version 2.22.0

Docker Environment

% docker info
Client:
 Version:    24.0.6
 Context:    default
 Debug Mode: false
 Plugins:
  compose: Docker Compose (Docker Inc.)
    Version:  2.22.0
    Path:     /usr/lib/docker/cli-plugins/docker-compose

Server:
 Containers: 1
  Running: 0
  Paused: 0
  Stopped: 1
 Images: 756
 Server Version: 24.0.6
 Storage Driver: overlay2
  Backing Filesystem: xfs
  Supports d_type: true
  Using metacopy: true
  Native Overlay Diff: false
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: systemd
 Cgroup Version: 2
 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: io.containerd.runc.v2 runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 8c087663b0233f6e6e2f4515cee61d49f14746a8.m
 runc version: 
 init version: de40ad0
 Security Options:
  seccomp
   Profile: builtin
  cgroupns
 Kernel Version: 6.5.7-arch1-1
 Operating System: Arch Linux
 OSType: linux
 Architecture: x86_64
 CPUs: 8
 Total Memory: 31GiB
 Name: mad-arch
 ID: 35acf0c7-b034-4dc3-87d4-c680e65fd9e2
 Docker Root Dir: /home/lib/docker
 Debug Mode: false
 Experimental: true
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions