Skip to content

Detect CRASHED Actors during Checkpoint and Restore - #353

Merged
Dmitry Berkovich (dberkov) merged 10 commits into
agent-substrate:mainfrom
zoez7:crashed
Jul 8, 2026
Merged

Dmitry Berkovich (dberkov) merged 10 commits into
agent-substrate:mainfrom
zoez7:crashed

Conversation

@zoez7

@zoez7 Zoe Zhao (zoez7) commented Jun 29, 2026 •

Copy link
Copy Markdown
Collaborator

Related to #292 and #119

Changes:

  1. ResumeActor:
    1. During ResumeActor we'll put the actor in CRASHED state if the Resume failed due to any errors related to the snapshot itself, which includes:
      1. Missing or corrupted snapshot when downloading from GCS
      2. Runsc command fails.
    2. All other types of errors will not put the Actor in CRASHED state.
  2. SuspendActor or PauseActor
    1. During SuspendActor or PauseActor we'll put the actor in CRASHED state if we cannot produce a valid snapshot, which includes:
      1. cannot connect to Ateom after retries,
      2. runsc command fails.
      3. cannot upload the snapshot to GCS (during suspend) ; or cannot save snapshot locally (during pause).
    2. All other types of errors will not put the Actor in CRASHED state.

@zoez7
Zoe Zhao (zoez7) force-pushed the crashed branch 8 times, most recently from 2dcac0b to 11ae3bf Compare June 30, 2026 00:01
@zoez7 Zoe Zhao (zoez7) changed the title Add CRASHED state to Actor Detect CRASHED Actors during Checkpoint and Restore Jun 30, 2026
@zoez7
Zoe Zhao (zoez7) marked this pull request as ready for review June 30, 2026 00:04
Comment thread cmd/atelet/main.go Outdated
})
if err != nil {
return nil, fmt.Errorf("while calling ateom.CheckpointWorkload: %w", err)
return nil, ateerrors.NewGRPCError(codes.DataLoss, ateerrors.ErrReasonCrashActor, err)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it always supposed to be crashActor?

Comment thread cmd/atelet/main.go Resolved

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. minor comments.
  2. could you please update microvm ateom to support same behavior as for gvisor.
  3. E2E is failing, i scheduled retry and it still fails. Could you please run e2e on your local environment.

… terminal errors in atelet with local sentinels
createWorkerPod/deleteWorkerPod polled ListWorkers, which reads the
store directly, but AssignWorker reads the in-memory worker cache
that is updated asynchronously via pubsub. On slow CI runners the
gap between the two caused flaky 'no free workers available'
failures in TestResumeActor. Poll the worker cache as well before
returning from the helpers.
ClusterClient.ForEachMaster invokes its callback concurrently, one
goroutine per master. getSortedMasters appended to the shared slice
without a mutex, so an append could be lost and ListActors would then
silently skip every actor on the dropped shard. This surfaced as the
TestActorLifecycle/CreateActor e2e flake: a just-created actor missing
from an immediate ListActors response.

Guard the append with a mutex, matching ListWorkers/ListAtespaces, and
add a regression test that fakes concurrent ForEachMaster callbacks
(miniredis is single-node so the existing tests never exercise this).
@dberkov
Dmitry Berkovich (dberkov) merged commit 069ba08 into agent-substrate:main Jul 8, 2026
11 checks passed
Zoe Zhao (zoez7) pushed a commit that referenced this pull request Jul 8, 2026
Should have a timeout to make the fix in #353 non-blocking.
Originated from #379

- [x] Tests pass
- [x] Appropriate changes to documentation are included in the PR
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants