random error failed to get dead record
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 30/100
Research direction
Start in cache/manager.go at cacheManager.getRecord, especially line 403, then trace the reported path through worker/base/worker.go LoadRef and the cache result loader. Use the supplied stack trace and load-testing context to investigate the suspected race. Done means the cause is identified and the random “failed to get dead record” error no longer occurs under the reported load.
Written by the indexing model from the issue text.
Description
It seems like this error has been happening for a while: https://github.com/moby/buildkit/issues/1468#issuecomment-625292498
I am seeing it on master now randomly via some load testing, very hard to reproduce, seems related to a race condition somewhere.
The error is coming from this line: https://github.com/moby/buildkit/blob/a45297b3411c90ed63b800491635297fdda09080/cache/manager.go#L403
Full stack here:
failed to load ref: failed to get dead record s3i2hx4q7gxakxxu7xres4wyt: not found
49583 v0.0.0+unknown buildkitd
github.com/moby/buildkit/cache.init
/src/cache/manager.go:35
runtime.doInit
/usr/local/src/runtime/proc.go:6507
runtime.doInit
/usr/local/src/runtime/proc.go:6484
runtime.doInit
/usr/local/src/runtime/proc.go:6484
runtime.doInit
/usr/local/src/runtime/proc.go:6484
runtime.doInit
/usr/local/src/runtime/proc.go:6484
runtime.main
/usr/local/src/runtime/proc.go:233
runtime.goexit
/usr/local/src/runtime/asm_amd64.s:1598
49583 v0.0.0+unknown buildkitd
github.com/moby/buildkit/cache.(*cacheManager).getRecord
/src/cache/manager.go:403
github.com/moby/buildkit/cache.(*cacheManager).get
/src/cache/manager.go:350
github.com/moby/buildkit/cache.(*cacheManager).Get
/src/cache/manager.go:345
github.com/moby/buildkit/worker/base.(*Worker).LoadRef
/src/worker/base/worker.go:274
github.com/moby/buildkit/worker.(*cacheResultStorage).LoadRemotes
/src/worker/cacheresult.go:75
github.com/moby/buildkit/solver.(*exporter).ExportTo
/src/solver/exporter.go:119
github.com/moby/buildkit/solver.(*mergedExporter).ExportTo
/src/solver/exporter.go:243
github.com/moby/buildkit/solver/llbsolver.NewProvenanceCreator.func1
/src/solver/llbsolver/provenance.go:450
github.com/moby/buildkit/solver/llbsolver.(*ProvenanceCreator).Predicate
/src/solver/llbsolver/provenance.go:495
github.com/moby/buildkit/solver/llbsolver.(*Solver).recordBuildHistory.func1.1
/src/solver/llbsolver/solver.go:205
github.com/moby/buildkit/solver/llbsolver.(*Solver).recordBuildHistory.func1.2
/src/solver/llbsolver/solver.go:243
golang.org/x/sync/errgroup.(*Group).Go.func1
/src/vendor/golang.org/x/sync/errgroup/errgroup.go:75
runtime.goexit
/usr/local/src/runtime/asm_amd64.s:1598
49583 v0.0.0+unknown buildkitd
github.com/moby/buildkit/worker/base.(*Worker).LoadRef
/src/worker/base/worker.go:295
github.com/moby/buildkit/worker.(*cacheResultStorage).LoadRemotes
/src/worker/cacheresult.go:75
github.com/moby/buildkit/solver.(*exporter).ExportTo
/src/solver/exporter.go:119
github.com/moby/buildkit/solver.(*mergedExporter).ExportTo
/src/solver/exporter.go:243
github.com/moby/buildkit/solver/llbsolver.NewProvenanceCreator.func1
/src/solver/llbsolver/provenance.go:450
github.com/moby/buildkit/solver/llbsolver.(*ProvenanceCreator).Predicate
/src/solver/llbsolver/provenance.go:495
github.com/moby/buildkit/solver/llbsolver.(*Solver).recordBuildHistory.func1.1
/src/solver/llbsolver/solver.go:205
github.com/moby/buildkit/solver/llbsolver.(*Solver).recordBuildHistory.func1.2
/src/solver/llbsolver/solver.go:243
golang.org/x/sync/errgroup.(*Group).Go.func1
/src/vendor/golang.org/x/sync/errgroup/errgroup.go:75
runtime.goexit
/usr/local/src/runtime/asm_amd64.s:1598
49583 v0.0.0+unknown buildkitd
main.unaryInterceptor.func1
/src/cmd/buildkitd/main.go:607
github.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1.1.1
/src/vendor/github.com/grpc-ecosystem/go-grpc-middleware/chain.go:25
github.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1
/src/vendor/github.com/grpc-ecosystem/go-grpc-middleware/chain.go:34
github.com/moby/buildkit/api/services/control._Control_Solve_Handler
/src/api/services/control/control.pb.go:2440
google.golang.org/grpc.(*Server).processUnaryRPC
/src/vendor/google.golang.org/grpc/server.go:1336
google.golang.org/grpc.(*Server).handleStream
/src/vendor/google.golang.org/grpc/server.go:1704
google.golang.org/grpc.(*Server).serveStreams.func1.2
/src/vendor/google.golang.org/grpc/server.go:965
runtime.goexit
/usr/local/src/runtime/asm_amd64.s:1598
- Dominant language
- Go
- Stars
- 10.3k
- Forks
- 1.5k
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 48
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from moby/buildkit
-
status/triage
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
area/dockerfile
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Similar issues
-
optimization optimization:agents-md-curator
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
githubnext/gh-aw-cao#13143 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
blinklabs-io/bursa#904 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
yanet-platform/ipfw-go#129 ·
-
bug confmap/provider/googlesecretmanagerprovider needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
open-telemetry/opentelemetry-collector-contrib#51273 · 2 comments ·
-
bug: AI Gateway client filter lists "Unknown" twice when NULL and literal Unknown clients coexist Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 90/100