Skip to content

Trust the checker, then check the checker

Test your checker on histories with known answers before you trust its verdicts. On two three-operation histories, each with one known anomaly, elle-cli 0.1.11 printed no verdict at all: not valid, not invalid.

A checker is part of the proof. fdyno's fault tests record every request and answer while processes are killed, paused and cut off. Then Elle reads the history and says whether any serial order that respects real time explains it. If the harness reads Elle's silence as success, a broken system passes.

What Elle checks

In the list-append workload, every key holds a list. A write appends a value that is unique in the run. A read returns the whole list. So each element in a read names exactly one write, and the order of the list shows the order of the writes. Elle builds a graph of which transaction must come before which and looks for cycles. It also names anomalies that need no cycle:

Anomaly What a read shows Example
G1a, aborted read a value whose write failed append 1 fails; a read returns [1]
G1b, intermediate read part of one transaction's writes one transaction appends 1 and 2; a read returns [1]
Duplicate one value twice a read returns [1, 1]

A checker that does not answer

The fault tester, nemesis, has a self-test: tiny histories with one known anomaly each. Each has three operations: one write and two reads.

On the G1a and G1b histories, elle-cli 0.1.11 printed no verdict within the time limit in every recorded probe run. It ran until it was stopped. One earlier run with a 20 s limit did print invalid for G1a, so this is "often no answer", not "never". The duplicate history returns invalid in about 2 seconds (tools/nemesis README).

A hang is dangerous only if the harness counts it as a pass. That raised two questions: can a hang count as a PASS, and did one already?

A hang is never a PASS

Each nemesis run ends with one of three verdicts (the nemesis suite lists every evidence rule):

Verdict When
PASS Every checker answered valid with an exit code that agrees, the native checks found nothing, and every evidence rule holds.
FAIL Every evidence rule holds, and Elle said invalid or a native check found an anomaly.
UNKNOWN Anything else, including a checker that timed out.

Every elle-cli call has a timeout, and a timeout gives UNKNOWN (elle.go). A call must return one result per history, and its exit code must agree: elle-cli exits 1 for an invalid history. So "valid" with exit 1, or exit 0 with no output, is not a PASS. An evidence rule can fail, for example when a fault never took effect. Then the run is UNKNOWN, even when a checker reported an anomaly. The anomaly is kept as a candidate finding.

UNKNOWN is no claim about fdyno. It means the evidence is not there.

Six histories and their verdicts. G1a and G1b test histories: Elle gives no verdict and the native checks find the anomaly. So the verdict is UNKNOWN, and the anomaly is kept as a candidate finding. Duplicate history: both find it, FAIL. Split-read control: Elle finds a cycle, the native checks find nothing, FAIL. A clean history where Elle times out: UNKNOWN. A clean history where Elle answers valid and every rule holds: PASS.

A second checker that sees different things

nemesis now runs its own list-append checks in Go, on the same history (native.go):

  • G1a: a read that contains an element of a failed write.
  • G1b: a read of a key that ends partway through one transaction's appends to that key.
  • Bad elements: duplicates, elements no write produced, and elements on the wrong key.
  • Lost writes: after the faults heal, the harness reads every touched key once more. Every acknowledged append must appear on its key in that final read.
  • Partial transactions: a transaction with an unknown result must be in the final reads completely or not at all. The final reads come in chunks, and different chunks are not one snapshot. So the harness repeats full passes, up to 4, until two passes in a row return the same list for every key. Lists only grow, so two complete, identical passes in a row form a common cut of the final state. Without such a pair, a partly visible transaction is not judged, and the run is UNKNOWN.

The final read matters for both checkers. A checker reasons only from what reads observed. A write that was acknowledged, then lost, and never read leaves no trace. With the final read in the history, Elle also rejects the lost-write history.

The native checks do not search for cycles. The split-read control shows why both are needed. It is a client broken on purpose: it reads each key with its own GetItem, so one "transaction" mixes values from different moments. Every value it reads is real, so the native checks pass it. Elle finds the read-skew cycle and rejects it. Each checker catches what the other cannot.

Did a hang already pass?

The published EC2 campaign checked its nine 1-hour histories before nemesis existed, with an older harness. That harness had a strict rule (record):

Case Rule
Every history One check, with a limit of 1,800 s
Positive history Counts only with exit 0 and every check valid=true
Control Counts only with exit 1 and at least one check valid=false
Anything else, or the limit The whole campaign stops

So a hung check could not pass; it would have stopped the campaign. The rule did fire once, for another reason: Knossos returned unknown for 7 register keys after it ran out of memory. The published register history comes from the rerun.

No counted check came near the limit. The time from the end of one workload to the start of the next includes the check. It was at most 24 s after list-append runs and 56 to 76 s after register runs. It was 15 to 24 s after bank runs and 16 s after the 20-minute stages.

The retained list-append histories were then checked again with the native checks:

History Operations Keys Elle (campaign) Native checks
first campaign, seed 7411, 1 h 101,282 2,377 valid 0 anomalies
rerun, seed 19087, 1 h 100,832 2,362 valid 0 anomalies
rerun, seed 39821, 1 h 97,618 2,292 valid 0 anomalies
first campaign, 20-minute stage 32,284 759 valid 0 anomalies
rerun, 20-minute stage 33,338 782 valid 0 anomalies
first campaign, split-read control 913 24 G-single-item pass
rerun, split-read control 912 24 G-single-item pass

The five histories have no G1a, G1b, bad element, lost acknowledged append or partly visible transaction. The published list-append results stand. The controls show the other half again: the native checks pass them, and Elle rejects them.

Limits

  • The probe shows elle-cli 0.1.11 giving no answer on two three-operation histories. It does not show how often that happens on large histories, or why.
  • The native checks have no cycle search. A history that only Elle can reject still depends on Elle answering. When Elle gives no answer, a native finding is a candidate, not a FAIL, and the run must be repeated.
  • The re-check covers the three list-append histories among the nine published ones, plus the two 20-minute stages. The register and bank histories were not re-checked this way. A clean re-check does not extend the results to faults or workloads those histories did not cover.

What to do with this

Before you trust a checker, feed it histories with known answers, including the anomalies you care about. Treat a timeout, a missing result or an exit code that disagrees with the output as "unknown", never as "pass". Read every touched key after the faults heal, so lost writes leave evidence. And run a second checker with different blind spots: a cheap, exact check of the simple anomalies beside the one that searches for cycles.