Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build fails to export image with "failed calculating diff pairs for exported snapshot" #960

Closed
msg555 opened this issue Apr 25, 2019 · 0 comments · Fixed by #962
Closed

Comments

@msg555
Copy link
Contributor

msg555 commented Apr 25, 2019

Steps to reproduce:

First, due to a separate issue (containerd/containerd#3238), we need to push registry.access.redhat.com/rhel7/rhel:7.3 to a local registry. Let's suppose that image is called localhost:5000/rhel7:7.3. Then the below setup is what I'm using

Dockerfile:

FROM localhost:5000/rhel7:7.3
RUN rm -rf /usr/lib/python2.7/site-packages/subscription_manager

Build command:
buildctl build --frontend dockerfile.v0 --local dockerfile=. --local context=. --output type=image,name=myimage

The client gets the error

error: failed to solve: rpc error: code = Unknown desc = failed calculating diff pairs for exported snapshot: mount callback failed on /tmp/containerd-mount622803746: mount callback failed on /tmp/containerd-mount457946649: failed to open writer: ref buildkit/1/r7hengy3nchk411du0q39x1g8 locked: unavailable

On the daemon side we see

ERRO[2558] /moby.buildkit.v1.Control/Solve returned error: unavailable
github.com/containerd/containerd/errdefs.init.ializers
	/src/vendor/github.com/containerd/containerd/errdefs/errors.go:44
runtime.main
	/usr/local/go/src/runtime/proc.go:188
runtime.goexit
	/usr/local/go/src/runtime/asm_amd64.s:1337
ref buildkit/1/r7hengy3nchk411du0q39x1g8 locked
github.com/containerd/containerd/content/local.tryLock
	/src/vendor/github.com/containerd/containerd/content/local/locks.go:39
github.com/containerd/containerd/content/local.(*store).Writer
	/src/vendor/github.com/containerd/containerd/content/local/store.go:455
github.com/containerd/containerd/metadata.(*contentStore).Writer.func1
	/src/vendor/github.com/containerd/containerd/metadata/content.go:462
go.etcd.io/bbolt.(*DB).Update
	/src/vendor/go.etcd.io/bbolt/db.go:688
github.com/containerd/containerd/metadata.(*DB).Update
	/src/vendor/github.com/containerd/containerd/metadata/db.go:238
github.com/containerd/containerd/metadata.update
	/src/vendor/github.com/containerd/containerd/metadata/bolt.go:56
github.com/containerd/containerd/metadata.(*contentStore).Writer
	/src/vendor/github.com/containerd/containerd/metadata/content.go:385
github.com/moby/buildkit/snapshot/containerd.(*nsContent).writer
	/src/snapshot/containerd/content.go:89
github.com/moby/buildkit/snapshot/containerd.(*nsContent).Writer
	/src/snapshot/containerd/content.go:75
github.com/moby/buildkit/snapshot/containerd.(*noGCContentStore).Writer
	/src/snapshot/containerd/content.go:114
github.com/containerd/containerd/diff/walking.(*walkingDiff).Compare.func1.1
	/src/vendor/github.com/containerd/containerd/diff/walking/differ.go:90
github.com/containerd/containerd/mount.WithTempMount
	/src/vendor/github.com/containerd/containerd/mount/temp.go:65
github.com/containerd/containerd/diff/walking.(*walkingDiff).Compare.func1
	/src/vendor/github.com/containerd/containerd/diff/walking/differ.go:83
github.com/containerd/containerd/mount.WithTempMount
	/src/vendor/github.com/containerd/containerd/mount/temp.go:65
github.com/containerd/containerd/diff/walking.(*walkingDiff).Compare
	/src/vendor/github.com/containerd/containerd/diff/walking/differ.go:82
github.com/moby/buildkit/util/winlayers.(*winDiffer).Compare
	/src/util/winlayers/differ.go:49
github.com/moby/buildkit/cache/blobs.getDiffPairs.func2.1
	/src/cache/blobs/blobs.go:102
github.com/moby/buildkit/util/flightcontrol.(*call).run
	/src/util/flightcontrol/flightcontrol.go:116
sync.(*Once).Do
	/usr/local/go/src/sync/once.go:44
runtime.goexit
	/usr/local/go/src/runtime/asm_amd64.s:1337
failed to open writer
github.com/containerd/containerd/diff/walking.(*walkingDiff).Compare.func1.1
	/src/vendor/github.com/containerd/containerd/diff/walking/differ.go:96
github.com/containerd/containerd/mount.WithTempMount
	/src/vendor/github.com/containerd/containerd/mount/temp.go:65
github.com/containerd/containerd/diff/walking.(*walkingDiff).Compare.func1
	/src/vendor/github.com/containerd/containerd/diff/walking/differ.go:83
github.com/containerd/containerd/mount.WithTempMount
	/src/vendor/github.com/containerd/containerd/mount/temp.go:65
github.com/containerd/containerd/diff/walking.(*walkingDiff).Compare
	/src/vendor/github.com/containerd/containerd/diff/walking/differ.go:82
github.com/moby/buildkit/util/winlayers.(*winDiffer).Compare
	/src/util/winlayers/differ.go:49
github.com/moby/buildkit/cache/blobs.getDiffPairs.func2.1
	/src/cache/blobs/blobs.go:102
github.com/moby/buildkit/util/flightcontrol.(*call).run
	/src/util/flightcontrol/flightcontrol.go:116
sync.(*Once).Do
	/usr/local/go/src/sync/once.go:44
runtime.goexit
	/usr/local/go/src/runtime/asm_amd64.s:1337
mount callback failed on /tmp/containerd-mount055207063
github.com/containerd/containerd/mount.WithTempMount
	/src/vendor/github.com/containerd/containerd/mount/temp.go:65
github.com/containerd/containerd/diff/walking.(*walkingDiff).Compare.func1
	/src/vendor/github.com/containerd/containerd/diff/walking/differ.go:83
github.com/containerd/containerd/mount.WithTempMount
	/src/vendor/github.com/containerd/containerd/mount/temp.go:65
github.com/containerd/containerd/diff/walking.(*walkingDiff).Compare
	/src/vendor/github.com/containerd/containerd/diff/walking/differ.go:82
github.com/moby/buildkit/util/winlayers.(*winDiffer).Compare
	/src/util/winlayers/differ.go:49
github.com/moby/buildkit/cache/blobs.getDiffPairs.func2.1
	/src/cache/blobs/blobs.go:102
github.com/moby/buildkit/util/flightcontrol.(*call).run
	/src/util/flightcontrol/flightcontrol.go:116
sync.(*Once).Do
	/usr/local/go/src/sync/once.go:44
runtime.goexit
	/usr/local/go/src/runtime/asm_amd64.s:1337
mount callback failed on /tmp/containerd-mount440148504
github.com/containerd/containerd/mount.WithTempMount
	/src/vendor/github.com/containerd/containerd/mount/temp.go:65
github.com/containerd/containerd/diff/walking.(*walkingDiff).Compare
	/src/vendor/github.com/containerd/containerd/diff/walking/differ.go:82
github.com/moby/buildkit/util/winlayers.(*winDiffer).Compare
	/src/util/winlayers/differ.go:49
github.com/moby/buildkit/cache/blobs.getDiffPairs.func2.1
	/src/cache/blobs/blobs.go:102
github.com/moby/buildkit/util/flightcontrol.(*call).run
	/src/util/flightcontrol/flightcontrol.go:116
sync.(*Once).Do
	/usr/local/go/src/sync/once.go:44
runtime.goexit
	/usr/local/go/src/runtime/asm_amd64.s:1337
failed calculating diff pairs for exported snapshot
github.com/moby/buildkit/exporter/containerimage.(*ImageWriter).exportLayers.func1.1
	/src/exporter/containerimage/writer.go:161
golang.org/x/sync/errgroup.(*Group).Go.func1
	/src/vendor/golang.org/x/sync/errgroup/errgroup.go:58
runtime.goexit
	/usr/local/go/src/runtime/asm_amd64.s:1337 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant