You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
cache: a full volume panics in write_batch_to_disk #94
Found by a memory-accounting audit of 8b3c813. The tests are on branch audit/memory-tests and fail on main today; check out that branch to run them. File and line links point at that commit.
What goes wrong.write_batch_to_disk calls .expect("write failed") on store.put (src/core/src/cache/core.rs:1096-1099). When the real volume fills before the budget does (see #88 and #93), inserts panic instead of returning CacheFull, and every later insert that spills panics too.
Evidence.
On a 16 MiB tmpfs: 243 successful inserts, then a panic with "short write: expected 69632, got 57344", then StorageFull.
On a 32 MiB ext4 volume: a panic at insert 372.
No Err(CacheFull) was ever returned, and the disk budget was 1 GiB.
dev/audit/run-in-container.sh vol-tmpfs (or vol-loop, which needs --privileged). Without Docker: sudo mount -t tmpfs -o size=16m tmpfs /small && AUDIT_SMALL_DIR=/small cargo +1.96.0 test -p liquid-cache --lib audit_full_volume_returns_cache_full_not_panic -- --nocapture --test-threads=1
L, D; needs seccomp unconfined for io_uring under Docker
Not inline: it is 123 lines. This is a crash rather than a memory-accounting bug.
Flags: P probabilistic (a pass after a fix only means the race wasn't hit), F interleaving forced by a test hook, L Linux only, D needs Docker, M measurement only, C control (passes by design).
Activity