Description
One of our builds in CI system failed because of Go panicked. Just one among hundreds of successful ones
Steps to reproduce the issue:
DOCKER_BUILDKIT=1 docker build --squash --target prod -t ${IMAGE_TAG} .
Describe the results you received:
#7 [internal] load build context
#7 digest: sha256:18e228fdace57386830a6c39af65c173ade23fd993f7814640b469ee17545d0c
#7 name: "[internal] load build context"
#7 started: 2019-04-10 07:06:26.819074922 +0000 UTC
#7 completed: 2019-04-10 07:06:26.819387796 +0000 UTC
#7 duration: 312.874µs
#7 started: 2019-04-10 07:06:26.820125455 +0000 UTC
panic: send on closed channel
goroutine 139 [running]:
github.com/docker/cli/vendor/google.golang.org/grpc/transport.(*serverHandlerTransport).do(0xc4203ca870, 0xc4205bb4f0, 0x1, 0xc420bd4f66)
/go/src/github.com/docker/cli/vendor/google.golang.org/grpc/transport/handler_server.go:184 +0x10d
github.com/docker/cli/vendor/google.golang.org/grpc/transport.(*serverHandlerTransport).Write(0xc4203ca870, 0xc4203121e0, 0xc420bd4f60, 0x5, 0x5, 0xc4201ddd60, 0x1f, 0x1f, 0xc420bd4f66, 0xc420bd4f60, ...)
/go/src/github.com/docker/cli/vendor/google.golang.org/grpc/transport/handler_server.go:273 +0xdb
github.com/docker/cli/vendor/google.golang.org/grpc.(*serverStream).SendMsg(0xc42001c160, 0x557bca3f4e60, 0xc4205762a0, 0x0, 0x0)
/go/src/github.com/docker/cli/vendor/google.golang.org/grpc/stream.go:710 +0x229
github.com/docker/cli/vendor/github.com/tonistiigi/fsutil.(*syncStream).SendMsg(0xc4205f41c0, 0x557bca3f4e60, 0xc4205762a0, 0x0, 0x557bc8832101)
/go/src/github.com/docker/cli/vendor/github.com/tonistiigi/fsutil/send.go:203 +0x66
github.com/docker/cli/vendor/github.com/tonistiigi/fsutil.(*fileSender).Write(0xc42050c170, 0xc4208da000, 0x18, 0x8000, 0x18, 0x0, 0x0)
/go/src/github.com/docker/cli/vendor/github.com/tonistiigi/fsutil/send.go:189 +0xae
io.copyBuffer(0x557bca491ac0, 0xc42050c170, 0x557bca4929a0, 0xc42050a0e8, 0xc4208da000, 0x8000, 0x8000, 0x557bca44c060, 0x0, 0x557bca4929a0)
/usr/local/go/src/io/io.go:402 +0x242
io.CopyBuffer(0x557bca491ac0, 0xc42050c170, 0x557bca4929a0, 0xc42050a0e8, 0xc4208da000, 0x8000, 0x8000, 0x125, 0x0, 0x0)
/usr/local/go/src/io/io.go:373 +0x84
github.com/docker/cli/vendor/github.com/tonistiigi/fsutil.(*sender).sendFile(0xc420053500, 0xc4206e4680, 0x0, 0x0)
/go/src/github.com/docker/cli/vendor/github.com/tonistiigi/fsutil/send.go:136 +0x29a
github.com/docker/cli/vendor/github.com/tonistiigi/fsutil.(*sender).run.func2(0x8, 0x557bca485f70)
/go/src/github.com/docker/cli/vendor/github.com/tonistiigi/fsutil/send.go:73 +0xcc
github.com/docker/cli/vendor/golang.org/x/sync/errgroup.(*Group).Go.func1(0xc4205109c0, 0xc4205f42a0)
/go/src/github.com/docker/cli/vendor/golang.org/x/sync/errgroup/errgroup.go:58 +0x59
created by github.com/docker/cli/vendor/golang.org/x/sync/errgroup.(*Group).Go
/go/src/github.com/docker/cli/vendor/golang.org/x/sync/errgroup/errgroup.go:55 +0x68
Describe the results you expected:
Build completes normally.
Additional information you deem important (e.g. issue happens only occasionally):
Output of docker version:
Client:
Version: 18.09.4
API version: 1.39
Go version: go1.10.8
Git commit: d14af54266
Built: Wed Mar 27 18:35:44 2019
OS/Arch: linux/amd64
Experimental: false
Server: Docker Engine - Community
Engine:
Version: 18.09.4
API version: 1.39 (minimum version 1.12)
Go version: go1.10.8
Git commit: d14af54
Built: Wed Mar 27 18:01:48 2019
OS/Arch: linux/amd64
Experimental: true
Output of docker info:
Containers: 0
Running: 0
Paused: 0
Stopped: 0
Images: 36
Server Version: 18.09.4
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
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
Default Runtime: runc
Init Binary: docker-init
containerd version: bb71b10fd8f58240ca47fbb579b9d1028eea7c84
runc version: 2b18fe1d885ee5083ef9f0838fee39b62d653e30
init version: fec3683
Security Options:
apparmor
seccomp
Profile: default
Kernel Version: 4.15.0-47-generic
Operating System: Ubuntu 18.04.2 LTS
OSType: linux
Architecture: x86_64
CPUs: 12
Total Memory: 31.28GiB
Name: crmforandrey
ID: CYYO:IGA3:OXMW:TK53:VUYJ:JCGA:AVHR:ZL5S:W4NH:6S2W:NFWM:Y5BM
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Labels:
Experimental: true
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
Product License: Community Engine
Additional environment details (AWS, VirtualBox, physical, etc.):
Gitlab shell runner. Just an ordinary container build. DOCKER_BUILDKIT=1 and --squash used. Multistage build.
Description
One of our builds in CI system failed because of Go panicked. Just one among hundreds of successful ones
Steps to reproduce the issue:
DOCKER_BUILDKIT=1 docker build --squash --target prod -t ${IMAGE_TAG} .
Describe the results you received:
Describe the results you expected:
Build completes normally.
Additional information you deem important (e.g. issue happens only occasionally):
Output of
docker version:Output of
docker info:Additional environment details (AWS, VirtualBox, physical, etc.):
Gitlab shell runner. Just an ordinary container build.
DOCKER_BUILDKIT=1and--squashused. Multistage build.