notes

The multicore defect-discovery curve: its data, and how a soak appends to it

Owned by milestone 201 (is multicore reliability converging), which scopes design/fatal-risks/README.md's risk 5. Name provisional (this file's stem); naming is an architect's.

Risk 5 says the concurrency is wrong in ways QEMU cannot show, arriving one at a time, forever. Milestone 201 turns that into a measurement: count the multicore defects found per unit of stress on real silicon, per architecture, and watch the slope. A flattening curve is a confidence. A linear one is the red result. This page is where the points live, so that milestone 225 (run the soak on radon, argon and xenon) and every later run can append rather than re-argue.

Two tables, because a curve is a numerator over a denominator

Exposure is the denominator: one row per boot that ran a stress workload, whether or not it found anything. A boot that found nothing is the most important row there is, because it is the flat part of the curve, and it is the row most likely to go unrecorded.

Defects is the numerator: one row per multicore defect, with the exposure row that found it, or none if nothing was measuring stress when it turned up.

The curve for one architecture is then: walk that architecture's exposure rows in date order, keep a running total of crossings, and plot the running count of defects of class race or multicore against it. Hours and boots plot the same way when a second view is wanted. Never pool architectures (aarch64, riscv64 and x86_64 have different memory models; see 201's BUGS). Never plot a defect whose exposure is none: it has no x-coordinate.

Which denominator

calef ruled on 2026-09-25 (UTC) that the curve is judged on crossings, and 201's block records it. Hours and boots are still recorded in every row, so a later question can be answered without re-running anything:

Exposure rows

Column What goes in it
id E plus a number, never reused
start (UTC) date and time of power-on, UTC; the zone of any source time is converted, and a guess is marked ~
machine a board name (radon, argon, xenon), or hvf for an Apple Silicon Mac's physical cores. QEMU and loom rows do not belong here: they are not the silicon this risk is about
arch aarch64, riscv64, x86_64
cores cores online, from the boot's own smp: line
build the commit SHA the image was built from
workload soak-test, soak-test-reboot, or a named alternative; a workload that does not cross cores is recorded as such and never counted (201's BUGS: idle hours flatten the curve for free)
hours wall time from the first beat to the last, from the last beat's t=
crossings the last beat's crossings=
beats the last beat's beat=
result clean if the last beat has refused=0 mismatch=0 stalled=0 and no soak-test: FAILED line; otherwise the defect ids it opened
source the log's path in the tree, or the note section that records it

How a soak-test log becomes a row

script/board-console --exposure <log> --machine <name> --build <sha> --start '<utc>' does everything below and prints the row (milestone 225, 2026-10-05). The rules are kept here because they are what it implements, and a reader checking a row should not have to read Rust.

Every beat is one line, printed by kernel/src/soak.rs:

soak-test: t=<s>s beat=<n> rounds=<n> rate=<n>/s wakes=<n> wakerate=<n>/s workers=<n> refused=<n> mismatch=<n> stalled=<n> drifted=<n> crossings=<n> remote=<n> steals=<n> deferred=<n>

Take the last such line of the boot. hours is its t= divided by 3,600, crossings and beats are read off it, and result is clean when its three failure counters are all zero and no soak-test: FAILED line appears anywhere in the log. Milestone 297 (soak becomes soak-test) landed on 2026-09-14; logs from before it spell the prefix soak:, which crates/serial_console already normalizes.

A non-clean boot opens a defect row with class unclassified, and it stays unclassified until somebody has read the dump. That is the step the retracted VisionFive 2 reading skipped in the other direction: it was classified as a defect before it was understood.

Check the first beat before recording anything: wakerate about 100 * harts and crossings rising between beats (soak.md, "On radon at a bench"). A boot that fails that check is recorded with workload soak-test (not crossing) and excluded from the curve.

The rows

Every exposure row so far is radon's, so the table is in multicore-defect-curve/radon-rows.md and its dated continuations in that directory, beside the notes on what each bench evening's rows record. A first row from another machine starts its own appendix.

radon's curve stands at about 12.19 million crossings over 109 crossing boots and about 30.3 hours, with zero defects. The §259 (a multicore soak counts toward risk 5 at ten million crossings over three boots) ledger counts plain boots only: E4 + E6 + E7 = 10,288,805 crossings over 3 boots, which meets it. What each bench evening's rows record, and the caveats on E1 to E3, are with the rows.

Defect rows

Column What goes in it
id D plus a number, never reused; a retracted row keeps its id
found (UTC) the date of the first commit recording it, UTC
arch as above, or model for a loom finding, which runs C11 and no architecture
instrument silicon (with the board), hvf, qemu-tcg, loom, audit
exposure the exposure row that found it, or none
class one of the five below
silicon-only yes only if it has been seen on silicon and has not reproduced under QEMU; no if QEMU or loom showed it; unknown otherwise
fixed date (UTC) and milestone, commit or pull request; or open
source where the defect is recorded at the code

Classes: race, a defect that depends on the interleaving of two or more cores. multicore, one that exists only with more than one core but is deterministic once placement is fixed. instrument, a defect in the stress workload or its hook rather than in the kernel. retracted, a reading since overturned, kept so it is never counted again by someone who read the old version. unclassified, not yet understood. Test-only defects (an assertion wrong under load) do not belong here; load-sensitive-assertions.md is their register.

Defects found before exposure was measured

Everything below was found before any exposure was measured, so every row's exposure is none and none of them is a point on the curve. They are here because risk 5's second clause ("the bugs appear only on silicon") is a claim about this column, and the silicon-only column is the evidence.

id found (UTC) arch instrument class silicon-only fixed source
D1 2026-07-23 aarch64 (the only port then) qemu-tcg, a suite flake (8 of 10) race no 2026-07-23, the on_cpu deferral intrusive-queues.md, the wake-before-switch-out race
D2 2026-07-27 riscv64 qemu-tcg multicore no 2026-07-27 riscv-parity-scope.md, the PLIC boot-hart-lottery bug
D3 2026-08-01 riscv64 qemu-tcg (-cpu thead-c906, 2 of 4 runs) race no 2026-08-15, crates/memory_corruption_canary_gate interleaving.md, the canary's serialization
D4 2026-08-04 model loom race no 2026-08-04, milestone 80 interleaving.md, "What loom found" (the seqlock fence)
D5 2026-08-14 (loom's date; first seen earlier) not recorded not recorded race unknown before 2026-08-14 scheduler.md, the steal edge of the switch-out window
D6 2026-08-14 riscv64 silicon (radon, boot 8) retracted n/a retracted 2026-08-15 visionfive2.md, fifth bench stop
D7 2026-08-18 riscv64 qemu-tcg, 1 of 45 loaded runs, two cores race no 2026-08-18, pull request #316 object-revocation.md, the double free
D8 2026-08-26 x86_64 qemu-tcg (10 of 10) race no 2026-08-26 arch::x86_64::ap_boot's BUGS #2 (the TLB shootdown)
D9 2026-08-26 x86_64 qemu-tcg (about half of runs) multicore no 2026-09-18, milestone 316 arch::x86_64::ap_boot's BUGS #3 (which core booted)
D10 2026-08-26 x86_64 qemu-tcg (26 of 40 at -smp 4) race no 2026-09-19, milestone 161 arch::x86_64::ap_boot's BUGS #1 (the lost check-in)
D11 2026-09-02 riscv64, and a loaded host qemu-tcg instrument no 2026-09-02, milestone 221 soak.md, "Two bugs this mechanism had" (both)
D12 2026-09-17 x86_64 audit (milestone 313), then qemu-tcg (7 of 12) race no 2026-09-23, milestone 315 sched::delete_port_range_capabilities_impl, the per-core port revoke
D13 2026-09-19 aarch64, riscv64 hvf, 5 of 9 recorded full runs; qemu-tcg, the CPU matrix twice in about 9,000 boots race no 2026-10-12, milestone 514 hvf-leg.md, a_std_program_serves_a_granted_listening_port

The milestones in the fixed column: milestone 80 (Loom: the hand-rolled atomic protocols, model-checked), milestone 161 (the x86_64 kernel port), milestone 221 (the soak never crosses cores, so build the hook that makes it). Then milestone 313 (the security audit that was due since August), milestone 315 (a port revoke that reaches every core) and milestone 316 (which core booted: making NIFE_SMP=2 mean something on x86_64). D13's is milestone 514 (the HVF std listener hangs in some full runs).

What the table says about risk 5. Twelve rows are real or instrument defects. Every one whose instrument is recorded was shown by QEMU, loom or an audit; D5's is not recorded. The one silicon reading (D6) is retracted. Milestone 514 settled D13 on 2026-10-12: a host prober's connection completed its handshake into a listener net_stack was about to close, and the close sent no reset. That is userspace networking and timing, not the kernel, and widening the window made it fail on demand. The riscv64 CPU matrix hit it under TCG twice (the-inbound-check.md), so it is no evidence for the class risk 5 names.

BUGS