abiosoft/colima · warning
error inspecting containers: %w
Error message
error inspecting containers: %w
What it means
fetchVolumes then runs `<runtime> inspect <id...>` for every id obtained from `ps -q`; failure wraps as 'error inspecting containers'. The classic cause is a race: a container that was running at ps time exits and is removed before inspect runs, making inspect return an error for a now-missing id.
Source
Thrown at daemon/process/inotify/volumes.go:116
}
}
log.Tracef("found containers %+v", containers)
// fetch volumes
var resp []struct {
Mounts []struct {
Source string `json:"Source"`
} `json:"Mounts"`
}
{
args := append([]string{}, cmdArgs...)
args = append(args, "inspect")
args = append(args, containers...)
var buf bytes.Buffer
if err := f.guest.RunWith(nil, &buf, args...); err != nil {
return nil, fmt.Errorf("error inspecting containers: %w", err)
}
if err := json.NewDecoder(&buf).Decode(&resp); err != nil {
return nil, fmt.Errorf("error decoding docker response")
}
}
// process and discard redundant volumes
vols := []string{}
{
shouldMount := func(child string) bool {
// ignore all invalid directories.
// i.e. directories not within the mounted VM directories
for _, parent := range f.vmVols {
if strings.HasPrefix(child, parent) {
return true
}
}
return falseView on GitHub (pinned to c3a5f9184d)
Solutions
- wait for the next poll — churn races heal once the workload settles
- reproduce manually to see the runtime's complaint: `colima ssh -- docker ps -q | head | xargs docker inspect`
- restart colima if the error floods logs continuously and watching never engages
Defensive patterns
Strategy: retry
Try / catch
if err := guest.RunWith(nil, &buf, args...); err != nil {
// most often a ps/inspect race with exiting containers — drop this cycle,
// the 5s poll rebuilds the container list from scratch next time
return nil, fmt.Errorf("error inspecting containers: %w", err)
} Prevention
- expect races under high container churn; the poll self-heals
- reduce unnecessary container churn while inotify watching is active
- batch-inspect manually in the guest to confirm when it is churn vs a stuck runtime
When it happens
Trigger: short-lived containers exiting between the ps and inspect calls; very large container counts producing oversized argument lists; runtime-level inspect errors in the guest.
Common situations: CI-style churn workloads with many ephemeral containers; batch jobs spawning and removing containers while inotify watching is enabled.
Related errors
- error fetching docker volumes: %w
- error listing containers: %w
- error inspecting model %q: %w
- error parsing model info: %w
- failed to inspect model %q after pull: %w
AI-assisted analysis of abiosoft/colima@c3a5f9184d (2026-08-15).
Data as JSON: /api/errors/bfd4489d3a386d43.
Report an issue: GitHub.