kopia/kopia · error
unable to set stat totals from summary
Error message
unable to set stat totals from summary
What it means
Wraps a failure of addExpectedWorkFromDirSummaryToVerifier, which seeds the verifier's expected work counters from a directory summary entry when preparing `snapshot verify`. This is an internal bookkeeping step over the loaded root entry and rarely fails unless the in-memory entry is malformed.
Solutions
- Read the wrapped inner error for the underlying cause.
- Update Kopia to the latest version — older snapshots' summaries may be incompatible with newer verifier expectations.
- If one snapshot triggers it, skip it (verify remaining sources) and re-snapshot it.
- Report as a bug with the wrapped error if it persists on current versions.
Defensive patterns
Strategy: try-catch
Try / catch
if err := addExpectedWorkFromDirSummaryToVerifier(ctx, v, root); err != nil {
log.Warnf("no dir summary for root %q; verifying without stat totals: %v", rootPath, err)
// continue with default work estimates
} Prevention
- Keep Kopia upgraded so snapshot/summary formats stay compatible
- Treat this as a signal of a malformed/partially-loaded entry — re-check the repository
- Skip and re-snapshots affected sources if one snapshot consistently triggers it
When it happens
Trigger: After successfully loading a snapshot root, computing stat totals from the root's DirSummary fails — typically a type assertion/mismatch on the entry's summary data or an unexpected entry state.
Common situations: Snapshots produced by older Kopia versions lacking directory summaries the verifier expects; corrupted or partially-loaded root entry; an internal invariant violation rather than user error.
Understand the failure class
Background: "This is a bug, please report it": internal invariant violations, unreachable panics, and SNH errors explained — this error's family across 47 libraries.
Related errors
- error marshaling computed snapshot diff stats
- unable to get snapshot root
- unable to parse
- unable to read blob map
- a snapshot time is needed to use a path as source
AI-assisted analysis of kopia/kopia@82495e54b5 (2026-09-07).
Data as JSON: /api/errors/5c0dd6626d128a46.
Report an issue: GitHub.
Appendix: source
Thrown at cli/command_snapshot_verify.go:140
for _, man := range manifests {
rootPath := fmt.Sprintf("%v@%v", man.Source, formatTimestamp(man.StartTime.ToTime()))
if man.RootEntry == nil {
continue
}
root, err := snapshotfs.SnapshotRoot(rep, man)
if err != nil {
return errors.Wrapf(err, "unable to get snapshot root: %q", rootPath)
}
treeWalkerEntries = append(treeWalkerEntries, twEntry{
root: root,
rootPath: rootPath,
})
if err := addExpectedWorkFromDirSummaryToVerifier(ctx, v, root); err != nil {
return errors.Wrapf(err, "unable to set stat totals from summary")
}
}
for _, twEntry := range treeWalkerEntries {
// ignore error now, return aggregate error at a higher level.
//nolint:errcheck
tw.Process(ctx, twEntry.root, twEntry.rootPath)
}
for _, oidStr := range c.verifyCommandDirObjectIDs {
oid, err := snapshotfs.ParseObjectIDWithPath(ctx, rep, oidStr)
if err != nil {
return errors.Wrapf(err, "unable to parse: %q", oidStr)
}
// ignore error now, return aggregate error at a higher level.
//nolint:errcheck
tw.Process(ctx, snapshotfs.DirectoryEntry(rep, oid, nil), oidStr)View on GitHub (pinned to 82495e54b5)