quickwit-oss/quickwit · error
byte range cache mutex is poisoned
Error message
byte range cache mutex is poisoned
What it means
`ByteRangeCache::get_file_cache` locked the map of per-file caches and the mutex was poisoned — some thread panicked earlier while holding it, and the `.expect` on the lock result now panics too. The root-cause panic is a separate earlier failure in code that mutates the file cache map.
Solutions
- Find the original panic that poisoned the mutex in earlier logs
- Restart the process to rebuild the byte range cache
- Report the underlying panic if it stems from Quickwit code
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at quickwit/quickwit-storage/src/cache/byte_range_cache.rs:275 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of quickwit-oss/quickwit@a39730c5cd (2026-09-08).
Data as JSON: /api/errors/e8168a74237b898e.
Report an issue: GitHub.
Appendix: source
Thrown at quickwit/quickwit-storage/src/cache/byte_range_cache.rs:275
impl ByteRangeCache {
/// Creates a slice cache that never removes any entry.
pub fn with_infinite_capacity() -> Self {
let inner = Inner {
total_num_stored_bytes: Arc::new(AtomicU64::default()),
file_caches: Mutex::new(FxHashMap::default()),
};
ByteRangeCache {
inner_arc: Arc::new(inner),
}
}
/// Returns the shared byte-range cache for `path`.
pub fn get_file_cache(&self, path: &Path) -> FileByteRangeCache {
let mut file_caches = self
.inner_arc
.file_caches
.lock()
.expect("byte range cache mutex is poisoned");
if let Some(file_cache) = file_caches.get(path) {
return file_cache.clone();
}
let file_cache = FileByteRangeCache::with_total_num_stored_bytes(
self.inner_arc.total_num_stored_bytes.clone(),
);
file_caches.insert(path.to_path_buf(), file_cache.clone());
file_cache
}
/// Overall amount of bytes stored in the cache.
pub fn get_num_bytes(&self) -> u64 {
self.inner_arc
.total_num_stored_bytes
.load(Ordering::Relaxed)
}
}
View on GitHub (pinned to a39730c5cd)