{"record":{"id":"389a09f1916bc606","repo":"pola-rs/polars","slug":"failed-to-read-spill-file-e","errorCode":null,"errorMessage":"failed to read spill file {:?}: {e}","messagePattern":"failed to read spill file (.+?): (.+?)","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"crates/polars-ooc/src/spill_frame.rs","lineNumber":79,"sourceCode":"                        spill_file.creation_aborted();\n                        panic!(\"{msg}\")\n                    },\n                }\n            })\n            .await\n            .unwrap();\n        Arc::new(file)\n    }\n\n    async fn unspill(location: &Self::Spilled) -> Self {\n        let path = location.path().to_owned();\n        ASYNC\n            .spawn_blocking(move || {\n                let file = std::fs::File::open(&path).unwrap_or_else(|e| {\n                    panic!(\"failed to open spill file {:?}: {e}\", path.display())\n                });\n                IpcStreamReader::new(file).finish().unwrap_or_else(|e| {\n                    panic!(\"failed to read spill file {:?}: {e}\", path.display())\n                })\n            })\n            .await\n            .unwrap()\n    }\n}\n\n#[derive(Clone)]\npub struct SpillFrame {\n    token: SpillToken<DataFrame>,\n    height: usize,\n}\n\nimpl AsRef<SpillToken<DataFrame>> for SpillFrame {\n    fn as_ref(&self) -> &SpillToken<DataFrame> {\n        &self.token\n    }\n}","sourceCodeStart":61,"sourceCodeEnd":97,"githubUrl":"https://github.com/pola-rs/polars/blob/fe841f959ef4d2ceefc05a310d33ed7b1ab24e5e/crates/polars-ooc/src/spill_frame.rs#L61-L97","documentation":"Panics in SpilledFrame::unspill when IpcStreamReader::finish fails reading a spill file that opened successfully. The Arrow IPC stream inside the spill file is corrupt, truncated, or was written by an incompatible version.","triggerScenarios":"Reading back spilled data when the file was truncated (disk full during spill), partially written due to a crash, or the Arrow IPC format changed between Polars versions.","commonSituations":"Out-of-space errors during the spill phase silently truncating data; mixing Polars versions in a distributed setup; corruption on flaky storage; interrupting a query between spill and unspill.","solutions":["Verify free disk space during spill; a full disk during write causes truncated spill files","Rerun the query; the spilled data is unrecoverable","Use the same Polars version across all nodes of the cluster","Check storage health if corruption recurs"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"std::panic::catch_unwind(|| rerun_query()); // corrupt spill data is unrecoverable; rerun the whole query","preventionTips":["Reserve enough disk headroom (never let spill phase hit ENOSPC)","Pin the same polars version across all cluster nodes","Avoid killing queries mid-spill; use checkpoints"],"tags":["io","ipc","corruption","data-loss","panic"],"backgroundTag":"file-read-failed","analyzedSha":"fe841f959ef4d2ceefc05a310d33ed7b1ab24e5e","analyzedAt":"2026-09-18T22:14:11.667Z","contentChangedAt":"2026-09-18T22:14:11.667Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}