{"record":{"id":"a9dd69939efcc966","repo":"quickwit-oss/quickwit","slug":"fd-semaphore-acquire-failed-please-report","errorCode":null,"errorMessage":"fd_semaphore acquire failed. please report","messagePattern":"fd_semaphore acquire failed\\. please report","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"quickwit/quickwit-storage/src/file_descriptor_cache.rs","lineNumber":137,"sourceCode":"            .inc_by(split_ids.len() as u64);\n    }\n\n    pub async fn get_or_open_split_file(\n        &self,\n        root_path: &Path,\n        split_id: SplitId,\n        num_bytes: u64,\n    ) -> std::io::Result<SplitFile> {\n        if let Some(split_file) = self.get_split_file(&split_id) {\n            self.fd_cache_metrics.hits_num_items.inc();\n            return Ok(split_file);\n        } else {\n            self.fd_cache_metrics.misses_num_items.inc();\n        }\n        let split_path = get_split_file_path(root_path, &split_id);\n        let fd_semaphore_guard = Semaphore::acquire_owned(self.fd_semaphore.clone())\n            .await\n            .expect(\"fd_semaphore acquire failed. please report\");\n        let file: File = tokio::task::spawn_blocking(move || std::fs::File::open(split_path))\n            .await\n            .map_err(|join_error| {\n                io::Error::other(format!(\"failed to open file: {join_error:?}\"))\n            })??;\n        let split_file = SplitFile(Arc::new(SplitFileInner {\n            num_bytes,\n            file,\n            _fd_semaphore_guard: fd_semaphore_guard,\n        }));\n        self.put_split_file(split_id, split_file.clone());\n        Ok(split_file)\n    }\n}\n\nimpl SplitFile {\n    pub async fn get_range(&self, range: Range<usize>) -> io::Result<OwnedBytes> {\n        use std::os::unix::fs::FileExt;","sourceCodeStart":119,"sourceCodeEnd":155,"githubUrl":"https://github.com/quickwit-oss/quickwit/blob/a39730c5cdcd1a4fe798403737ae293999ea21f8/quickwit/quickwit-storage/src/file_descriptor_cache.rs#L119-L155","documentation":"`FileDescriptorCache::get_or_open_split_file` tried to acquire the file-descriptor semaphore guarding concurrent split file opens, and the acquire failed. Since the semaphore has no closure path in normal operation, this only happens if it was closed by shutdown — the `.expect` marks it as an internal invariant breach ('please report') rather than a user error.","triggerScenarios":"Thrown at quickwit/quickwit-storage/src/file_descriptor_cache.rs:137 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check whether the searcher node was shutting down while splits were still being opened","Inspect logs for the component closing the fd semaphore early","Report the issue to Quickwit maintainers with logs, as the message requests"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a39730c5cdcd1a4fe798403737ae293999ea21f8","analyzedAt":"2026-09-08T13:19:37.784Z","contentChangedAt":"2026-09-08T13:19:37.784Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}