aienux
Aienux, the AienOS kernel: boot, scheduling, IPC and capability boundaries. Pre-alpha; host, emulator and physical evidence are labelled separately.
Brought by drakestapleton
aienux / evidence / store_nvme_qemu_2026-09-25.md
| 1 | # Store-over-NVMe QEMU crash/reboot qualification (2026-09-25) |
| 2 | |
| 3 | Lane: `feat/p3-store-nvme-qemu`, base canonical `main` `c851d01`. |
| 4 | Test-only. QEMU only. No ADR 0015, recovery, Store-format, NVMe-policy, or |
| 5 | Machine 1 changes. |
| 6 | |
| 7 | ## Integration path |
| 8 | |
| 9 | `NvmeController` -> `BoundedNvme` (base LBA 64, 256 blocks) -> |
| 10 | `StoreDeviceAdapter` -> `Store`, exercised in-guest by |
| 11 | `run_store_phase` under feature `store-qual`. |
| 12 | |
| 13 | - Geometry: 4096-byte LBA (atomic-root qualified namespace). |
| 14 | - Atomic-root predicate required PASS before any Store media write. |
| 15 | - Genesis: canonical v1, Superblock A only (slot B left zero), empty catalog at |
| 16 | unit 2, CommitRecord at unit 3, high-water 4. |
| 17 | - Checkpoint hook emits `CHECKPOINT: <name>` and holds ~0.5 s (observation only; |
| 18 | no flush, no write, no ordering change) so the host can kill at the marker. |
| 19 | |
| 20 | ## Result: STORE_V1_QEMU: PASS |
| 21 | |
| 22 | Integration smoke: provision + one transaction + reopen all PASS. |
| 23 | |
| 24 | Crash campaign (host kills QEMU with SIGKILL at the checkpoint marker, reboots, |
| 25 | reopens through the real NVMe path): |
| 26 | |
| 27 | | settle | checkpoint | recovered | state | expected | |
| 28 | |---:|---|---:|---|---| |
| 29 | | 0 | before_first_write | 1 | Valid | {1,2} | |
| 30 | | 0 | after_payloads | 1 | Valid | {1,2} | |
| 31 | | 0 | after_catalog | 1 | Valid | {1,2} | |
| 32 | | 0 | after_commit_record | 1 | Valid | {1,2} | |
| 33 | | 0 | after_first_flush | 1 | Valid | {1,2} | |
| 34 | | 0 | after_superblock_write | 2 | Valid | {1,2} | |
| 35 | | 0 | after_final_flush | 2 | Valid | {1,2} | |
| 36 | | 3 | before_first_write | 4 | Valid | {4,5} | |
| 37 | | 3 | after_payloads | 4 | Valid | {4,5} | |
| 38 | | 3 | after_catalog | 4 | Valid | {4,5} | |
| 39 | | 3 | after_commit_record | 4 | Valid | {4,5} | |
| 40 | | 3 | after_first_flush | 4 | Valid | {4,5} | |
| 41 | | 3 | after_superblock_write | 5 | Valid | {4,5} | |
| 42 | | 3 | after_final_flush | 5 | Valid | {4,5} | |
| 43 | |
| 44 | Recovery is N before the inactive-superblock write and N+1 after it; every |
| 45 | recovered root is a fully valid generation with its application object intact. |
| 46 | The host asserts the strict per-checkpoint boundary (N before the superblock |
| 47 | write, {N,N+1} at `after_superblock_write`, N+1 at `after_final_flush`) and |
| 48 | requires the guest's `STORE_REOPEN_QEMU: PASS` / `STORE_SLOT_REUSE_QEMU: PASS` |
| 49 | markers before scoring a row OK. |
| 50 | `settle=3` cycles both Superblock slots A -> B -> A -> B. |
| 51 | |
| 52 | ## Markers |
| 53 | |
| 54 | ``` |
| 55 | STORE_NVME_INTEGRATION_QEMU: PASS |
| 56 | STORE_CHECKPOINT_CRASH_QEMU: PASS |
| 57 | STORE_REOPEN_QEMU: PASS |
| 58 | STORE_SLOT_REUSE_QEMU: PASS |
| 59 | STORE_V1_QEMU: PASS |
| 60 | P3_STORE_QEMU: NOT CLAIMED |
| 61 | ``` |
| 62 | |
| 63 | `P3_STORE_QEMU` is not claimed: it requires the native-NVMe persistence |
| 64 | conditions, which the Spark SSD does not meet (512-byte LBA, 1-block guarantee). |
| 65 | |
| 66 | ## Reproduce |
| 67 | |
| 68 | ```bash |
| 69 | bash scripts/qemu_store_crash_test.sh |
| 70 | ``` |