{"record":{"id":"ba2022f0fae4ac1a","repo":"kopia/kopia","slug":"error-getting-blob-v","errorCode":null,"errorMessage":"error getting blob %v","messagePattern":"error getting blob (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"repo/content/committed_read_manager.go","lineNumber":177,"sourceCode":"\t\t\t\"recovered index bytes from blob using full blob read\",\n\t\t\tlogparam.Int(\"length\", output.Length()),\n\t\t\tblobparam.BlobID(\"packFile\", packFile))\n\n\t\treturn nil\n\t}\n\n\treturn err\n}\n\nfunc (sm *SharedManager) attemptReadPackFileLocalIndex(ctx context.Context, packFile blob.ID, offset, length int64, output *gather.WriteBuffer) error {\n\tvar payload gather.WriteBuffer\n\tdefer payload.Close()\n\n\toutput.Reset()\n\n\terr := sm.st.GetBlob(ctx, packFile, offset, length, &payload)\n\tif err != nil {\n\t\treturn errors.Wrapf(err, \"error getting blob %v\", packFile)\n\t}\n\n\tpostamble := findPostamble(payload.Bytes().ToByteSlice())\n\tif postamble == nil {\n\t\treturn errors.Errorf(\"unable to find valid postamble in file %v\", packFile)\n\t}\n\n\tif uint32(offset) > postamble.localIndexOffset { //nolint:gosec\n\t\treturn errors.Errorf(\"not enough data read during optimized attempt %v\", packFile)\n\t}\n\n\tpostamble.localIndexOffset -= uint32(offset) //nolint:gosec\n\n\t//nolint:gosec\n\tif uint64(postamble.localIndexOffset+postamble.localIndexLength) > uint64(payload.Length()) {\n\t\t// invalid offset/length\n\t\treturn errors.Errorf(\"unable to find valid local index in file %v - invalid offset/length\", packFile)\n\t}","sourceCodeStart":159,"sourceCodeEnd":195,"githubUrl":"https://github.com/kopia/kopia/blob/82495e54b584c1ef6073c9e1be048f57f8aef078/repo/content/committed_read_manager.go#L159-L195","documentation":"Wrapper in attemptReadPackFileLocalIndex: GetBlob failed on the ranged read of the pack-file region containing the local index, meaning the pack blob could not be fetched (missing, corrupt, or storage error); the pack file ID is interpolated.","triggerScenarios":"Thrown at repo/content/committed_read_manager.go:177 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check storage connectivity.","If persistent, the pack file may be corrupt; full-blob recovery or repository repair may be needed."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}