forge
Explore
Log in

Don't you dare go Hollow

Commits

Commits on mainFiltered to lanes/av1dumploud.report.mdClear filter

2026-10-01

ec-av1: every dump site fails loudly on a short writeAhmet Kaan Gümüş · 286530d
ec-av1: every dump site fails loudly on a short write

All 11 dump write sites in the crate wrote through `let _ = f.write_all(..)`.
A full filesystem, a quota or an RLIMIT_FSIZE therefore left a SHORT file on
disk and nothing said so -- the artefact behind two full days of chasing a
"decoder nondeterminism" that reproduced bit-for-bit as a truncated frame
(lanes/unwritten-dep.report.md: frames 0..4 complete plus 13320192 bytes of
frame 5), and behind an empty dump read as instability.

New `dumpio::LoudDump`: the caller declares the byte count from the geometry it
already has (per-axis extents, u16-vs-u8 sample width), `finish()` checks it
against the file's own length on disk, and any shortfall -- or a failure to
create the file at all -- aborts with

  ec-av1 dump FAILED [EC_AV1_FINAL_DUMP] <path>: wrote <on-disk> of <owed>
  bytes: <reason>

Two sites cannot know a total length (EC_AV1_DUMP_TABLES and the ECDUMP symbol
stream are append-mode, whole-run files); they say "of an unknown number of
bytes" rather than declaring a number they would have to invent.

The written count is the file's MEASURED length, not what write_all confirmed:
under RLIMIT_FSIZE the kernel stores up to the cap and only then returns EFBIG,
so a naive acknowledged count reported "wrote 0" over a 30 720-byte file.

Gates: a real decode under a real RLIMIT_FSIZE now FAILS with the line above
(child process, SIGXFSZ ignored, asserted against the fragment's real length),
plus /dev/full, uncreatable-path, under-declared-length and append-unknown arms.
The success path is byte-identical: the hg fixture sweep reproduces
a26438168c / 8d7a43bc5f, 3/3 each, 18524160 B per frame.

0ee1edf403 is still NOT reproduced (plain 3/3, sentinel 3/3, concurrent reuse,
7 RLIMIT caps, 204 prefix shapes: all plain value or no match). It stays open --
a SIGKILLed process emits no line at all, so that shape is not ruled out. What
is now closed is the silent-truncation class: every truncating cap aborts loudly
instead of leaving an artefact.