Registry Mirror
Skip to content

Conversation

@aditya-shantanu

@aditya-shantanu Aditya Shantanu (aditya-shantanu) commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

Partially addresses #3046.

Draining a node under sync-suspend load crashed actors with suspend failed: atelet Checkpoint: while calling worker CheckpointWorkload: rpc error: code = Unavailable ... dial unix /var/lib/ate/worker/.... Checkpoint wrapped the worker's error with fmt.Errorf, so atelet's interceptor returned Internal and ateapi crashed the actor. Run already keeps a worker's Unavailable through workerCallError; Checkpoint now does the same, so ateapi returns Unavailable and keeps the actor SUSPENDING with its assignment for a retry. A worker whose pod is gone, or that restarted and registered again, still crashes its actors through the worker workflows.

Unlike Restore there is no retry limit: a crash after a failed checkpoint loses the running actor's state. A worker that restarts and never registers (#3118) therefore leaves the actor SUSPENDING, with ResumeActor refused, until that issue is fixed; before this change the next suspend crashed it.

Tests: TestCheckpointKeepsWorkerUnavailable (fails without the change), Canceled and DeadlineExceeded rows in TestWorkerCallError. go test -race -count=3 -shuffle=on ./cmd/atelet/..., gofmt and go vet are clean.

AI use: code and tests written with Claude Code; a second Claude session reviewed the diff adversarially and its findings were applied. I reviewed the final diff and the test results by hand.

Comment thread cmd/atelet/main.go Resolved
@EItanya Eitan Yarmush (EItanya) added this to the M3 milestone Oct 26, 2026
@EItanya

Copy link
Copy Markdown
Collaborator

Aditya Shantanu (@aditya-shantanu), can you please sign your commits to make DCO happy

@Nishanth29

Nishanth Kotla (Nishanth29) commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

+1, I hit the same thing in microVM throughput runs: actors were crashed on transient worker errors because atelet reported them as Internal. In my runs, keeping the worker's code through atelet (what this PR does for Checkpoint), plus having the microVM worker mark safe-to-retry stalls as Unavailable and a reseed fix. I'll send the worker-side part as a follow-up PR.

@thockin

Copy link
Copy Markdown
Collaborator

Aditya Shantanu (@aditya-shantanu) you need to DCO these commits.

Checkpoint wrapped every CheckpointWorkload error with fmt.Errorf, so
atelet's interceptor reported it as Internal and ateapi crashed the
actor, even when the worker's socket was gone because its pod was being
evicted. Run already passes a worker's Unavailable on through
workerCallError. Checkpoint now does the same, so the caller can retry
the suspend. A worker that restarted or whose pod is gone still crashes
its actors through the epoch and pod checks.

A worker that never registers again triggers neither check, so
Checkpoint counts consecutive Unavailable failures per actor with the
counter Restore uses and reports the third as Internal, as Restore
does. The counter is renamed from restoreFailures to workerFailures.

Signed-off-by: Aditya Shantanu <aditya-shantanu@users.noreply.github.com>
A crash after a failed checkpoint loses the running actor's state, so
Checkpoint passes the worker's Unavailable to ateapi for as long as it
lasts instead of reporting the third in a row as Internal. The failure
counter goes back to counting restores only.

Signed-off-by: Aditya Shantanu <aditya-shantanu@users.noreply.github.com>
auto-merge was automatically disabled October 28, 2026 20:48

Head branch was pushed to by a user without write access

@aditya-shantanu
Aditya Shantanu (aditya-shantanu) force-pushed the fix/atelet-keeps-worker-status-codes branch from 3dcc4d6 to fae2c1f Compare October 28, 2026 20:48
@aditya-shantanu

Copy link
Copy Markdown
Collaborator Author

I was OOO 2 days. DCO fixed.

Signed-off-by: Aditya Shantanu <aditya-shantanu@users.noreply.github.com>
@thockin
Tim Hockin (thockin) added this pull request to the merge queue Oct 28, 2026
Merged via the queue into agent-substrate:main with commit 9a4cb2c Oct 29, 2026
5 checks passed
Jay (jay23606) added a commit to jay23606/substrate that referenced this pull request Nov 29, 2026
…substrate#3123)

Partially addresses agent-substrate#3046.

Draining a node under sync-suspend load crashed actors with `suspend
failed: atelet Checkpoint: while calling worker CheckpointWorkload: rpc
error: code = Unavailable ... dial unix /var/lib/ate/worker/...`.
Checkpoint wrapped the worker's error with fmt.Errorf, so atelet's
interceptor returned Internal and ateapi crashed the actor. Run already
keeps a worker's Unavailable through `workerCallError`; Checkpoint now
does the same, so ateapi returns Unavailable and keeps the actor
SUSPENDING with its assignment for a retry. A worker whose pod is gone,
or that restarted and registered again, still crashes its actors through
the worker workflows.

Unlike Restore there is no retry limit: a crash after a failed
checkpoint loses the running actor's state. A worker that restarts and
never registers (agent-substrate#3118) therefore leaves the actor SUSPENDING, with
ResumeActor refused, until that issue is fixed; before this change the
next suspend crashed it.

Tests: `TestCheckpointKeepsWorkerUnavailable` (fails without the
change), Canceled and DeadlineExceeded rows in `TestWorkerCallError`.
`go test -race -count=3 -shuffle=on ./cmd/atelet/...`, gofmt and go vet
are clean.

AI use: code and tests written with Claude Code; a second Claude session
reviewed the diff adversarially and its findings were applied. I
reviewed the final diff and the test results by hand.

---------

Signed-off-by: Aditya Shantanu <aditya-shantanu@users.noreply.github.com>
Co-authored-by: Aditya Shantanu <aditya-shantanu@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/node area/reliability kind/bug Something isn't working / bugfixes milestone-ack prio/P0 Highest priority / required for next milestone

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants