interplane.Get Omega
Read in your language

aienux

Aienux, the AienOS kernel: boot, scheduling, IPC and capability boundaries. Pre-alpha; host, emulator and physical evidence are labelled separately.

Brought by drakestapleton

branch main Branches Tags History

aienux / evidence / store_512b_qemu_2026-09-25.md

90 lines · 7582 bytes Raw Blame History Rendered
1# Store v1 over NVMe, 512-byte LBA: QEMU qualification (2026-09-25)
2
3Lane: `feat/p3-store-512b-crash-qemu` (PR #136), code commit
4`51eaa4c80bfa806d737c0068a0ce9b82c1695e0c` (clean tree), base `main` `123929a`.
5Test-only. QEMU only. No ADR 0015 format, recovery-policy, NVMe-policy, or
6Machine 1 changes. `P3_STORE_QEMU` and `P3_STORE_NATIVE` are not claimed.
7
8Reproduce: `./scripts/qemu_store_512b_crash_test.sh`
9Same commit: `AIENOS_STRICT=1 ./scripts/verify_all.sh` exit 0, 273 PASS,
100 FAIL, 0 SKIPPED (this script is not yet part of verify_all).
11
12## What each tier proves, and what it does not
13
14| Tier | Marker | Method | Claim | Not claimed |
15|---|---|---|---|---|
16| Smoke | `STORE_NVME_INTEGRATION_512B_QEMU` | provision, one transaction, reopen through the real NVMe driver at 512-byte LBA | the Store engine runs over 512-byte geometry via `BoundedNvme` | Machine 1 behaviour |
17| 1 | `STORE_512B_CRASH_OBSERVED_QEMU` | host `SIGKILL`s QEMU at each of the 7 engine checkpoints, settle 0 and 3, then reopens | after a VM/process crash at any checkpoint the store reopens `Valid` at generation N or N+1 as ADR 0015 orders | power loss: QEMU's accepted writes survive in the host file whether flushed or not; volatile-cache loss is #133's scope |
18| 2a | `STORE_512B_ROOT_TEAR_CLOSURE` | host proof over the Tier 1 images killed at `after_first_flush` and `after_final_flush`: the images differ only in one superblock slot, and all 256 sector subsets of that 8-sector write are enumerated | on a 1-LBA-atomic device (AWUPF=0) a torn root write can only leave the old or the new slot, because every non-zero superblock byte lies in sector 0 and the engine only overwrites a zero or valid slot (sectors 1..7 zero in both) | device behaviour below one-LBA atomicity |
19| 2b | `STORE_512B_INJECTED_ROOT_RECOVERY_QEMU` | deterministic media-corruption injection into the inactive slot by `aienos-store-tool` (kernel encoder and CRC; CRC recomputed so each case reaches the check it names) | the engine's malformed-peer, graph-bad-newer and unsupported-version decisions hold over the native NVMe path | these are not crashes and not torn writes |
20
21The peer classification in every line is `Store::peer_condition()`, the
22engine's own decision at open, not a re-derivation in the guest.
23
24## Results
25
26```text
27=== Integration Smoke (512-byte LBA) ===
28PASS integration smoke (provision + transact, 512b non-atomic qualification active)
29PASS reopen smoke (generation=2 state=Valid peer=Valid)
30
31=== Tier 1: Checkpoint SIGKILL Campaign ===
32settle=0 cp=before_first_write saw=1 reopen=1 slot=1 gen=1 state=Valid peer=Zero expect=N -> OK
33settle=0 cp=after_payloads saw=1 reopen=1 slot=1 gen=1 state=Valid peer=Zero expect=N -> OK
34settle=0 cp=after_catalog saw=1 reopen=1 slot=1 gen=1 state=Valid peer=Zero expect=N -> OK
35settle=0 cp=after_commit_record saw=1 reopen=1 slot=1 gen=1 state=Valid peer=Zero expect=N -> OK
36settle=0 cp=after_first_flush saw=1 reopen=1 slot=1 gen=1 state=Valid peer=Zero expect=N -> OK
37settle=0 cp=after_superblock_write saw=1 reopen=1 slot=1 gen=2 state=Valid peer=Valid expect=N_NP1 -> OK
38settle=0 cp=after_final_flush saw=1 reopen=1 slot=1 gen=2 state=Valid peer=Valid expect=NP1 -> OK
39settle=3 cp=before_first_write saw=1 reopen=1 slot=1 gen=4 state=Valid peer=Valid expect=N -> OK
40settle=3 cp=after_payloads saw=1 reopen=1 slot=1 gen=4 state=Valid peer=Valid expect=N -> OK
41settle=3 cp=after_catalog saw=1 reopen=1 slot=1 gen=4 state=Valid peer=Valid expect=N -> OK
42settle=3 cp=after_commit_record saw=1 reopen=1 slot=1 gen=4 state=Valid peer=Valid expect=N -> OK
43settle=3 cp=after_first_flush saw=1 reopen=1 slot=1 gen=4 state=Valid peer=Valid expect=N -> OK
44settle=3 cp=after_superblock_write saw=1 reopen=1 slot=1 gen=5 state=Valid peer=Valid expect=N_NP1 -> OK
45settle=3 cp=after_final_flush saw=1 reopen=1 slot=1 gen=5 state=Valid peer=Valid expect=NP1 -> OK
46STORE_512B_CRASH_OBSERVED_QEMU: PASS
47
48=== Tier 2a: Root Tear Closure (host proof over Tier 1 images) ===
49settle=0 STORE_ROOT_TEAR_CLOSURE: PASS (slot=1 old=zero new=gen2 sector_bytes=512 differing_sectors=[0] combinations=256 as_old=128 as_new=128)
50settle=3 STORE_ROOT_TEAR_CLOSURE: PASS (slot=0 old=gen3 new=gen5 sector_bytes=512 differing_sectors=[0] combinations=256 as_old=128 as_new=128)
51STORE_512B_ROOT_TEAR_CLOSURE: PASS
52
53=== Tier 2b: Injected Root Recovery (media corruption, one defect per case) ===
54case=bad_crc decode=BadSuperblockCrc gen=1 state=DegradedRecovery peer=Malformed readonly=1 expect=degraded:Malformed -> OK
55case=wrong_magic decode=BadSuperblockMagic gen=1 state=DegradedRecovery peer=Malformed readonly=1 expect=degraded:Malformed -> OK
56case=nonzero_reserved decode=NonzeroReserved gen=1 state=DegradedRecovery peer=Malformed readonly=1 expect=degraded:Malformed -> OK
57case=wrong_slot_id decode=WrongSuperblockSlot gen=1 state=DegradedRecovery peer=Malformed readonly=1 expect=degraded:Malformed -> OK
58case=region_mismatch decode=Ok gen=1 state=DegradedRecovery peer=Malformed readonly=1 expect=degraded:Malformed -> OK
59case=seeded_garbage decode=BadSuperblockMagic gen=1 state=DegradedRecovery peer=Malformed readonly=1 expect=degraded:Malformed -> OK
60case=unsupported_version decode=UnsupportedVersion gen=none state=none peer=none readonly=0 expect=refuse:UnsupportedVersion -> OK
61case=graph_bad_newer decode=Ok gen=1 state=DegradedRecovery peer=GraphBadNewer readonly=1 expect=degraded:GraphBadNewer -> OK
62case=control_new_root decode=Ok gen=2 state=Valid peer=Valid readonly=0 expect=valid:gen2 -> OK
63STORE_512B_INJECTED_ROOT_RECOVERY_QEMU: PASS
64
65=== Final Summary (commit 51eaa4c80bfa806d737c0068a0ce9b82c1695e0c) ===
66STORE_NVME_INTEGRATION_512B_QEMU: PASS
67STORE_512B_CRASH_OBSERVED_QEMU: PASS
68STORE_512B_ROOT_TEAR_CLOSURE: PASS
69STORE_512B_INJECTED_ROOT_RECOVERY_QEMU: PASS
70STORE_512B_CRASH_RECOVERY_QEMU: PASS
71P3_STORE_QEMU: NOT CLAIMED (QEMU campaign; native persistence conditions separate)
72P3_STORE_NATIVE: NOT CLAIMED
73```
74
75Reading the settle=3 tear-closure line: generation 5 overwrites the
76generation-3 superblock in slot 0, so the proof covers overwriting a live
77older root, not only a zero slot.
78
79## Changes from the first #136 revision
80
81- Tier 2 renamed from "deterministic torn root recovery" to injected-root
82 recovery. The old cases pre-filled the slot with `0xAA`, a state the engine
83 never writes, and applied the magic and reserved defects after the CRC, so
84 all three only exercised the CRC check.
85- Injection base moved from genesis (`before_first_write`) to
86 `after_first_flush`, with the real generation-2 superblock as the source.
87- `os.urandom` garbage replaced by a fixed-seed xorshift64 stream.
88- All `python3` removed from the script (`aienos-store-tool`).
89- Guest peer telemetry now comes from the engine (`PeerCondition`); the old
90 guest heuristic labelled any decodable peer `GraphBad` from mount state.