{"record":{"id":"f7ea34fe60d5e454","repo":"quickwit-oss/tantivy","slug":"managed-directory-rlock-poisoned-in-list-damaged","errorCode":null,"errorMessage":"Managed directory rlock poisoned in list damaged.","messagePattern":"Managed directory rlock poisoned in list damaged\\.","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/directory/managed_directory.rs","lineNumber":264,"sourceCode":"            .map_err(|io_error| OpenReadError::wrap_io_error(io_error, path.to_path_buf()))?;\n        let bytes = data\n            .read_bytes()\n            .map_err(|io_error| OpenReadError::IoError {\n                io_error: Arc::new(io_error),\n                filepath: path.to_path_buf(),\n            })?;\n        let mut hasher = Hasher::new();\n        hasher.update(bytes.as_slice());\n        let crc = hasher.finalize();\n        Ok(footer.crc() == crc)\n    }\n\n    /// List all managed files\n    pub fn list_managed_files(&self) -> HashSet<PathBuf> {\n        let managed_paths = self\n            .meta_informations\n            .read()\n            .expect(\"Managed directory rlock poisoned in list damaged.\")\n            .managed_paths\n            .clone();\n        managed_paths\n    }\n}\n\nimpl Directory for ManagedDirectory {\n    fn get_file_handle(&self, path: &Path) -> Result<Arc<dyn FileHandle>, OpenReadError> {\n        let file_slice = self.open_read(path)?;\n        Ok(Arc::new(file_slice))\n    }\n\n    fn open_read(&self, path: &Path) -> result::Result<FileSlice, OpenReadError> {\n        let file_slice = self.directory.open_read(path)?;\n        let (footer, reader) = Footer::extract_footer(file_slice)\n            .map_err(|io_error| OpenReadError::wrap_io_error(io_error, path.to_path_buf()))?;\n        footer.is_compatible()?;\n        Ok(reader)","sourceCodeStart":246,"sourceCodeEnd":282,"githubUrl":"https://github.com/quickwit-oss/tantivy/blob/b5d8deb80c26924e6b007a5b1a7630f35ca64de4/src/directory/managed_directory.rs#L246-L282","documentation":"Fires in list_managed_files when reading the meta_informations RwLock to clone the set of managed paths. The lock is poisoned because a thread panicked while holding it, so the returned path set cannot be trusted; the panic prevents handing out a possibly stale list (which would mislead damage-detection/GC logic). It is a generic poisoned-lock sentinel, not related to any particular file input.","triggerScenarios":"Thrown at src/directory/managed_directory.rs:264 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Diagnose the original panic that poisoned the lock before relying on list_managed_files","Reduce panic exposure inside the registry's lock scope by returning Results","Optionally recover with PoisonError::into_inner if a best-effort listing is acceptable"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b5d8deb80c26924e6b007a5b1a7630f35ca64de4","analyzedAt":"2026-09-05T13:20:51.521Z","contentChangedAt":"2026-09-05T13:20:51.521Z","schemaVersion":2},"datasetVersion":"2026-09-12T17:17:11.597Z"}