containerd/containerd · warning
walk all snapshots for %q failed: %w
Error message
walk all snapshots for %q failed: %w
What it means
The snapshot stats syncer walks every snapshotter (key = snapshotter name like overlayfs) and calls snapshotter.Walk to enumerate snapshots. This error wraps a Walk failure for the given snapshotter, aborting the sync for that snapshotter and meaning snapshot usage stats could not be collected.
Source
Thrown at internal/cri/server/images/snapshots.go:98
return previous + alpha*(sample-previous)
}
// sync updates all snapshots stats.
func (s *snapshotsSyncer) sync() error {
ctx := ctrdutil.NamespacedContext()
start := time.Now().UnixNano()
for key, snapshotter := range s.snapshotters {
var snapshots []snapshot.Info
// Do not call `Usage` directly in collect function, because
// `Usage` takes time, we don't want `Walk` to hold read lock
// of snapshot metadata store for too long time.
// TODO(random-liu): Set timeout for the following 2 contexts.
if err := snapshotter.Walk(ctx, func(ctx context.Context, info snapshot.Info) error {
snapshots = append(snapshots, info)
return nil
}); err != nil {
return fmt.Errorf("walk all snapshots for %q failed: %w", key, err)
}
for _, info := range snapshots {
snapshotKey := snapshotstore.Key{
Key: info.Name,
Snapshotter: key,
}
sn, err := s.store.Get(snapshotKey)
if err == nil {
// Only update timestamp for non-active snapshot.
if sn.Kind == info.Kind && sn.Kind != snapshot.KindActive {
sn.Timestamp = time.Now().UnixNano()
s.store.Add(sn)
continue
}
}
// Get newest stats if the snapshot is new or active.
sn = snapshotstore.Snapshot{
Key: snapshotstore.Key{View on GitHub (pinned to 4246446a2b)
Solutions
- Check the wrapped cause and containerd logs for snapshotter-specific failures
- Verify the snapshotter (e.g. overlayfs) is healthy: ctr plugins ls, check kernel/disk health
- Restart containerd to reset snapshotter metadata handles; verify the snapshotter config under [plugins."io.containerd.snapshotter.v1..."]
Defensive patterns
Strategy: retry
Validate before calling
// probe snapshotter health before sync
if _, err := snapshotter.Usage(ctx, key); err != nil {
return fmt.Errorf("snapshotter %s unhealthy: %w", key, err)
} Try / catch
err := sync(ctx, key)
if err != nil && strings.Contains(err.Error(), "walk all snapshots") {
log.WithError(err).Warn("snapshot walk failed; will retry next sync interval")
// skip this snapshotter this round; do not crash the syncer
} Prevention
- Monitor snapshotter plugin status (ctr plugins ls) regularly
- Keep contexts/limits generous during stats walks on large node
- Watch for overlayfs/disk kernel errors in node logs
When it happens
Trigger: snapshotter.Walk(ctx, fn) returns an error during periodic stats sync — snapshotter backend failure, metadata DB read error, or context cancellation while iterating overlayfs snapshot metadata.
Common situations: Overlayfs/kernel issues or disk errors; heavy IO causing snapshotter metadata read timeouts; snapshotter plugin misconfiguration in containerd config.
Related errors
- no metrics received
- NotFound
- InvalidArgument
- failed to delete parent link: %w
- failed to delete snapshot: %w
AI-assisted analysis of containerd/containerd@4246446a2b (2026-09-02).
Data as JSON: /api/errors/93d2f8642740f933.
Report an issue: GitHub.