Repository navigation
Description
What happened?
We suspended an actor with the default async mode, then drained its node about 20 seconds later, before atelet's background upload (--snapshot-upload-delay, 5 minutes). The snapshot was still PENDING and existed only on that node.
When the node went away:
- atelet received SIGTERM and logged
Shutdown signal received; drainingandShutdown complete2ms apart. It did not upload the pending snapshot, even though its pod has a 330s termination grace period. - Nothing blocked the node's removal while the snapshot was pending.
- The actor stayed
ACTOR_STATE_SUSPENDED.kubectl ate get actorgave no sign that its latest snapshot was gone.
The loss showed only at the next resume. Four minutes after the node was gone, the actor still looked fine:
$ kubectl ate get actor -a labo-sandbox
NAME TEMPLATE STATE WORKER POD VERSION
script-4 labo-sandbox/python-script ACTOR_STATE_SUSPENDED <none> 11
Then the resume failed, and only then did the actor become CRASHED:
$ kubectl ate resume actor script-4 -a labo-sandbox
Error: failed to resume actor: rpc error: code = FailedPrecondition desc = actor labo-sandbox/script-4 is CRASHED: node holding the actor's latest snapshot no longer exists: atelet Restore: snapshot "23d588f1-9750-4c5c-9f45-c94c068ee03c" has no usable local copy and no uploaded copy: open /var/lib/ate/snapshots/55766be0-040b-4a99-bc04-a5b3eaeec219/local-checkpoint/23d588f1-9750-4c5c-9f45-c94c068ee03c: no such file or directory
$ kubectl ate get actor -a labo-sandbox
NAME TEMPLATE STATE WORKER POD VERSION
script-4 labo-sandbox/python-script ACTOR_STATE_CRASHED <none> 14
RevertActor then took the actor back to its previous snapshot, from the day before.
The API guide ("Eviction" and ResumeActor) documents that an async snapshot is lost if the node goes away before the upload, so the loss itself is expected. Two things surprised us:
- atelet does not try to upload pending snapshots when it shuts down, although it has time to.
- The control plane does not mark the actor when the node holding its only copy is deleted. The user finds out only when they come back to the actor. In our use case, that is a person returning to an agent session.
Expected Behavior
Any of these would help, roughly in order of preference:
- On SIGTERM, atelet uploads the node's
PENDINGsnapshots before it exits, within its grace period. - While a node holds
PENDINGsnapshots, something keeps it from being removed. For example, a PodDisruptionBudget, or an annotation that cluster autoscalers respect, such as Karpenter'skarpenter.sh/do-not-disrupt. - When the node holding an actor's only copy of its latest snapshot is deleted, the actor moves to
CRASHEDor another visible state right away, not at the next resume.
Today a user can work around it by suspending with --mode=sync, or by watching status.snapshots[].durableSnapshot.state and locality themselves. That is what we will do for now.
Steps to Reproduce
- Run an actor with
SNAPSHOT_FIDELITY_MEMORYon a node that you can replace. We used a Karpenter NodePool on EKS. kubectl ate suspend actor <actor> -a <atespace>(async, the default).- Within 5 minutes, delete the node's NodeClaim (or drain and delete the node).
kubectl ate get actor <actor> -a <atespace>: stillACTOR_STATE_SUSPENDED.kubectl ate resume actor <actor> -a <atespace>: fails as above, and the actor is nowACTOR_STATE_CRASHED.
Sandbox Runtime
gVisor (runsc)
Agent Substrate Version / Commit SHA
v1.0.1
Kubernetes Version & Environment
EKS 1.37, Karpenter, snapshots on S3
Host OS & Architecture
Amazon Linux 2023, arm64 (m8g.xlarge)
Relevant Logs and Diagnostic Output
atelet on the drained node. The async suspend's checkpoint, then the shutdown about 2 minutes later, with no upload in between:
{"time":"2026-11-26T07:38:32.471584004Z","level":"INFO","msg":"Handle RPC","method":"/atelet.Atelet/Checkpoint", ... "actor_name":"script-4", ...}
{"time":"2026-11-26T07:40:26.163987662Z","level":"INFO","msg":"Shutdown signal received; draining"}
{"time":"2026-11-26T07:40:26.164018799Z","level":"INFO","msg":"Starting gRPC drain"}
{"time":"2026-11-26T07:40:26.16584294Z","level":"INFO","msg":"Drain completed within deadline"}
{"time":"2026-11-26T07:40:26.165895181Z","level":"INFO","msg":"Shutdown complete"}Additional Context
Related: #1707 (auto-suspend on eviction), #2983 (RevertActor and PENDING snapshots), #3101 (async snapshots filling a node's disk).
AI use: AI-assisted. An AI assistant helped run the test, read the logs and draft this issue. I reviewed it and ran the steps myself.
Confirmation
- I have searched existing issues and verified that this is not a duplicate.
- I have verified that this issue occurs on the latest commit on
main.
Activity