{"record":{"id":"60120ff87fc7e97c","repo":"kopia/kopia","slug":"error-reading-object-v","errorCode":null,"errorMessage":"error reading object %v","messagePattern":"error reading object (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"snapshot/snapshotfs/snapshot_verifier.go","lineNumber":177,"sourceCode":"\t}\n\n\tif v.blobMap != nil {\n\t\tfor _, cid := range contentIDs {\n\t\t\tci, err := v.rep.ContentInfo(ctx, cid)\n\t\t\tif err != nil {\n\t\t\t\treturn errors.Wrapf(err, \"error verifying content %v\", cid)\n\t\t\t}\n\n\t\t\tif _, ok := v.blobMap[ci.PackBlobID]; !ok {\n\t\t\t\treturn errors.Errorf(\"object %v is backed by missing blob %v\", oid, ci.PackBlobID)\n\t\t\t}\n\t\t}\n\t}\n\n\t//nolint:gosec\n\tif 100*rand.Float64() < v.opts.VerifyFilesPercent {\n\t\tif err := v.readEntireObject(ctx, oid, entryPath); err != nil {\n\t\t\treturn errors.Wrapf(err, \"error reading object %v\", oid)\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc (v *Verifier) updateProcessedStats(size int64) {\n\tv.statsMu.Lock()\n\tdefer v.statsMu.Unlock()\n\n\tv.processed++\n\tv.processedBytes += size\n}\n\n// verifyObject enqueues a single object for verification.\nfunc (v *Verifier) verifyObject(ctx context.Context, e fs.Entry, oid object.ID, entryPath string) error {\n\tif v.throttle.ShouldOutput(time.Second) {\n\t\tv.ShowStats(ctx)","sourceCodeStart":159,"sourceCodeEnd":195,"githubUrl":"https://github.com/kopia/kopia/blob/82495e54b584c1ef6073c9e1be048f57f8aef078/snapshot/snapshotfs/snapshot_verifier.go#L159-L195","documentation":"This error is returned by Verifier.VerifyFile when the periodic full-read verification path fails: after the entry hash matched, the verifier samples objects (based on VerifyFilesPercent) and reads the entire object from the repository to confirm its contents. It wraps a lower-level failure from readEntireObject (open or read error) with the object ID for context.","triggerScenarios":"The file entry passed hash verification but v.rep.OpenObject(ctx, oid) failed inside readEntireObject, or iocopy.Copy from the opened object failed (blob missing, corrupt, or unreadable from storage). Occurs during snapshot verification (snapshot verify or EstimateBackup verification) when VerifyFilesPercent sampling selects the object.","commonSituations":"Corrupted or deleted blobs in the underlying storage (S3/B2/filesystem backend); credentials or network errors reaching object storage mid-verify; repository integrity damaged after a failed maintenance/GC; manually copied or truncated repository data.","solutions":["Run 'kopia blob list' / check storage backend to confirm the object blob still exists and is intact.","Re-run verification to rule out transient storage/network errors; retry with a larger MaxErrors budget.","If the blob is confirmed corrupt, restore the snapshot from another copy and rebuild the affected snapshot.","Check storage credentials and connectivity; run 'kopia repository status' to confirm repository health.","Update Kopia — older versions had verification bugs against certain storage providers."],"exampleFix":"// before: failing verification sampling config\nkopia snapshot verify --verify-files-percent=100\n// after: start with lower sampling and fix repository first\nkopia snapshot verify --verify-files-percent=10 --max-errors=50","handlingStrategy":"retry","validationCode":"// before verifying, confirm the object resolves\nif _, err := rep.VerifyObject(ctx, oid); err != nil {\n    return fmt.Errorf(\"object %v not verifiable, skipping full read: %w\", oid, err)\n}","typeGuard":"func objectReadable(ctx context.Context, rep repo.Repository, oid object.ID) bool {\n    r, err := rep.OpenObject(ctx, oid)\n    if err != nil { return false }\n    r.Close()\n    return true\n}","tryCatchPattern":"if err := v.VerifyFile(ctx, oid, entryPath); err != nil {\n    var verifyErr *kopia.Error\n    if errors.As(err, &verifyErr) {\n        log.Warnf(\"verification failed for %s: %v — check storage backend health\", oid, err)\n        return err // surface; do not silently continue\n    }\n    return err\n}","preventionTips":["Run periodic 'kopia content verify' to catch corruption before full-file verification.","Keep a replica/backup of repository blobs.","Use --max-errors to control verification abort behavior.","Monitor storage backend health and credentials in automation.","Lower VerifyFilesPercent on flaky networks to reduce sampling failures."],"tags":["repository","verification","object-storage"],"backgroundTag":"file-read-failed","analyzedSha":"82495e54b584c1ef6073c9e1be048f57f8aef078","analyzedAt":"2026-09-07T20:35:21.689Z","contentChangedAt":"2026-09-07T20:35:21.689Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}