Skip to content

Dockerd / buildkit in a infinite loop and burning cpu #1313

@bpaquet

Description

@bpaquet

Hello,

While trying to use buildkit through docker build, my dockerd daemon seems to go in a infinite loop and the docker build is hanging.

Version: Docker version 19.03.5, build 633a0ea838
Processes (ps axu | grep docker):

root      5822 96.6  0.9 2460340 290756 ?      Ssl  18:29  45:16 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
tc0      26084  0.2  0.2 1080756 72472 ?       Sl   18:51   0:03 docker build --build-arg ...

While looking into the trace, I found lot of occurence of github.com/docker/docker/vendor/github.com/moby/buildkit/solver.(*cacheManager).filterResults:173
But I'm not a specialist of this kind of trace, so may be I'm not reading it right.

The trace is here: out.gz (remove the .gz if needed).
Trace extracted with curl --unix-socket /var/run/docker.sock http://./debug/pprof/trace

The CPU usage does not go down when I stop the docker build process (still using 100%).

@tonistiigi I already had an issue around cache and LoadWithParents (#1250, fixed by you, thx), while building the same Dockerfile.

Let me know if you have any idea about the issue and what I can do to dig further.

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