Skip to content

Launch parity: trn/inf get an arm64 AMI, GPU types get AL2023 without NVIDIA drivers, hibernate can never succeed (no HibernationOptions), stop/hibernate offered on one-time Spot #129

Closed

Description

@scttfrdmn

Found by the portal functional audit (2026-11-10, spawn-ts 0.8.1). Three launch-path divergences from Go spawn. Each one fails a launch, or the feature it was launched for, from the portal.

1. archForInstanceType calls Trainium/Inferentia arm64

dist/aws/ec2.js:396-404 returns arm64 for /^(trn|inf)\d/. trn1, trn2, inf1 and inf2 hosts are x86_64. Go's DetectArchitecture (pkg/aws/ami.go) has no such rule, and truffle-ts's own catalog says x86_64 for trn1.2xlarge. resolveAmi therefore picks an arm64 AL2023 image, and RunInstances refuses the mismatch. Reachable from the portal: the Dashboard launch form with any trn*/inf* type, or after the guided "Trainium" watch card matches.
Checked with spawn-ts's own export: archForInstanceType("trn1.2xlarge") === "arm64", while truffle-ts gives architecture: "x86_64".

2. GPU types get plain AL2023, with no NVIDIA driver

resolveAmi (:338-355) always looks up al2023-ami-2023.*-kernel-6.1-<arch>. Go picks the DLAMI GPU image for GPU families (pkg/aws/ami.go: AMI_AL2023_GPU*, with isGPUInstance covering p6/p5e/p5/p4d/g6e/g6/g5/g5g/g4dn…). Both GPU cards in the portal's guided picker hit this: "A GPU" resolves to g6.xlarge, and "A big GPU" to p5.48xlarge ($55/h). The user pays for a GPU that nvidia-smi can't see. (The spawn side has a related container-runtime gap, spawn#606.)

3. Hibernate can never succeed

hibernate() sends StopInstances{Hibernate:true} (:246-248), but launch() never sets HibernationOptions: {Configured: true}, nor the encrypted root volume that hibernation needs. So:

The audit's launch with that box ticked sent HibernationOptions = null.
Separately, stop and hibernate are offered on one-time Spot instances, which EC2 refuses to stop (spawn:spot-request-type=one-time is already on the tag set; bounds.js knows this at launch).

Fix:

Activity

  1. added this to the Hardening milestone on Nov 10, 2026
  2. added
    bug
    area: aws
    on Nov 10, 2026
  3. scttfrdmn commented on Nov 11, 2026

    @scttfrdmn
    ContributorAuthor

    The fix is in #135, stacked on #133 and #134. It is pinned by Go vectors rendered from [email protected].

    Decisions taken for Go parity:

    Not verified live (needs real AWS):

    • the DLAMI boots spored and nvidia-smi sees the GPU;
    • a hibernate-configured launch actually hibernates;
    • the portal role's new grants work: ec2:DescribeInstanceTypes, and ssm:GetParameter on arn:aws:ssm:*::parameter/aws/service/deeplearning/ami/*.
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

    area: awsbug

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions