Skip to content

Owner-scoped, byte-range targeted injection on FaultContext #296

Closed

Description

@PierreZ

Downstream: PierreZ/paros#176 (run every paros role on moonpool-journal stores under at least the in-memory world's chaos) and PierreZ/paros#202. References: moonpool 9ed1360, paros 29b23e3.

Downstream evidence. paros's CTRL corpus (crates/paros-sim/src/corpus.rs:784-818) damages one Paxos record's
copy on one chosen node and derives the outcome analytically. Today's targeted API can't express that:

  • SimWorld::corrupt_file / fail_file_with_eio (sim/storage_ops.rs:487-529) are path-global:
    for_each_file_named hits every owner's file with that path (storage/sim/engine.rs:577-646). Every paros node
    uses the same journal path, so one call damages every replica.
  • They are sector-granular (SECTOR_SIZE = 512), but journal entries are packed and slots are 64 B (eight per
    sector), so a sector hits neighbouring records.
  • They are not reachable from FaultContext (runner/fault_injector.rs:82), which is what a scripted injector holds.

paros's stand-in, meanwhile, is a byte flip written and synced through the node's own provider at boot, aimed with
JournalAtlas::scan. The precedent is crates/paros/src/journal/tests.rs:173-226.

Smallest API. On FaultContext:

  • corrupt_bytes(ip, path, bytes: Range<u64>): a durable, deterministic mutation of exactly those bytes on that
    owner's file, re-stamped so the lost-synced-write oracle does not flag it;
  • fail_file_with_eio(ip, path, sectors, target), owner-scoped.

The path-global SimWorld variants could gain an owner parameter too.

Determinism. Targeted calls draw no randomness. The damage pattern is a pure function of
(path, bytes, seed) or fixed, like today's latent faults.

Acceptance. Two owners hold the same path. corrupt_bytes on one changes only those bytes of that owner's
file. The other owner reads clean. A crash afterwards does not trip the lost-synced-write oracle.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions