Files
buildkit/solver/debug.go
Felix de Souza 536b9d2b84 solver: log dep cache-key starvation (edgeState vs result keys)
Diagnose the concurrency-triggered cross-build miss: build 2/13 never
queries because its shared base dependency is reused already-complete
(pinned in Solver.actives by a concurrent build) and hands over an
edgeState with zero cache keys, so probeCache/Query is never called and
noCacheMatchPossible latches the dep to complete-only.

Two probes, keyed by vertex digest:
- checkDepMatchPossible: WARN when noCacheMatchPossible flips, logging the
  dep's state/keys/keyMap and whether its result still carries a cache key
  (dep_result_keys>0 with dep_keymap==0 = the starvation).
- processDepReq: DEBUG on each cache-slow/complete dep delivery, logging
  edgeState keys vs result keys, so the fatal complete/0-key delivery in the
  concurrent run contrasts with the healthy cache-slow/keyed delivery in the
  serial run.

Keeps the earlier probeCache-skip WARN as a proven-negative.

Signed-off-by: Felix de Souza <fdesouza@palantir.com>
2026-07-13 15:28:01 -07:00

12 KiB