rented enroll-copy: droplet goes fully dark mid-transfer at 714/723 store paths, before activation ever runs #711
Labels
No labels
agent-blocked
agent-working
autopilot
bug
deferred
deploy-pending
enhancement
landing-pr
model-haiku
model-opus
model-sonnet
needs-design
needs-info
needs-triage
no-triage
out-of-scope
priority
ready-for-agent
ready-for-human
ready-for-session
rehearsal-183
snapshot-pending
standing-drive
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Reference
Matou/idss#711
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Failure. Drive
20260823T170734Zreds atenroll-copy(sig52ef2766d349) on the ceilingwaitForLegthrows inapp/tests/e2e/fixtures/foundingPrefix.ts:159, budget90*60_000fromapp/tests/e2e/journey.rented.spec.ts:178.legs.jsonshowsenroll-copyran5401267ms and the last progress reported was714 of 723 store paths · copying path '/nix/store/s6biwg0xy7sz1x5vzbihcvinimjmhh5q-etc' to 'ssh-ng://root@170.64.195.77'...(98.75% done) — seeartifacts/journey.rented-rented-gate-014d4--on-a-broker-rented-droplet/error-context.md. It never advanced past that path for the remainder of the budget.The droplet went fully dark, not just slow. Post-drive evidence-gather's separate SSH connections all failed identically:
logs/droplet-journal.txt,logs/droplet-caddy.txt,logs/droplet-units.txteach sayssh: connect to host 170.64.195.77 port 22: Connection timed out. I independently re-tested from the healer session, ~2h after the drive ended: bothssh -o ConnectTimeout=5 root@170.64.195.77andping -c 3 170.64.195.77still time out with zero response. A box that's merely busy mid-nix copystill answers a fresh SSH/ICMP probe on a second connection — this one doesn't, at any point since. The box (or its network path) is dead, not congested.Not the known dark-box bug. GOTCHAS.md #62 (
⭐⭐, answered under #703/#704) documents boxes going dark, but specifically duringenroll-activate'sswitch-to-configuration— clan-core's detached remote unit stopsnetworkdand hands the NIC todhcpcd, which takes a link-local address and blackholes the route. That fix does not apply here: this red is atenroll-copy, strictly BEFOREenroll-activateever runs (leg order ininternal/founding/rentedpath.go:393-396;enroll-configure/enroll-buildboth went green in this same drive perlegs.json, and neither performs an activation —enroll-configureis eval-only per its own label). Noswitch-to-configurationhas executed yet when this box goes dark, so the known networking-handoff regression cannot be the cause. This is a new dark-box signature.Ruled out as a code regression:
internal/clan/enrollment.go:855already carries--substitute-on-destination(landed by #699, commitda21ec14), so the copy is not naively pushing the full closure from this host — the target is meant to substitute stock nixpkgs itself.c21a86f4(#709, landed just before this drive at 16:50Z) fixed a separateconfigure-stage authorized_keys bug and explicitly noted it was unconfirmed live because its own drive's droplet was already reaped — this drive (started 17:07Z) IS that live confirmation, and it got much further than any prior rented drive (past configure/build, deep into copy), so #709's fix is working. The new fault is downstream of both.Suspected layer: droplet/infra, not app code. Two live hypotheses, neither provable from repo-side evidence since the box is unreachable for forensics:
--substitute-on-destinationmakes the DROPLET itself fetch+decompress+verify stock nixpkgs paths from cache.nixos.org — CPU/RAM/disk pressure on a small rented droplet during a large closure's tail end (paths like-etcthat depend on nearly everything) could OOM-kill sshd/networking or fill the disk. No dmesg/journal is obtainable to confirm since the box never answers again.What plugging it needs: live droplet/DigitalOcean forensics — console access (DO's web console, since SSH is dead),
doctl compute droplet getfor power/status state, and if reachable via console:dmesg,df -h,journalctl -bfor OOM-kill or disk-full evidence, per the same live-forensics need GOTCHAS #62/#703 already established for the activation-stage dark-box case. Until that evidence exists, no code-level fix is evidenced — do not widen theenroll-copyceiling further (GOTCHAS #62's own rule against timeout-only fixes for a box that may already be gone). A secondary, smaller follow-up worth considering once the root cause is known:internal/clan/store_count.go'ssshNGStoresets noServerAliveInterval/ServerAliveCountMaxinNIX_SSHOPTS(store_count.go:154), so a genuinely dead connection hangs silently for the full ceiling instead of failing fast with a diagnosable SSH error — this would sharpen the SIGNAL on the next occurrence but does not address the underlying cause.drive
20260823T170734Zred atenroll-copy:journey leg "enroll-copy" went red: budget of 5400s elapsed at "enroll-copy" — last activity: 714 of 723 store paths · copying path '/nix/store/s6biwg0xy7sz1x5vzbihcvinimjmhh5q-etc' to 'ssh-ng://roevidence:
test-results/…/20260823T170734Z/on matou-workstation (legs.json, droplet-journal.txt, trace) — a representative screenshot is attached here if one was captured (#596)Ruled by agent under ADR 0174 — veto anytime. Two-way door: a revertible source change plus a revertible harness addition, proven by a Go contract test and a controlled A/B off-drive. No security-posture widening, no spend, nothing destroyed.
What this red actually was
Not a droplet that died mid-transfer — a
nix copythat could not fail.sshNGStore(internal/clan/store_count.go:154) builtNIX_SSHOPTSout of the host-key options, the port and the identity file, and no keepalive. ssh waits on a socket whose peer has stopped answering indefinitely: the connection stays ESTABLISHED and the kernel still ACKs, so nothing below ssh fails either. So when the target went quiet at 714 of 723 paths,nix copyhad no way to report it — it could only be killed by the leg's 90m ceiling, having printed nothing since the path it was on. The ticket's "it never advanced past that path for the remainder of the budget" is that, precisely.Reproduced off-drive, with a relay that forwards 5 MB of a real ssh-ng transfer and then freezes (TCP up, nothing moving — the shape of a peer that stops answering):
NIX_SSHOPTSServerAlive*)copying path '…-glibc-2.42-67' to 'ssh-ng://…'…, no error — this ticket's signature, reproduced+ ServerAliveInterval=5 -o ServerAliveCountMax=3Timeout, server 127.0.0.1 not responding.→error: write of 8192 bytes: Broken pipe, rc 1and at the values shipped (
30×10), a plain ssh A/B through the same frozen relay: fixed session out at 325s, control carrying today's options still hanging at 741s.The dark-box diagnosis in the filing does not stand
DigitalOcean's action log for the drive's droplet
594590436:No power action of any kind in between — nothing provider-side power-cycled, resized or moved it. Every probe taken after 18:40:43Z was probing a droplet that no longer existed, including this ticket's own re-test (
ssh+ping, ~2h after the drive). "Still times out with zero response" two hours later is exactly what a destroyed droplet does, so it proves nothing either way. The threedroplet-*.txttimeouts are pre-destroy (evidence-gather is 3 ×ConnectTimeout=10, then the reap), so the box was genuinely unreachable at ~18:40 — but that is one reading at minute 60 of the stall, not a death certificate for minute 25.What survives the destroy: DO's hypervisor-side bandwidth series
The one forensic channel that outlives a reaped droplet (CPU/memory need
do-agent; bandwidth is hypervisor-side). For594590436, public inbound, Mbps:Read: 14.5 → 10.6 Mbps 17:14–17:20 — the target substituting stock paths from cache.nixos.org itself, exactly what
--substitute-on-destinationis for (so #699's fix is working as designed); ~2 Mbps 17:22–17:34 — the unsigned custom paths pushing from the drive host; taper 1.6 → 1.1 → 0.8; floor from 17:40 to teardown. The transfer stopped ~25 minutes into a 90-minute ceiling; the remaining ~55 minutes bought nothing. A wider ceiling would have bought only more silence — GOTCHAS #62's rule holds.Calibration caveat, stated so nobody over-reads it: a live, idle droplet measured the same order at the floor (0.0002–0.0009 Mbps vs the stalled box's 0.0001–0.0003). The series dates when traffic stopped; it cannot say whether the box was alive.
Landed (
27880caa)internal/clan/store_count.go—NIX_SSHOPTScarriesServerAliveInterval=30+ServerAliveCountMax=10. The probes ride the ssh protocol, not the store channel, so a target legitimately idle mid-substitution (fetching from cache.nixos.org, nothing on the channel for minutes) answers them and keeps its connection; only a target that answers nothing for the full 5-minute window loses it. Both ssh-ng invocations — the copy (enrollment.go:855) andmissingOnTarget's path-info probe — route through here, so the ticket's suggested secondary fix covers both.internal/clan/store_count_test.go—TestSSHNGStore_AsksSSHToNoticeADeadPeer. Red before, green after.scripts/lib/rehearsal-droplet.sh—oc_droplet_do_forensics, called fromoc_droplet_evidence, writeslogs/droplet-do-forensics.txt: ICMP, a fresh TCP connect to 22 (dark at the transport, or only to ssh?), the droplet record, DO's action list, and the bandwidth series — before teardown destroys the box. Smoke-tested against a live droplet; every capture degrades to a note if doctl/token/ping are absent, and it never gates teardown. This is the ticket's "what plugging it needs: live droplet/DO forensics", automated so the next occurrence arrives with it attached.docs/GOTCHAS.md#67;STATUS.mdheader.Full
internal/...suite,go vet,gofmt,bash -nclean.What is NOT fixed, and where it went
Why the target stopped moving bytes at 98.8% is still unknown, and unrecoverable for this box — it was destroyed 37 seconds after the red, and DO exposes no console-log API. Both hypotheses in the filing (target-side exhaustion during substitution; a syd1 network fault) remain open and unprovable. One counter-datum worth having: the same drive host copied a gateway toplevel to two freshly rented syd1 droplets ~2h later (#710's A/B) with no stall — this is not a reliably reproducible failure of the copy path, so a speculative code change would be a guess.
Filed as #712 (
deferred), revisit criterion = the next rented drive that stalls or reds atenroll-copy. That drive will now carry what this one lacked: a named ssh error ~5 minutes after the peer goes quiet, with the path it was on, anddroplet-do-forensics.txtbeside it — which is what tells the two hypotheses apart on the spot.Closing #711: the defect it could name and prove is fixed, and the residue is tracked.
enroll-copy's shipped ServerAliveInterval=30/CountMax=10 did not terminate a live stallednix copy, ran the full 90m ceiling — the fix's synthetic proof does not match live behaviour #716enroll-copy's shipped ServerAliveInterval=30/CountMax=10 did not terminate a live stallednix copy, ran the full 90m ceiling — the fix's synthetic proof does not match live behaviour #716enroll-copy's shipped ServerAliveInterval=30/CountMax=10 did not terminate a live stallednix copy, ran the full 90m ceiling — the fix's synthetic proof does not match live behaviour #716