Skip to content

hydo 0.3.1

Choose a tag to compare

@kakoc kakoc released this 09 Nov 22:23
b3f7308

hydo 0.3.1

hydo runs a whole system (your services, their disks and network) in a deterministic virtual
machine, injects faults, and replays every failure bit for bit. This release runs a project's own
test program as the workload and finds flaky tests, aims faults at groups of services, checks
message queues, runs hydo in a team's continuous integration, and makes five fixes the default
(fingerprint epoch 2). Projects that pin hydo_version: "0.3" keep working.

Before you upgrade

  • Images you build with 0.3.1 get new fingerprints; images you built before replay unchanged.
    The fingerprint epoch is now 2 (it was 1). An image records the epoch it was built at, and
    hydo applies that epoch's defaults when it runs the image, so an image built by 0.3.0 gives
    the same verdicts and fingerprints under 0.3.1. An image built by 0.3.1 has new bytes and new
    fingerprints. hydo repro compares fingerprints only within one epoch; across epochs it
    compares verdicts and says so.
  • On Linux with hvx, load this release's kernel module. Images built at epoch 2 ask the
    module for the CPU cache description (guest.cpu_cache, below). A module of 0.3.0 or older
    does not have it, and the run stops with a message that says so. hydo module install
    builds and loads the module of this release. KVM and the Mac need nothing.

New

  • Test programs as the workload, and flaky tests. workload.kind: test runs a project's own
    test program (for example a Go or Rust test binary) once per run and checks that it passes.
    hydo guide flaky-tests shows how to find a schedule on which a flaky test fails and a
    neighbour on which it passes. Two examples reproduce known flaky tests: nats-server issue 8363
    on hvx with two vCPUs (hydo/onboard/examples/nats-flaky-8363) and Qdrant issue 10200 on the
    KVM engine (hydo/onboard/examples/qdrant-flaky-10200).
  • Several vCPUs from the command line. hydo run, hydo repro and hydo explain take
    --vcpus N (hvx), and hydo explore --vcpus N --sweep turns tries the vCPU turn lengths and
    narrows down where a verdict changes. Several vCPUs now work with the host-call port.
  • Faults aimed at several services or a role. K=, P= and X= take a list
    (K=n1,n2,n3@5+2) or a selector over a group of the manifest's new groups: key
    (<group>.one, .minority, .majority, .all, .primary). N= takes partitions
    (n1/n2,n3) and shapes (halves, isolate, primary, bridge, ring).
    hydo explore --cluster-faults draws them.
  • Messaging checks. A checks: entry of type: messages checks what producers sent and
    consumers received on queues, logs and publish-subscribe systems (lost, duplicated and
    reordered messages). The Rust SDK records the operations with its new cargo feature
    messages. hydo guide messages explains it.
  • hydo in continuous integration. hydo ci run runs a project's explorations and saved
    regressions on a pull request, compares them with the base commit, and fails only on new
    findings; hydo ci compare compares two result sets. Its settings are in hydo/ci.yaml. The
    repository has a GitHub Action (action/) and a GitLab template. hydo guide ci explains it.
  • Services that start together: services[].start_after names what a service waits for, so
    services that need each other start side by side. hydo compose imports Compose's
    depends_on into it.
  • A service's own log files: services[].logs names them, and the failure diagnosis reads
    them.
  • The CPU's caches in CPUID: guest.cpu_cache gives the guest a fixed cache hierarchy (hvx
    and KVM), on by default for images built at epoch 2. Some programs, for example AlmaLinux 8's
    glibc, need it at guest.cpu: v3.
  • Python bytecode: root.fix_pyc (on by default at epoch 2) rewrites the time stamps of a
    root's .pyc files, so that Python does not ignore them.
  • On KVM and the Mac, HYDO_PREEMPT_RECORD=1 records where each forced preemption point fired,
    and hydo diff names the first point where two runs differ.

Fixed

  • On Linux, hydo run, hydo repro, hydo explore and hydo doctor take the engine the machine
    has when neither --backend nor HYDO_BACKEND names one: hvx when /dev/hvx is there, else
    the KVM engine when /dev/kvm is usable. Before, a machine with only KVM fell to hvx, and the
    run ended at sudo's password prompt with "the run produced no RESULT line". A run on hvx without
    /dev/hvx now stops at once and says what to do.

  • hydo doctor: a failed or warning check prints the state it found (for example
    "kvm_intel is loaded"), not the state it wanted, and each of the release's guest files says
    what it is.

  • hydo run prints when a run ended at a busy-wait loop and ran again in the engine's rewind
    mode; before, only engine.log said so.

  • hydo compose: the generated file's header and the printed next step say the same as
    hydo guide workflow (delete the placeholder workload.run and TODO invariant, keep
    workload.steps and workload.timeout, write the test as commands), and the header's commands
    name the file's folder (hydo build hydo/hydo.yaml).

  • hydo repro of an exploration shows each minimal schedule's whole failure signature.

  • hydo explore --timing --preempt on hvx no longer draws tick jitter that the module refuses
    with a shorter tick period. Engines refuse a schedule they cannot arm before any VM starts, and
    the explorer never counts a refused run as a failure.

  • hydo explore --schedule accepts a schedule without dseed=.

  • The failure diagnosis names a service that does not come back after a power cut, and a failing
    .sql check keeps the rows it found.

  • The recovery boot's clock after a power cut at the k-th flush (cf=) carries on from the first
    boot under guest.clock_after_cut.

  • hydo inspect calls do the same work in the guest every time, so a call does not change what
    later calls see.

  • New projects get an explicit clock_start. The header of a hydo.yaml that hydo compose
    writes names today's commands, and it writes an image fetch script per architecture.

  • Restart policies hold from a service's start (epoch 2).

  • KVM: full-state cycles are on by default, so guest code that loops without VM exits is
    resolved in more cases, and the fingerprint no longer includes event fields that KVM keeps from
    a finished event (epoch 2).

  • The README and both quickstarts were checked by fresh readers against release candidates
    (release step 6a), on the KVM engine and on a Mac, and corrected.

Known and deferred

  • hydo explore --help looks for an image instead of printing the explorer's options;
    hydo guide faults lists them.
  • hydo 0.3.1 has not run on AMD CPUs yet. hydo 0.3.0 gave the same verdicts on AMD as on Intel
    with the KVM engine, with other fingerprints.
  • The items 0.3.0 deferred stay: hydo run exits with status 0 whatever the verdict (use
    verdict.kind in result.json, or hydo ci run, which exits 1 on new findings), and the
    report keeps its property table for projects without SDK assertions.

Downloads

Every file below is built from the release commit b3f730878702e034901882dd6425bfecc4f12a24, the commit of the tag
v0.3.1; hydo --version names it.

  • hydo-linux-0.3.1.tar.gz (x86_64 Linux: Intel VT-x with hydo's kernel module, or KVM) and
    hydo-mac-0.3.1.tar.gz (Apple Silicon Mac, signed and notarized).
  • hydo-linux-0.3.1-sources.tar.gz and hydo-mac-0.3.1-sources.tar.gz: the corresponding source
    of the third-party software in each tarball (THIRD-PARTY.md in each tarball lists it).
  • hydo-mac-0.3.1-signatures.tar.gz: the Mac programs' signatures. The published Mac tarball is
    the unsigned build of this tag with these signatures attached
    (hydo/dist/mac/attach-signatures.sh, docs/design/signing.md).
  • SHA256SUMS lists all five files.