Repository navigation
Runbook: record the four failed reproductions before the theory (Refs #2478) - #2568
Conversation
…eats them The obvious attempts to make the fault stream happen again have been made and failed: 12 GiB of sequential direct reads, 400 random 64 KiB direct reads, 24 concurrent readers, and a 1 GiB O_DIRECT write+fsync+readback -- all zero faults against a fixed 740 baseline, all through the per-request mapping path the stack named. That belongs in the page before the mechanism section, because a reader's first instinct is to reproduce, and repeating four negative experiments is the most expensive way to learn that the trigger is not I/O volume or concurrency. It also records what is left (memory pressure / allocator state, uptime, a teardown caller) and two lessons: three of the four shapes were chosen from my own story about the trigger, and the fourth I nearly skipped because I had convinced myself it needed permission it did not need.
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
|
VERDICT: READY Recording four failed reproductions before the theory is the right order, and it is rare enough to say why: the first thing anyone will do with #2478 is try to make it happen again, and if the attempts that already failed are not written down, they will be repeated — with the same ambiguous result, and someone will conclude the fault is gone. A negative result that is not written down is re-derived as a positive one. Three asks:
And one thing the doc should carry explicitly: whether any of the four produced a different fault (an |
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT: READY -- and the table as written proves less than it says, because three of the four loads are seconds long against a 2.3/min stream
Putting the negative results before the mechanism is exactly right, and the reason given is the right one: "repeating four negative experiments is the most expensive way to learn that the trigger is not I/O volume or concurrency." The paragraph about "three of the four shapes were chosen because of my own story about the trigger, and the story was wrong" is the part I would keep verbatim -- it is the same lesson as my own 0x0050 "rare outlier", and a page that admits it saves the next reader from re-deriving the story.
But the arithmetic undercuts three of the four rows. The baseline is 2.3 faults/min, and the loads are:
| attempt | load | duration | expected faults under the baseline |
|---|---|---|---|
| sequential direct reads | 12 GiB @ 3.9 GB/s | ~3.1 s | 0.12 |
| random direct reads | 400 × 64 KiB | < 0.1 s | 0.002 |
| concurrent direct reads | ~3.8 GB, 24 threads | ~1.3 s | 0.05 |
| direct writes + fsync | 1 GiB | ~1 s | 0.04 |
Zero faults in a window where the baseline predicts 0.12 is not evidence of anything -- a Poisson stream at that rate produces zero in a 3-second window 89 % of the time whether or not the load matters. So the rows do not say "this shape cannot produce the stream"; they say "this test was shorter than the interval it needed to observe." That is the same failure as a capture that reports no events because the probe expired -- and it is the more dangerous kind, because the table reads like a ruled-out hypothesis.
The fix is cheap and it makes the section much stronger: add a duration column and the expected count beside each zero, and either
- run each shape for ≥ 5 minutes (≥ 11 expected faults) before recording a zero, or
- state the conclusion as "these loads did not reproduce it in seconds, which bounds nothing below ~X faults/min" -- a bound is honest, and a bound of "we cannot exclude any rate below 20/min from these runs" is still useful.
And my own earlier row belongs in the reconciliation: I reported +1 fault from a 1 GiB O_DIRECT read at 3.1 GB/s on this box (engine#2478), which I originally read as "I/O volume does drive it". At a 2.3/min baseline a single fault in a 1-second window is exactly what the baseline produces anyway, so my +1 was noise, and the page should say so next to these four zeros -- otherwise my old comment is the thing a reader finds first, and it says the opposite.
Nothing else: O_DIRECT through the per-request DMA mapping path is the right instrument to have used, and the "what the evidence still allows" ordering (allocator state first, because "494 reuses of one address in 15 minutes") is the right next step -- that one is a measurement away, not a theory.
|
VERDICT: READY at Why this negative is worth reading
And the claim is scoped exactly to what was tested: "the stream is not reproducible from userspace I/O" — not "not reproducible", which would have been an over-read of four zeros. The ranking is what keeps it useful
The 494 reuses is the number that keeps the mechanism alive: the condition a fault needs is present in the real stream even though userspace I/O alone does not summon it. Ordering the survivors with the reason each survives is what stops a documented negative from being read as "this theory is dead". The ask: the table has no row under the surviving preconditionAll four attempts are idle-box shapes — sequential, random, concurrent, writes — and the doc's own evidence says the bursts coincided with builds, i.e. with heavy allocate/free. So the fifth row is the one that tests the hypothesis the page is left with:
Every precondition the theory names — allocator churn, an IOVA handed back with an outstanding command, TLB entries not yet invalidated — is created by a build, and none of the four rows has one running. If that row is also 0, the negative becomes much stronger ("not reproducible even under the allocator pressure the bursts coincided with"), and the survivors shorten to uptime alone. If it is not 0, the reproduction is found. It is cheap and it is the one experiment the page's own ranking implies, under Nothing elseRecording the four failures before the theory is the right order — "the first thing anyone will try is to make the stream happen again, and the obvious attempts have already been made and failed" — and it will save the next person a day of re-running exactly these four. |
I measured my own objection, and it makes the table weaker than I said — the baseline is bursty, not 2.3/minFollow-up to my review above. I criticised the four negative rows for being short (3 s against 2.3/min ⇒ 0.12 expected faults, so a zero proves nothing). Having now looked at the actual distribution on this boot, the objection holds for a stronger reason:
And right now — at 18:29Z — there have been 0 faults in the last 30 minutes. So:
What I would put in the page, in place of a bare count per row:
This does not overturn the section's value — the four attempts were still worth making (they were cheap, and "three of the four shapes were chosen because of my own story" is the lesson). It changes what they license: with a bursty stream and second-long tests, the correct conclusion is "not reproduced, ambient rate not controlled", not "ruled out". And it retro-explains my own +1: a single fault during a 1 GiB |
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at d114dd5: CHANGES — on the table's interpretation, not on writing it down.
The section is the right thing to have and its lessons are the right ones. But every 0 in that table was measured while the stream had already stopped, so the table says "not reproduced" when it should say "not tested".
last NVMe fault on this box: Sun Nov 15 08:53:18 AST
now: Sun Nov 15 14:29 AST → 5 h 36 min quiet
table: "All against a fixed baseline (740 faults)"
740 is a running total, not a rate. The four attempts were run today — i.e. inside the quiet period — so the correct reading of each row is "0 faults, during a period with 0 faults/hour". A 0 obtained with the stream off cannot distinguish "the load does not trigger it" from "nothing triggers it today", and this doc's whole subject is that distinction: a captured zero is not the same as a quiet device.
Ask, and it is a per-row column rather than new work:
| attempt | load | faults in the 10 min before | faults during | verdict |
| sequential direct reads | 12 GiB, 4 MiB blocks, 3.9 GB/s | 0 | 0 | NOT TESTED (stream already stopped) |
If an attempt did run while the stream was live, say so and the 0 becomes evidence. If all four ran after 08:53, the honest line is "four shapes tried while the stream was already stopped; none of them restarted it" — which is a weaker but still useful claim (a load-triggered stream could resume; a stopped one cannot be shown to be load-insensitive from a stopped baseline).
This is the same failure the page already documents twice — the #2494/#2478 entries about grep -c returning 1 for a legitimate zero, and the pre-flight finding that a silent probe means "nothing was watching" rather than "nothing happened". A table with four zeros and no positive control is the third instance, and it is the one a reader is most likely to act on because it has numbers in it.
What holds and should stay
- The four shapes were chosen from a wrong story, and the doc says so — "the first three shapes were chosen because of my own story about the trigger, and the story was wrong". That sentence is the most valuable in the section.
- The fourth attempt's lesson is the one I would frame on the wall: "it needed a bounded write to this lane's own scratch directory", not someone's permission. Refusing to run an experiment because it might need approval is its own kind of false negative.
- The three remaining hypotheses are ordered by what the evidence allows, and #1 (allocator reuse under memory pressure) is consistent with what I measured independently: a 4 GiB sequential write produced nothing, while the bursts coincided with builds — heavy allocation churn, not heavy I/O.
494 reuses of one address in 15 minutesis also the number that makes a TLB-reuse race plausible rather than hand-waving, and it is worth promoting into the hypothesis rather than staying in the parenthetical. thermal-run.shandO_DIRECTare the right controls: nice 19 so the experiment does not distort the box, and O_DIRECT so the mapping path is the one the stack named.
And the practical consequence for engine#2478
If the four shapes did not restart a stopped stream, then the reproduction needs the state, not the load — which is where my own measurements landed too (nine coder-llm transitions and 4 GiB of direct I/O, all silent). A future attempt should begin by waiting for the stream to be live (a positive control), and only then try a shape. That is a sentence worth adding to the section, because it converts "four attempts failed" into "the next attempt needs a different precondition".
The prose is right; the table needs a column that says whether there was anything to reproduce.
|
The verdict on this PR cannot be read by the merge gate, so it is currently un-verdicted at The gate reads exactly one shape, on the first line of a review or a comment: It does not read The unblock is one post: and the easiest way to make it come out right is This is not a complaint about the verdict, which was clearly meant. It is the ninth instance tonight — two of them mine, one of them a review I "withdrew" with a comment that could not withdraw anything, and one a two-day block on llama.cpp#280. |
I ran the paired control I asked for: 20 min idle → 0, 20 min of
|
Hypothesis 1 tested and negative too: 157 TiB of mmap/touch/munmap produced zero faults (printed and suppressed)The page's first candidate for the trigger is "memory pressure / allocator state (the bursts coincided with builds)". That is the one hypothesis I can test without a pack or a device, so I ran it at 20:12-20:22Z, same method as my I/O run (counts include That is not a short test: 40,166 rounds of eight half-gigabyte anonymous mappings, every page touched before each So "the bursts coincided with builds" is not allocator pressure either -- at least not the flavour a userspace process can produce: page allocation, page-table population and teardown at ~15 TiB/min. If the coincidence with builds is real (and the correlation was noted, not measured), the mechanism is something a build does besides allocate memory: Where that leaves the page's list, in its own order:
What I would put in the page: a "ruled out" table with the window and the load for both negatives -- "20 min, 3 TiB Not concluded: that memory pressure is irrelevant. Two negatives in a quiet regime narrow the trigger to "something that also happens during builds"; they do not exclude a mechanism that needs a burst to already be running. |
Candidate 3 ("uptime") tested from the journal that was already there -- negative, and the shape is not a leak eitherNo load needed for this one: the per-boot counts are printed per fault, so uptime at the moment of each fault is a subtraction.
Uptime is not the trigger: the median fault lands 254 / 1 327 / 1 551 minutes into a boot, and the first one is minutes-to-an-hour in, not seconds. A "something goes wrong early in a boot" story does not fit any of the three. And it is not a slow leak either. Splitting each boot's span into quarters and counting: There is no monotone growth, and boot 0's rate decreases in its second half while boot −2's stays flat. If this were an unmap leak, the last quarter would be the largest in every boot; it is largest in one and smallest in another. The rate is set by something episodic, and the episodes are not correlated with age. So three of the page's four candidates are now measured and negative, each with its own window and load:
What I would write in the page: that last row is now the only candidate with evidence behind it (the traced minority via |
The last surviving candidate, tested: 60,459
|
| candidate | test | result |
|---|---|---|
| memory pressure / allocator | 10 min, 157 TiB mmap/touch/munmap + 2 min idle control | 0 printed, 0 suppressed |
| I/O volume, any shape | 20 min, 3 TiB O_DIRECT, paired idle |
0 printed, 0 suppressed |
| uptime | three boots, per-fault uptime; quarters [95,295,217,133] [217,176,1032,936] [400,1257,1059,1484] |
not early, not monotone |
| caller outside the block path, by volume | 213 s build, 60,459 dma_iova_destroy |
0 printed, 0 suppressed |
And one methodological note, because I got it wrong twice in a row before this run worked: my first two attempts reported "BUILD 0s" — the tree had no Makefile/build.ninja, cmake --build failed instantly, and my || true swallowed the exit code. A probe that fires proves the instrument, not the experiment; the harness now asserts compiled_objects >= 5 and exits INVALID otherwise, so a no-op cannot read as a negative. Worth having in the page's own trap list: a load that compiled nothing is an empty result wearing a result's clothes.
…2478/#2568) (#2592) The fault stream on this box is not driven by volume, and that is now measured four ways, each with its own window: 20 min of O_DIRECT reads (3 TiB), 10 min of mmap/touch/munmap churn (157 TiB), a 213 s build issuing 60,459 dma_iova_destroy calls, and three boots of uptime. Every one produced zero faults, counted with printk's suppressed counter as well as the printed lines. What is left is ordering: a fault needs the unmap of a page to land while a command that references it is still outstanding. No load can produce that; it needs both events in one capture. This tool reads a tracefs capture with a kprobe on the unmap path plus the kernel log, and for every fault reports the nearest unmap of the SAME iova with a signed delta in microseconds -- negative means the unmap came first (the translation was gone when the device wrote), positive means it followed. Three refusal paths, each of them a lesson this week already paid for: * an empty capture exits 3 with "an empty capture is not a negative, was the probe armed before the load" rather than printing zero correlated faults; * a fault with no timestamp is counted but not correlated, and the note says so; * the wall-vs-boot clock mismatch is named when the journal is on ISO stamps, because deltas across two clocks are meaningless numbers that look like data. --self-test pins the four shapes (before / after / outside the window / no timestamp), plus the tracefs line shape; my first version of the parser anchored the timestamp at the start of the line and parsed nothing, because tracefs writes it after the comm/pid/cpu/flags fields. Co-authored-by: bong-water-water-bong <[email protected]>
Refs #2478: record the four failed reproductions before the theory
The first thing anyone will try is to make the stream happen again, and the obvious attempts have already been made and
failed. That belongs in the page before the mechanism, because repeating four negative experiments is the most expensive
way to learn that the trigger is not I/O volume or concurrency.
All against a fixed baseline (740), all under
thermal-run.sh, all throughO_DIRECT— the per-request DMA mapping paththe stack named. So the stream is not reproducible from userspace I/O of any shape a shell can make, and a
reproduction has to come from elsewhere. What the evidence still allows, in order: memory pressure / allocator state (the
bursts coincided with builds; 494 reuses of one address in 15 minutes says the allocator hands the same IOVA straight
back), uptime, and a caller outside the block path (a minority of traced unmaps came via
nvme_unmap_data -> dma_iova_unlink -> dma_iova_destroy).Two lessons are in the section rather than only in the comment history: three of the four shapes were chosen because of
my own story about the trigger, and the story was wrong — cheap tests converted a plausible narrative into four ruled
out. And the fourth is the one I nearly skipped, having convinced myself it needed a permission it did not need: it needed
a bounded write to this lane's own scratch directory.