Skip to content

Regression: spawn >= 0.137 refuses task specs that launched on 0.131.1, because the bootstrap now fills EC2's 16 KiB user-data (#1246) #1275

Closed

Description

@scttfrdmn

Regression. Task specs that launched unchanged on spawn 0.131.1 are refused on 0.137.0 and later. This is the consequence of #1246: the bootstrap has grown to fill almost all of EC2's 16,384-byte user-data limit.

Measured (us-west-2):

  • 0.139.1, spawn task run --dry-run on a spec whose command is just bash -c 'echo hi', with no inputs or outputs: User data: 14748 of 16384 bytes after gzip. A later reading on the same version was 15,363 B. That leaves about 1–1.6 KB for a task's own command, inputs and outputs.
  • A build from the v0.137.0 tag passes spawn's own size check, but RunInstances is then rejected by EC2 (User data is limited to 16384 bytes). So 0.137.0 is already over, and 0.138+'s pre-launch check reports it correctly.
  • A build from the v0.131.1 tag launches the same unmodified specs.
  • The window is therefore 0.131.1 → 0.137.0.

Impact. Specs refused on 0.139.1 include, unchanged:

The workarounds are to move inline scripts into staged files (which changes the spec, so it has to be re-verified) or to pin an old spawn. Neither is something a user should need to do for a spec that used to work.

Ask:

  1. Bring the bootstrap back under a size that leaves real headroom, for example a small user-data stub that fetches the full bootstrap from S3, so the limit stops being a moving target.
  2. Add a CI guard that fails if the bootstrap for a trivial spec exceeds a set budget (say 8 KB gzipped), so this cannot regress silently again.

Related: #1246 (size), #1063 (pre-launch check, closed), #1270 (container /tmp, which the staged-directory workaround makes more likely).

Activity

  1. scttfrdmn commented on Oct 23, 2026

    @scttfrdmn
    ContributorAuthor

    Fixed in v0.141.0 by #1273 (#1246). spawn now strips comment and blank lines from its own bootstrap templates when it builds the user data. The 16.5 KB of inline documentation stays in the source and is no longer sent to EC2.

    gzipped user data 0.139.1 0.141.0
    bare bootstrap 12,829 B 7,253 B
    bash -c 'echo hi' task, spawn task run --dry-run, us-west-2 14,711 of 16,384 9,149 of 16,384

    That is about 5.5 KB back, so a task has roughly 7.2 KB for its own command, inputs and outputs, against 1.6 KB before. The specs listed here, 16.9 to 18.3 KB on 0.139.1, should drop to about 11.3 to 12.7 KB and launch unchanged. Each one's --dry-run User data: line shows the actual figure.

    On your two asks:

    1. Headroom: restored. The S3-fetched stub that would remove the ceiling altogether is tracked in User data: fetch the bootstrap from S3 behind a small verifying stub, removing the 16 KiB ceiling (follow-up to #1246) #1274.
    2. CI guard: TestBareBootstrapFitsItsBudget fails if the bare bootstrap exceeds 8 KiB gzipped. A second test parses every stripped template before and after stripping and requires the same syntax tree, so the stripping cannot change what the bootstrap does.

    v0.141.0 also includes #1179, so a task that fills /tmp still leaves a readable completion record.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions