#225·lore

Obliterated fragments are resurrected when the same content is stored again

Author: goldyfruitCreated Sep 22, 2026Updated Sep 22, 2026

Found this on v0.10.0 (still there on main at 4cc2a0d) on a self-hosted server, Linux, local immutable + mutable store. I hit it through a collector I'd added, but nothing about the path is unusual — Obliterate is a public RPC, so stock server plus a client is enough.

obliterate leaves the entry in the index as a tombstone: PayloadObliterated, pack_file: 0, size_content: 0. store then ends by walking every entry that shares the new fragment's hash and pointing the ones whose pack pointer differs at the new payload, so a hash held under several addresses is only stored once. A tombstone always qualifies for that upgrade, because its pack_file is 0.

So obliterate a fragment, store the same content again under any address sharing that hash, and the tombstone gets assign_deduplicated_payload called on it. What happens then depends on the profile, and both outcomes look wrong to me.

On [profile.release], which sets debug-assertions = true and panic = "abort", the assertion at the top of that function fires and takes the process with it. On our server that was a restart loop — 16 restarts, exit 139, each run about 75 seconds, every one ending the same way:

WARN Overwriting obliterated fragment at 885fe1b5...-01a0cb18d8af...
WARN Overwriting obliterated fragment for address: ffdb2f1d...-01a0cb18d860...
panicked at lore-storage/src/local/immutable_store.rs:
Invalid deduplication, content size do not match

On [profile.release-lto] the assertion is compiled out (debug-assertions = false) and it's quieter but worse. This is the line that matters:

rust
self.flags = (deduplicated.flags & !FragmentFlags::PayloadStored)
    | (self.flags & FragmentFlags::PayloadStored);

Only PayloadStored is carried over from the tombstone, everything else comes from the live entry, so PayloadObliterated is cleared. The tombstone gets a real pack pointer, loses the flag that marked it destroyed, and keeps size_content: 0 — a fragment someone obliterated on purpose comes back, pointing at real bytes while reporting zero content. That's the half I'd care about, since obliterate tends to get used when something genuinely has to be gone.

What makes me think it's an oversight rather than intent: store already treats tombstones as a special case a few lines earlier, where a size mismatch against an obliterated entry is tolerated with "Overwriting obliterated fragment" instead of being called a hash collision. It's only the same-hash upgrade afterwards that doesn't make the same distinction. oodle_migration avoids it by accident with its if entry.data.pack_file == 0 { continue; }, but the packstore-rewrite caller walks by hash and doesn't.

We're running this, which covers both callers:

rust
if self.flags & FragmentFlags::PayloadObliterated.bits() != 0 {
    return;
}

at the top of assign_deduplicated_payload, on the reasoning that reviving a tombstone is the job of a real store() of that tuple, which replaces the entry wholesale and never comes through there. Happy to send it as a PR if that's the shape you'd want, though you may prefer to skip them at the call sites instead.

For what it's worth this is probably rare on a stock server, since obliteration only happens when eviction drops the last fragment referencing a payload. It became routine for us because a collector obliterates by design, which is how we ran into it inside a day.