{"record":{"id":"36bedafc36e442da","repo":"juicedata/juicefs","slug":"recovered-from-s","errorCode":null,"errorMessage":"recovered from %s","messagePattern":"recovered from (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/chunk/cached_store.go","lineNumber":754,"sourceCode":"\tif errors.Is(err, context.Canceled) || errors.Is(err, utils.ErrFuncTimeout) {\n\t\treturn 0, err\n\t}\n\tstore.objectDataBytes.WithLabelValues(\"GET\", res.sc).Add(float64(res.n))\n\tstore.objectReqsHistogram.WithLabelValues(\"GET\", res.sc).Observe(used.Seconds())\n\tif err == nil {\n\t\tstore.fetcher.fetch(key)\n\t\treturn res.n, nil\n\t}\n\tstore.objectReqErrors.Add(1)\n\t// fall back to full read\n\treturn 0, errTryFullRead\n}\n\nfunc (store *cachedStore) load(ctx context.Context, key string, page *Page, cache bool, forceCache bool) (err error) {\n\tdefer func() {\n\t\te := recover()\n\t\tif e != nil {\n\t\t\terr = fmt.Errorf(\"recovered from %s\", e)\n\t\t}\n\t}()\n\tstore.currentDownload <- struct{}{}\n\tdefer func() { <-store.currentDownload }()\n\tneeded := store.compressor.CompressBound(len(page.Data))\n\tcompressed := needed > len(page.Data)\n\t// we don't know the actual size for compressed block\n\tif store.downLimit != nil && !compressed {\n\t\tstore.downLimit.Wait(int64(len(page.Data)))\n\t}\n\tvar (\n\t\tp     *Page\n\t\tstart = time.Now()\n\t)\n\tif compressed {\n\t\tc := NewOffPage(needed)\n\t\tdefer c.Release()\n\t\tp = c","sourceCodeStart":736,"sourceCodeEnd":772,"githubUrl":"https://github.com/juicedata/juicefs/blob/c9a67b23e8e08ec23ec331aa6f1675e2319e921c/pkg/chunk/cached_store.go#L736-L772","documentation":"cachedStore.load wraps its body in a recover() and converts any panic (e.g. a runtime panic in decompression, page handling, or a storage client) into a regular error \"recovered from <panic value>\". This keeps a panicking download path from crashing the process; callers like writeFiles/readFiles (and the bench command at cmd/bench.go) see it as an ordinary error return.","triggerScenarios":"Any panic inside cachedStore.load during a block download — typically triggered via readFiles/writeFiles paths (including `juicefs bench` reading/writing temp files through the store): nil deref or slice bound issues in page handling, a compressor bug, or a panicking object-storage client.","commonSituations":"See trigger scenarios.","solutions":["Look at the wrapped panic value after 'recovered from' — it identifies the actual panicking component.","Delete the affected object from the object store / clear the local cache and re-read to rule out corrupted data.","Check compressor settings in the volume format (e.g. zstd) — try without compression to isolate decompressor panics.","Capture a goroutine dump and report the stack to juicefs if the panic is reproducible (library bug, not caller error).","Pin/upgrade to a fixed juicefs version if the panic matches a known issue."],"exampleFix":"// before: corrupted cached object causes panic in load\n//   err = store.load(ctx, key, page, true, false)\n// after: clear cache and retry read once\nif err != nil && strings.HasPrefix(err.Error(), \"recovered from\") {\n    store.bcache.remove(key)\n    err = store.load(ctx, key, page, true, false)\n}","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"if err != nil {\n    if strings.HasPrefix(err.Error(), \"recovered from\") {\n        logger.Errorf(\"internal panic during load: %v\", err)\n        // invalidate cache/object and retry once, else fail over\n    }\n    return err\n}","preventionTips":["Keep the client version consistent with the volume format (compressor/codec) to avoid panics on unexpected data.","Clear local cache and re-read when encountering a panic-derived error; corrupted cached objects are a common trigger.","Report reproducible panics upstream with a goroutine dump — this error indicates a library bug, not caller misuse.","Run `juicefs bench`/read workloads on a staging mount before production to surface panic paths early."],"tags":["panic-recovery","internal-bug","load","corruption"],"backgroundTag":"internal-invariant-violation","analyzedSha":"c9a67b23e8e08ec23ec331aa6f1675e2319e921c","analyzedAt":"2026-09-06T17:55:48.476Z","contentChangedAt":"2026-09-06T17:55:48.476Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}