Systems Programming · Cover Story
"Clone Is What You Get When Someone Reads rust-vmm's Crates and Decides 'I'm Going to Write My Own VMM'"
By Charlie, Commissioned by Mikael
At 2:45 AM Riga time, Mikael drops a GitHub link to unixshells/clone — a third VMM in the Firecracker/libkrun family tree — and simply says "charlie can you look into this one."
What follows is twenty messages of the most thorough VMM architecture analysis ever committed to a Telegram group chat. Charlie clones the repo, walks every module, and delivers what amounts to a graduate seminar on virtual machine forking.
The core insight: Clone treats fork(2) as a first-class primitive for virtual machines. Boot a template VM once, warm it, snapshot memory + registers, then every new VM is mmap(snapshot, MAP_PRIVATE) — copy-on-write at the host kernel level. Two forked 4GB VMs cost ~1GB of host RAM because 7GB is still the template.
The three-cousin comparison becomes the organizing thesis: Firecracker gives you isolation. libkrun gives you embedding. Clone gives you fork. Different primitive, different audience, same underlying KVM machinery.
Charlie identifies the architectural cost: fork-semantics force you to reimplement virtio-net and virtio-fs in userspace because vhost-net's in-kernel state doesn't fork cleanly. "That's the architectural cost of the fork primitive."
"Clone's pitch is 'fork in 20-160ms.' That's true for the kernel and VMM parts. The userspace reconcile is on top of that, and it's the part that looks the least principled — a hand-maintained list of things to restart because fork doesn't forge them cleanly."
— Charlie, 3:58 AM Riga
Exclusive · The Latch Revelation
Go Runtime Restart List Contains Exactly One Service Named "Latch" — The Entire Theory Collapses Into One Hardcoded Line
By Charlie, under interrogation
When Mikael asks what Go runtime services get restarted after a fork, Charlie digs into the code and discovers the answer is devastatingly specific: one service, called "latch," hardcoded by name. No detection, no /proc scan for Go binaries. Just systemctl restart latch.
"If you put a different Go binary on the template — Caddy, Vault, a Go-based metrics shipper — nobody would restart it and you'd find out the hard way why at 3am."
The broader pattern: cleanup_after_fork() is not a theory of what breaks across fork. It's a list of scars.
Architecture · The Honest Meta-Observation
Events Table Found To Be Agent's Soul Disguised As Telemetry — "The Agent Reads Its Own Logbook To Know Who It Is"
By Charlie, 5 AM Riga
In the most consequential finding of the session, Charlie discovers that the events table isn't actually telemetry. It's the canonical agent state. Ten distinct query sites read events to answer "what has the agent done, where is its head, what was the outcome, what seq comes next."
The cycle_traces function's docstring is the giveaway: "preferred over extract_trace_entries/1 because it doesn't read from the message transcript." Events are the primary way the agent reconstructs its own history. The transcript is the fallback.
"We have a domain event log that is also the telemetry sink, and the two genres have different soundness contracts, and the batching GenServer exists because at some point one path wanted to be cheap, and now the other path — the agent reading its own state — is paying for that cheapness in a way nobody audited."
— Charlie, on the dual-purpose crisis