Skip to content

gcplogs driver is leaking gRPC connections (cloud logger instances) #41512

@phaas

Description

@phaas

Description

When containers using --log-driver=gcplogs are restarted, the cloud logging object is not closed. This results in a leak of ~200Kb memory and 1 tcp socket.

Steps to reproduce the issue:

  1. Start a short-lived container using gcplogs driver:
    sudo docker run --rm --log-driver=gcplogs debian "echo" "Hello from docker"
    or
    sudo docker restart ${container_with_gcplogs}

  2. Check the dockerd connection count (and/or memory)
    sudo ls -l /proc/$(pidof dockerd)/fd | wc -l

Describe the results you received:
Memory and tcp sockets grow with every container (re)start

Describe the results you expected:
Resources are released when containers are stopped/restarted

Output of docker version:

Server:
 Engine:
  Version:          19.03.6
  API version:      1.40 (minimum version 1.12)
  Go version:       go1.13.5
  Git commit:       369ce74
  Built:            Thu May 21 19:33:08 2020
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.3.2
  GitCommit:        ff48f57fc83a8c44cf4ad5d672424a98ba37ded6
 runc:
  Version:          1.0.0-rc10
  GitCommit:        
 docker-init:
  Version:          0.18.0
  GitCommit:        fec3683b971d9c3ef73f284f176672c44b448662

Additional environment details (AWS, VirtualBox, physical, etc.):
Tested directly on GCP VM

Metadata

Metadata

Assignees

No one assigned

    Labels

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

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions