Skip to content

hydo 0.3.2

Choose a tag to compare

@kakoc kakoc released this 14 Nov 06:26
fbee09d

hydo 0.3.2

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 several vCPUs
on the KVM engine, pauses the workload or single threads of it, writes a failure as one web page,
finds the versions of your system that have a finding, takes hydo in CI further, and fixes what
the onboardings of Formance Ledger, TigerBeetle, Lago and Blnk found. Projects that pin
hydo_version: "0.3" keep working.

Before you upgrade

  • Nothing recorded moves. The fingerprint epoch stays 2. Images built by 0.3.0 or 0.3.1 give
    the same verdicts and fingerprints under 0.3.2. An image that contains one of hydo's own guest
    programs (hydo-world for fakes: and proxies:, hydo-world-tls, hydo-grpc) gets new
    bytes when you rebuild it, because the version is part of those programs; its verdicts stay.
  • On Linux with hvx, keep the kernel module of 0.3.1. The module did not change.

New

  • Several vCPUs on the KVM engine. hydo run --backend kvm --vcpus N (2 to 8) runs N vCPUs
    that take turns of VM exits, with one deterministic clock; q= sets the turn length.
    hydo explore --backend kvm --vcpus N --turns draws turn lengths, and --sweep turns
    searches them for the length where a verdict changes. The Linux release now ships the guest
    kernel for several CPUs, guest/bzImage-kvm-smp, and hydo doctor --backend kvm checks it.
    Each schedule gave one fingerprint on AMD and on Intel hosts. hydo guide flaky-tests has the
    details.
  • Pauses of the workload and of single threads. P=workload@<at>~<off>:<dur> stops the
    workload's whole process tree for some guest time, as a container's CPU limit does, and
    hydo explore --pause-workload draws such pauses. P=workload/<thread>[#<k>]@<at>~<off>:<dur>
    freezes the named threads while the others run on (hvx; hydo explore --pause-thread). With
    them, etcd's flaky test TestCacheCompactionResync and Qdrant's
    test_wal_replay_loads_pending_to_queue fail on every run of one schedule.
  • A failure as one web page. hydo report --html [DIR] writes one self-contained HTML file
    for a run, an exploration or a hydo ci run: the verdict, the failing run's timeline, and its
    first difference from a passing neighbour. It loads nothing from elsewhere, so it works as a
    CI artifact or an attachment.
  • Which versions have a finding. hydo versions builds an image of each version of your
    system, replays a finding's minimal schedule on each, and says where the finding was introduced
    and whether the newest version still has it (hydo guide workflow).
  • hydo in CI, stage 2. Accepted findings in hydo/known-findings.yaml (hydo ci accept),
    time budgets (budget: in hydo/ci.yaml, hydo explore --time-limit), shards
    (hydo ci run --shard I/N, hydo ci merge), and a history store (hydo ci record,
    hydo ci run --history). hydo guide ci sections 9 to 12.
  • Compose services with build:. hydo compose builds their images with Docker or Podman
    and pins each file's digest in one import; fetch-images.sh rebuilds a missing file and stops
    when a build gives other bytes.
  • For tests with eventual results: the eventually checks can wait for the eventually
    commands (after: commands), test.first_records: true keeps the first commands' records,
    a failing check's last output lines are in result.json, hydo explore --shrink-causes N
    shrinks a signature's other fault kinds too, services[].job: true keeps a one-shot job out
    of the fault targets, and a clock step can go to a time.
  • Experimental, opt-in: hydo explore --search state explores from snapshots taken in the
    middle of runs. It did not find failures sooner on the systems it was measured on.

Fixed

  • hydo <command> --help and -h print the command's options for every command, without an
    image or a project, and end with status 0. (0.3.1 listed hydo explore --help as a known
    defect.)

  • cargo install hydo followed by hydo setup works on Linux; the README offers it there.

  • The KVM and Mac engines no longer drop the records a power cut carries into the recovery boot
    when they are larger than the guest's receive queue, and a run can hold 65,536 messages
    instead of 1,024.

  • The error-log template turns request and trace ids into <id>, and known-errors.yaml no
    longer records the login name of the user who wrote it.

  • A service that stops in a run without faults gets a verdict that names it.

  • hydo build --check warns about the two placeholder files that hydo init writes: the
    check passes them, and every run fails with them.

  • The explorer's report points to hydo guide sdks, not to a file the release does not carry.

  • The README and both quickstarts were checked by fresh readers against release candidates
    (release step 6a), on a Mac and on Linux with hydo's kernel module, and corrected: one install
    block per method, what hydo init writes, the terms the program prints, the module lock, and
    how to delete a build's outputs.

Known and deferred

  • From the docs review, deferred: the header comment of the Redis example's hydo.yaml names
    old paths. The file is copied into the example's image, so changing it moves every quickstart
    value on all three engines; it changes with the next re-recording. hydo build ends with the
    hint hydo explore --seeds 1-20, which is the same for every project; the quickstarts say why
    the example adds --strategy swarm. The Mac quickstart names service networks, fakes and
    proxies without an example, because those examples are in the repository, not in the release.

  • Several vCPUs on KVM: a race window without a VM exit stays out of reach, because turns end
    only at exits.

  • On Intel, a KVM fingerprint holds for one CPU model: the release's checks on GitHub's runners
    gave other fingerprints on a Xeon Platinum 8370C and a Xeon 6975P-C than on the Core i7-13700HX
    that the quickstart's values come from, each run deterministic and with the same verdicts. The
    AMD EPYC models measured share their fingerprints. Earlier pages said one CPU vendor; they are
    corrected, and the cause is not known yet.

  • The pause of single threads runs on hvx only; the Mac and KVM guest kernels have no cgroups.

  • 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 fbee09d41f1bf4e9c2e1fc3dc85b1991886abbe4, the commit of the tag v0.3.2;
hydo --version names it.

  • hydo-linux-0.3.2.tar.gz (x86_64 Linux: Intel VT-x with hydo's kernel module, or KVM) and
    hydo-mac-0.3.2.tar.gz (Apple Silicon Mac, signed and notarized).
  • hydo-linux-0.3.2-sources.tar.gz and hydo-mac-0.3.2-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.2-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.