Repository navigation
hydo 0.3.1
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 reprocompares 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: testruns 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-testsshows 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 reproandhydo explaintake
--vcpus N(hvx), andhydo explore --vcpus N --sweep turnstries 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=andX=take a list
(K=n1,n2,n3@5+2) or a selector over a group of the manifest's newgroups:key
(<group>.one,.minority,.majority,.all,.primary).N=takes partitions
(n1/n2,n3) and shapes (halves,isolate,primary,bridge,ring).
hydo explore --cluster-faultsdraws them. - Messaging checks. A
checks:entry oftype: messageschecks 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 messagesexplains it. - hydo in continuous integration.
hydo ci runruns 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 comparecompares two result sets. Its settings are inhydo/ci.yaml. The
repository has a GitHub Action (action/) and a GitLab template.hydo guide ciexplains it. - Services that start together:
services[].start_afternames what a service waits for, so
services that need each other start side by side.hydo composeimports Compose's
depends_oninto it. - A service's own log files:
services[].logsnames them, and the failure diagnosis reads
them. - The CPU's caches in CPUID:
guest.cpu_cachegives 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 atguest.cpu: v3. - Python bytecode:
root.fix_pyc(on by default at epoch 2) rewrites the time stamps of a
root's.pycfiles, so that Python does not ignore them. - On KVM and the Mac,
HYDO_PREEMPT_RECORD=1records where each forced preemption point fired,
andhydo diffnames the first point where two runs differ.
Fixed
-
On Linux,
hydo run,hydo repro,hydo exploreandhydo doctortake the engine the machine
has when neither--backendnorHYDO_BACKENDnames one: hvx when/dev/hvxis there, else
the KVM engine when/dev/kvmis 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/hvxnow 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 runprints when a run ended at a busy-wait loop and ran again in the engine's rewind
mode; before, onlyengine.logsaid so. -
hydo compose: the generated file's header and the printed next step say the same as
hydo guide workflow(delete the placeholderworkload.runandTODOinvariant, keep
workload.stepsandworkload.timeout, write the test as commands), and the header's commands
name the file's folder (hydo build hydo/hydo.yaml). -
hydo reproof an exploration shows each minimal schedule's whole failure signature. -
hydo explore --timing --preempton 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 --scheduleaccepts a schedule withoutdseed=. -
The failure diagnosis names a service that does not come back after a power cut, and a failing
.sqlcheck 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 underguest.clock_after_cut. -
hydo inspectcalls 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 thathydo 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 --helplooks for an image instead of printing the explorer's options;
hydo guide faultslists 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 runexits with status 0 whatever the verdict (use
verdict.kindinresult.json, orhydo 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.gzandhydo-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).SHA256SUMSlists all five files.