{"record":{"id":"9e96e686a1f09d07","repo":"thanos-io/thanos","slug":"get-symbols-from-object-storage-of-s","errorCode":null,"errorMessage":"get symbols from object storage of %s","messagePattern":"get symbols from object storage of (.+?)","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/block/indexheader/binary_reader.go","lineNumber":255,"sourceCode":"\t\trunutil.CloseWithErrCapture(&err, rc, \"close toc reader\")\n\t\treturn nil, errors.Wrapf(err, \"get TOC from object storage of %s\", r.path)\n\t}\n\n\tif err := rc.Close(); err != nil {\n\t\treturn nil, errors.Wrap(err, \"close toc reader\")\n\t}\n\n\ttoc, err := index.NewTOCFromByteSlice(realByteSlice(tocBytes))\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"new TOC\")\n\t}\n\treturn toc, nil\n}\n\nfunc (r *chunkedIndexReader) CopySymbols(w io.Writer, buf []byte) (err error) {\n\trc, err := r.bkt.GetRange(r.ctx, r.path, int64(r.toc.Symbols), int64(r.toc.Series-r.toc.Symbols))\n\tif err != nil {\n\t\treturn errors.Wrapf(err, \"get symbols from object storage of %s\", r.path)\n\t}\n\tdefer runutil.CloseWithErrCapture(&err, rc, \"close symbol reader\")\n\n\tif _, err := io.CopyBuffer(w, rc, buf); err != nil {\n\t\treturn errors.Wrap(err, \"copy symbols\")\n\t}\n\n\treturn nil\n}\n\nfunc (r *chunkedIndexReader) CopyPostingsOffsets(w io.Writer, buf []byte) (err error) {\n\trc, err := r.bkt.GetRange(r.ctx, r.path, int64(r.toc.PostingsTable), int64(r.size-r.toc.PostingsTable))\n\tif err != nil {\n\t\treturn errors.Wrapf(err, \"get posting offset table from object storage of %s\", r.path)\n\t}\n\tdefer runutil.CloseWithErrCapture(&err, rc, \"close posting offsets reader\")\n\n\tif _, err := io.CopyBuffer(w, rc, buf); err != nil {","sourceCodeStart":237,"sourceCodeEnd":273,"githubUrl":"https://github.com/thanos-io/thanos/blob/35b8b991177def87ed52dcf10f9b6d87f07282c8/pkg/block/indexheader/binary_reader.go#L237-L273","documentation":"CopySymbols streams the symbol table section of the index (bytes [toc.Symbols, toc.Series)) from the object-storage index file to a writer via a ranged GET. A failing GetRange is wrapped with this message. It is raised while an index-header is being built and symbols copied from the raw index.","triggerScenarios":"CopySymbols when bkt.GetRange(ctx, path, toc.Symbols, toc.Series-toc.Symbols) errors: missing object, denied access, throttling, or an invalid range because the TOC offsets do not fit the actual object (corrupt TOC, wrong object size).","commonSituations":"S3 416/InvalidRange when TOC offsets exceed the real object (truncated index); throttling under heavy store-gateway load; missing IAM GetObject permissions; block deleted concurrently by retention while being read.","solutions":["Check the wrapped error: InvalidRange/416 indicates corrupt/truncated index — re-upload or restore the block.","Verify IAM credentials allow ranged GetObject on the bucket prefix.","Retry transient/throttling errors with backoff or via a retrying bucket client.","Ensure retention/lifecycle rules are not deleting the block while index-headers are being built."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"if toc.Series < toc.Symbols || toc.Series > uint64(attrs.Size) {\n    return fmt.Errorf(\"TOC offsets inconsistent with object size; corrupt index %s\", path)\n}","typeGuard":null,"tryCatchPattern":"if strings.Contains(err.Error(), \"InvalidRange\") {\n    // truncated index: restore block from replica\n} else { retry.WithBackoff(copySymbols) }","preventionTips":["Validate TOC offsets against object size before range copies.","Enable objstore retries for throttling and transient errors.","Ensure retention policies don't delete blocks while headers are being built.","Verify IAM range-read permissions on the block prefix."],"tags":["object-storage","range-request","thanos","symbols"],"backgroundTag":"http-request-failed","analyzedSha":"35b8b991177def87ed52dcf10f9b6d87f07282c8","analyzedAt":"2026-09-07T01:49:59.689Z","contentChangedAt":"2026-09-07T01:49:59.689Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}