Baike.dev
All toolsAI codingTrendingOpen sourceNewsSubmit
Log in
Back to tool/Back to issues
#1541·sled

panic: "failed to allocate critical IO buffer"

Author: DemindiroCreated Aug 21, 2026Updated Aug 22, 2026
Labelsbug
  1. expected result: No panics
  2. actual result: Panics
  3. sled version: 0.34.7
  4. rustc version: rustc 1.94.1 (e408947bf 2026-03-25)
  5. operating system: Alpine (in a custom container)
  6. minimal code sample that helps to reproduce the issue: don't have one at this moment, sorry.
  7. logs, panic messages, stack traces:
thread 'log flusher' (17922) panicked at /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/sled-0.34.7/src/pagecache/iobuf.rs:43:9:
failed to allocate critical IO buffer

NOTE: It seems that iobuf.rs is gone in the current main branch, but I figure I should report this anyway in case it is still relevant.

While running a program using sled for mapping keys to offsets (should be less than 100 bytes for key+value per entry) I suddenly encountered:

thread 'log flusher' (17922) panicked at /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/sled-0.34.7/src/pagecache/iobuf.rs:43:9:
failed to allocate critical IO buffer

The code in question: https://github.com/spacejam/sled/blob/d81865d07f07910133877915b57abf0c52d5756b/src/pagecache/iobuf.rs#L38-L47

If I had to guess it tried to alllocate an excessively large amount of memory and alloc simply refused, returning null.

I have been using sled for a while in my program without issues, so I'm unsure if I can reproduce this issue soon. If I manage to reproduce it consistently I'll update this issue.

FWIW the db file is currently at 11GB and my computer has 128GB RAM (no on-disk swap but does have 1G of zram).

Source: spacejam/sled

View original on GitHubView discussion on GitHub