Skip to content

Bug: docker hang on restarting when bridge set to none. #42461

@payall4u

Description

@payall4u

Description
Set "bridge": "none" on daemon.json. When start container, it will create sandbox. The sandbox won't be deleted when removing the container. The sandbox be cleaned until restarting the docker. Dockerd will hang on restarting if a lot of containers have been created.

Steps to reproduce the issue:

  1. Update the docker config set "bridge": "none"
  2. Use for i in $(seq 1 4000); do docker run --rm ubuntu; done to create many sandbox.
  3. Restart docker and wait.(We can verify it by read network local-kv.db directly.)

Describe the results you received:
Dockerd will hang on restarting. We can know the restore goroutine stuck on CleanSandbox() from stackinfo.

Describe the results you expected:
Don't create sandbox if needless.

Output of docker version:

Client: Docker Engine - Community
 Version:           19.03.9
 API version:       1.40
 Go version:        go1.13.10
 Git commit:        9d988398e7
 Built:             Fri May 15 00:22:47 2020
 OS/Arch:           linux/amd64
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          19.03.9
  API version:      1.40 (minimum version 1.12)
  Go version:       go1.13.10
  Git commit:       9d988398e7
  Built:            Fri May 15 00:28:17 2020
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          v1.2.13
  GitCommit:        7ad184331fa3e55e52b890ea95e65ba581ae3429
 runc:
  Version:          1.0.0-rc10
  GitCommit:        dc9208a3303feef5b3839f4323d9beb36df0a9dd
 docker-init:
  Version:          0.18.0
  GitCommit:        fec3683

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/networkingNetworkingkind/bugBugs are bugs. The cause may or may not be known at triage time so debugging may be needed.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions