Files
felhom.eu/documentation/audits/DRILL-soak-2026-08-31/phase1-lock-collision/00-VERDICT.md
T
admin 585ed654b4
gates / gates (push) Failing after 17s
soak drill phases 0-4: R-408's hazard is REAL and reachable; R-357 finally live (R-411..R-413)
Overnight soak on demo-hp, phases 0-4 of 7. Evidence
documentation/audits/DRILL-soak-2026-08-31/. No production code written, no golden,
no version bump - findings only.

PHASE 1 FAIL - R-411. The R-408 hazard was only ever reasoned about; tonight it was
measured through the product's own endpoints. restic stats TAKES A LOCK (clean-room:
nothing else running, 4x stats, sampler reads locks=1). A customer full-restore runs
stats in its preparation while holding NO acquireRunning, so the integrity check is not
blocked, runs, meets that lock, and resticStep escalates to unlock --remove-all - the
sampler caught "restore ..." and "unlock --remove-all" in the SAME sample at 20:50:51.
The log calls it "a stale exclusive lock left by a previous crash"; there was no crash.
THE CUSTOMER-FACING CONSEQUENCE IS CONTAINED and that is R-359 working: the check was
classified Unreachable, NOT damage, so no alarm and due-ness held. The opposite direction
is FENCED - five restores fired into a running check at 5/15/25/35/40s were all refused by
restoreOpBlocked with zero restic invoked.

PHASE 2 FAIL - R-412, and it is the natural instance of R-403's shape that yesterday's
session had to hand-build. A lost primary unit is rebuilt by the capture WITHOUT its
volume dumps (185664 B -> 4382 B, volume_dumps: None), and the off-site backup then ships
it and logs "backed up opengist ... 0 mandatory path(s)" - a success line over a backup
holding none of the app's data.

PHASE 2 also R-413: the R-87 proof CAUGHT that hollow snapshot unattended -
verdict "fail", volumes_expected_none_captured: opengist_data, one offsite_proof_empty at
severity error, while the four apps ahead of it in the rotation passed.
2.3 stale marker PASS, 2.4 two restores PASS, 2.5 corrected the runbook's premise
(RunTier2 has zero acquireRunning and zero restic references - a local mirror cannot
collide with the repo, so the proof correctly does not skip for it).

PHASE 3 PASS - R-357 live-validated at last, six days owed. A real full filesystem
(1900544 B free vs 5878421 B needed) on a separate 1 TB device that does not back Docker.
Refused BEFORE StopStack: app "Up 6 minutes (healthy)" unchanged, 0 safety dumps, live
userdata tree fingerprint 5a9b2db75dfd4ba4131adb3255670472 unchanged, message names both
numbers in Hungarian. Ballast removed, the SAME restore then worked and the fingerprint is
still identical. On the same full disk the Tier-2 run, the proof and the integrity check
all behaved: the proof refused before any download through the shared unitOnlyHeadroom
gate extracted today, reached no verdict and did not alarm.

PHASE 4 PASS - the false-alarm control the whole R-87 design rests on now EXISTS. Found by
reading all 53 catalogue composes: bentopdf is the only template with neither a database
service nor a named volume. Deployed, backed up, proved: PASSED in 2.224s with zero alarms.

Four of my own instrument errors were caught by their own controls before any result was
believed: a hub log line used as a controller positive control, a grep pattern that missed
a registered job, a heredoc that mangled a planted marker, and a catalogue scan that read
0 of 0 apps from the wrong path.

Phases 5-7 to follow: the real nightly cycle with injected faults, the untouched observer,
and teardown.
2026-08-31 23:33:32 +02:00

2.2 KiB
Raw Blame History

Phase 1 — the R-408 hazard, live. VERDICT: FAIL (the hazard is real and reachable)

The customer-facing consequence is CONTAINED. The hazard itself is not.

What was established, all measured through the product's own endpoints

# fact how
1 restic stats takes a repository lock in 0.14.0 clean-room: nothing else running, 4× stats, sampler read locks=1 (11-stats-locks-cleanroom.txt)
2 A customer full-restore runs stats in its preparation, so it holds a lock while holding no acquireRunning 09-escalation-window.txt, 20:50:29
3 The integrity check is therefore not blocked by a running restore and starts 06-reverse.txt, skipped:false
4 It meets the lock and resticStep escalates to unlock --remove-all 07-…txt 20:50:31 + the sampler caught restore … and unlock --remove-all in the SAME sample at 20:50:51
5 The log calls it "a stale exclusive lock left by a previous crash" — there was no crash 07-…txt
6 The check then could not verify the store; classified Unreachable, NOT damage → no alarm, no customer mail, due-ness not advanced 07-…txt 20:50:36

The opposite direction is FENCED — and that was measured, not assumed

Five restores fired into a running check at 5 / 15 / 25 / 35 / 40 s offsets were all refused by restoreOpBlocked (offbox_handlers.go:358), and zero restic processes were sampled. So the hazard is reachable only restore-first. All five checks completed ok:true (39–52 s).

A third pairing, same root cause

The new R-87 proof skips correctly when the integrity check holds the flag (skipped:true), and runs during a customer restore (stack:paperless-ngx, verdict:pass) — because the restore holds no flag. Harmless (the proof uses --no-lock and never unlockStale), but it is the same missing-flag consequence in a third place.

Instruments

The lock sampler was proven before any zero was believed: locks=0 while quiet, then 8 consecutive locks=1 samples across a real 43.9 s integrity check. Negative control: a string that cannot appear returned 0.

Filed as R-411. Nothing was fixed (runbook §2.6).