{"record":{"id":"445bd1cf0f43760d","repo":"ipfs/kubo","slug":"bloom-tracker-w","errorCode":null,"errorMessage":"bloom tracker: %w","messagePattern":"bloom tracker: %w","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/node/provider.go","lineNumber":1342,"sourceCode":"\t\t\tcount := readLastUniqueCount(ds)\n\t\t\t// size the bloom from the previous cycle's count (with growth\n\t\t\t// margin for repo changes between cycles), falling back to\n\t\t\t// DefaultBloomInitialCapacity on the very first cycle. The\n\t\t\t// bloom chain auto-grows if the repo exceeds this estimate.\n\t\t\texpectedItems := max(\n\t\t\t\tuint64(walker.DefaultBloomInitialCapacity),\n\t\t\t\tuint64(float64(count)*walker.BloomGrowthMargin),\n\t\t\t)\n\t\t\t// the tracker is shared across all sub-walks (MFS, recursive\n\t\t\t// pins, direct pins) within a single reprovide cycle. it\n\t\t\t// detects duplicate sub-DAG branches across recursive pins\n\t\t\t// that share content (e.g. append-only datasets where each\n\t\t\t// version differs by a small delta). when a CID is already\n\t\t\t// in the bloom, its entire subtree is skipped, reducing\n\t\t\t// traversal from O(pins * total_blocks) to O(unique_blocks).\n\t\t\ttracker, err := walker.NewBloomTracker(uint(expectedItems), fpRate)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"bloom tracker: %w\", err)\n\t\t\t}\n\n\t\t\tuseEntities := strategyFlag&config.ProvideStrategyEntities != 0\n\n\t\t\t// select provider functions based on +entities modifier:\n\t\t\t// +entities uses WalkEntityRoots (skips file chunks),\n\t\t\t// +unique without +entities uses WalkDAG (all blocks).\n\t\t\tmakePinProv := dspinner.NewUniquePinnedProvider\n\t\t\tmakeMFSProv := uniqueMFSProvider\n\t\t\tif useEntities {\n\t\t\t\tmakePinProv = dspinner.NewPinnedEntityRootsProvider\n\t\t\t\tmakeMFSProv = mfsEntityRootsProvider\n\t\t\t}\n\n\t\t\tvar inner provider.KeyChanFunc\n\t\t\tswitch {\n\t\t\tcase basePinned && baseMFS:\n\t\t\t\t// MFS first: walk MFS (locality-filtered), then pinned.","sourceCodeStart":1324,"sourceCodeEnd":1360,"githubUrl":"https://github.com/ipfs/kubo/blob/329838acdfafae224582930457efe80aa217afc0/core/node/provider.go#L1324-L1360","documentation":"Returned when walker.NewBloomTracker fails to allocate the bloom-filter VisitedTracker used by '+unique' (and '+entities') reprovide cycles. The bloom filter is sized from the previous cycle's unique CID count with a growth margin; a failure here means the bloom/tracker could not be constructed (typically an allocation or sizing failure). Without it, the deduplicated walk cannot start.","triggerScenarios":"Reprovide cycle with Provide.Strategy containing '+unique' where NewBloomTracker(expectedItems, fpRate) errors — usually because the persisted previous count read from the datastore is enormous/corrupt (8-byte big-endian value) leading to an impractically large bloom allocation, or an invalid FP-rate config.","commonSituations":"Corrupted value under the last-unique-count datastore key producing a huge expectedItems, memory-constrained hosts, or a misconfigured Provide.BloomFPRate.","solutions":["Check the wrapped error in logs and node memory availability","Inspect/reset the datastore key holding the persisted unique count (readLastUniqueCount source) to clear a corrupt huge count","Validate Provide.BloomFPRate / strategy values in the kubo config are sane","Retry on the next reprovide cycle; transient OOM may succeed with more free memory"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// sanity-check persisted count before cycle\ncount := readLastUniqueCount(ds)\nif count > maxReasonableCIDs {\n    // reset or log suspicion of corruption\n}","typeGuard":null,"tryCatchPattern":"tracker, err := walker.NewBloomTracker(uint(expectedItems), fpRate)\nif err != nil {\n    return nil, fmt.Errorf(\"bloom tracker: %w\", err)\n}","preventionTips":["Keep adequate free memory on reprovide hosts","Validate Provide.BloomFPRate and strategy values in config","Watch for anomalously large persisted unique counts in the datastore"],"tags":["provider","bloom-filter","unique","reprovide","memory"],"backgroundTag":"bloom-filter-init-failed","analyzedSha":"329838acdfafae224582930457efe80aa217afc0","analyzedAt":"2026-09-03T18:30:52.135Z","contentChangedAt":"2026-09-03T18:30:52.135Z","schemaVersion":2},"datasetVersion":"2026-09-11T00:17:11.886Z"}