Closed myhau closed 3 years ago
@myhau Did you see this as a regression on v0.7.2 or not?
@myhau I can't rebuild your example Dockerfile as I don't have access to the build context it is using. If this is a public project please post it. If not, try to make a repro with a public repo.
@tonistiigi this also happened on 0.7.1. It's a private project and I won't be able to share it. I will try to create some reproducer, though.
I won't be able to share a reproducer right now, but I started debugging this issue. I've added some print statements in cache/remotecache/v1/utils.go
func marshalItem(it *item, state *marshalState) error {
if _, ok := state.recordsByItem[it]; ok {
return nil
}
println("Item")
println(it.dgst)
println(len(it.links))
and thee seems to be a cycle:
... { SOME LAYERS } ...
Item
sha256:9cb10fb741d8a44ea802a711c50e7dd9544bd5a314d7d6a7ad1c74cb189b5795
2
Item
sha256:f31b0de45deb848d770f80588a1e48871b4192b51635eee9d96b8243949dc4b9
2
Item
sha256:29077b3fcacf630c03e045f74ceeece9ea7fed8951f9b8aea234954c171fa16f
2
Item
sha256:a81904108def4c8528d4f62a8b4697f865c5e946306c37d7c6c581a81d99c6a2
1
Item
sha256:4e32986c7015560b427bc34e8db5a5deeee1b94376274877f0b49ac1358d4553
2
Item
sha256:a0322fc9963e65b16a78bdb99030922d94b1984cdb5e402d0dc79a6760b4dbc0
2
Item
sha256:f7476d78c0ce02326f00e99553b3d19e81e96dae909830c65f6daca3c5e0953d
1
Item
sha256:1b56f72ea87be6c48fc070e678b01dcd7f5b8952b393c9b18037f6da7342b46d
2
Item
sha256:6a2f126cff983e4f7fc129a5d1a5c1ed91861bb522fd5c8b93aa12a104f7f6ad
2
Item
sha256:b0e3a2ffc9b52bfbd2be6188ca765a155af08a947158f8b844d29bd19a44a0c2
1
Item
sha256:9cb10fb741d8a44ea802a711c50e7dd9544bd5a314d7d6a7ad1c74cb189b5795
2
... { CYCLE REPEATED MANY TIMES } ...
Maybe this is related to https://github.com/moby/buildkit/pull/1382 / https://github.com/moby/buildkit/pull/1514 ?
Environment
Daemon
buildkit:v0.7.2-rootles
with--oci-worker-no-process-sandbox
(happens forv0.7.1
too)Client
buildctl
v0.7.2
(this happened forv0.7.1
too)What happens
When building multi-stage buildkit daemon fails and exits with:
(full logs below)
Details
Used
Dockerfile
Used
buildctl
commandLast
buildctl
logsFull daemon logs