Skip to content

24 of 32 progress step names are unregistered, so spawn's longest operations print nothing while they run #739

Closed

Description

@scttfrdmn

Follow-up to the 2026-10-07 demo's "a launch hung for 5+ minutes". The reporter
has since established, from EC2 timestamps, that the silence began after
RunInstances succeeded (instance i-0f9929a8068d407c9 up at 01:44:46, process
killed ~01:50 with no output), which rules out the region path. This is the
mechanism for the silence.

The post-launch wait is bounded, not a hang

cmd/launch_single.go:891 → waitForSSHReady(ctx, result.PublicIP, 2*time.Minute)
then :905 → verifySporedReady(ctx, …, 5*time.Minute), whose
WaitForSSMOnline gets timeout - 30s of that budget
(cmd/launch_posthook.go:333). Worst case after a successful RunInstances is
therefore ~7 minutes, bounded, before DNS registration even starts. The
reporter's ~5m14s falls inside the spored-verification window.

So "hang" is the wrong diagnosis. The defect is that 7 minutes of bounded
waiting is indistinguishable from a wedged process
, because nothing is printed
while it happens.

Why nothing is printed

Progress.Start/Complete/Error look the name up in p.steps and return
silently if it does not match
(pkg/progress/progress.go:148). p.steps is a
fixed list of nine (defaultProgress(), :130). Audited every
prog.Start|Complete|Error|Skip("…") call under cmd/ against the registered
set, with i18n initialized the way cmd/root.go:163 does it:

32 used / 9 registered / 24 UNREGISTERED

The 24 silent no-ops:

Checking data locality                  Launching warm-build seed instance
Cleaning up the staged ISO              Preparing the ISO staging bucket
Creating FSx Lustre filesystem          Recalling FSx filesystem
Creating FSx Lustre filesystem (async)  Recalling FSx filesystem from S3
Creating FSx Lustre filesystem          Reconciling cohort
  (deferred until after launch)         Registering DNS
Creating MPI security group             Starting import-disk-image
Creating Windows security group         Tagging AMI spawn:os=windows
Creating warm AMI from seed             Uploading ISO to S3
Ensuring Image Builder service role     Verifying spored agent
Ensuring import infrastructure          Waiting for Windows (password available)
FSx Lustre filesystem                   Getting public IPs
Getting FSx filesystem info

The longest-running operations in the tool are exactly the ones with no
progress output
: Verifying spored agent (5 min), Waiting for Windows (password available) (12 min), the FSx creation steps (minutes), and the entire
Windows ISO→AMI import pipeline.

The eight names that do match all belong to the fast pre-launch phase, which is
why this was never noticed: everything that prints finishes in seconds, and
everything slow is invisible.

A second, independent layer on non-TTY

displayPlain (pkg/progress/progress.go:241) only emits steps whose status is
complete or error — a running step is skipped. Verified directly:

Start("…") on a non-TTY emitted 0 bytes: ""

So even for a registered step, piping or capturing output means the step
announces itself only once it has finished. On a TTY you at least see the box
with the step marked running; on a pipe you see nothing until it completes.

The reporter's tail -4 was a third layer on top of these two, and they have
already identified it — but removing it is not sufficient: the two above are in
spawn.

Suggested fix

  1. Make an unregistered step name a hard error, not a silent no-op. A test
    that greps cmd/ for every prog.*("…") literal and asserts membership in
    defaultProgress() would have caught all 24 the day each was written. That
    gate matters more than the specific names, since the failure mode is silence
    and silence is invisible to every other kind of test.
  2. Register the missing steps, or make the step list dynamic — Start on an
    unknown name could append it rather than drop it, which also fits the
    conditional steps (FSx, Windows, MPI) that only exist on some launches.
  3. Print running steps on non-TTY. displayPlain should emit a line when a
    step starts, not only when it ends — the whole point of progress output on a
    captured stream is knowing what is in flight.
  4. Disclose the long waits. "Verifying spored agent (up to 5 min)" and
    "Waiting for Windows (up to 12 min)" turn a suspected hang into an expected
    wait. Heartbeat output every ~30s during these would be better still.

Possible further consequence, not yet confirmed

Progress.Error prints its message inside the matched-step branch
(progress.go:173-183), so for an unregistered name the error text is not
printed either
. On the Verifying spored agent path the error is also returned
and surfaces that way, so nothing is lost there. The FSx paths call
prog.Error(...) and continue in places — worth auditing whether any failure is
currently swallowed entirely, which would be a correctness bug rather than a UX
one.

Environment: spawn v0.123.0. Related: #732 (the instance was in an auto-selected
region nobody asked for, which is why its SSM readiness was in question at all).

Activity

  1. added
    bug
    on Oct 8, 2026
  2. scttfrdmn commented on Oct 8, 2026

    @scttfrdmn
    ContributorAuthor

    Confirmed in the field. A watchdog SIGQUIT dump during a real launch caught the process parked in registerDNS → exec.Cmd.CombinedOutput → ssh for minutes with no output at all, because "Registering DNS" is one of the 24 unregistered names. The two steps either side — "Verifying spored agent" (also unregistered) and "Waiting for SSH" — meant the entire post-launch sequence was silent from Getting public IP onward. See #740 and #741 for the defects that made the wait long; this issue is why it was invisible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions