{"record":{"id":"a7c877ee2069b281","repo":"ipfs/kubo","slug":"provider-error-flushing-mfs-cannot-provide-mfs","errorCode":null,"errorMessage":"provider: error flushing MFS, cannot provide MFS: %w","messagePattern":"provider: error flushing MFS, cannot provide MFS: %w","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/node/provider.go","lineNumber":1205,"sourceCode":"\n\t\topts = append(opts, LegacyProviderOpt(reprovideInterval, providerStrategy, acceleratedDHTClient, provideWorkerCount))\n\t}\n\n\treturn fx.Options(opts...)\n}\n\n// OfflineProviders groups units managing provide routing records offline\nfunc OfflineProviders() fx.Option {\n\treturn fx.Provide(func() DHTProvider {\n\t\treturn &NoopProvider{}\n\t})\n}\n\nfunc mfsProvider(mfsRoot *mfs.Root, fetcher fetcher.Factory) provider.KeyChanFunc {\n\treturn func(ctx context.Context) (<-chan cid.Cid, error) {\n\t\terr := mfsRoot.FlushMemFree(ctx)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"provider: error flushing MFS, cannot provide MFS: %w\", err)\n\t\t}\n\t\trootNode, err := mfsRoot.GetDirectory().GetNode()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"provider: error loading MFS root, cannot provide MFS: %w\", err)\n\t\t}\n\n\t\tkcf := provider.NewDAGProvider(rootNode.Cid(), fetcher)\n\t\treturn kcf(ctx)\n\t}\n}\n\ntype provStrategyIn struct {\n\tfx.In\n\tPinner               pin.Pinner\n\tBlockstore           blockstore.Blockstore\n\tOfflineIPLDFetcher   fetcher.Factory `name:\"offlineIpldFetcher\"`\n\tOfflineUnixFSFetcher fetcher.Factory `name:\"offlineUnixfsFetcher\"`\n\tMFSRoot              *mfs.Root","sourceCodeStart":1187,"sourceCodeEnd":1223,"githubUrl":"https://github.com/ipfs/kubo/blob/329838acdfafae224582930457efe80aa217afc0/core/node/provider.go#L1187-L1223","documentation":"The MFS provider key source failed before enumerating content: flushing the in-memory MFS tree to disk (FlushMemFree) errored, so the root's complete CID list cannot be produced and providing MFS content is skipped with this error.","triggerScenarios":"Thrown at core/node/provider.go:1205 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Retry the reprovide; transient datastore errors during flush are common","Check datastore health and disk space","If MFS is corrupt, inspect 'ipfs files stat /' and repair or rebuild the files tree"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}