Skip to content

E2E flaky: ax resume fails with "no worker has room for the actor" right after setup #568

Open

Description

@yongruilin

The Kind E2E suite failed once on #566 and passed on re-run:
https://github.com/google/ax/actions/runs/42960996660/job/130327233529

Every task test failed at its first ax resume with ResourceExhausted: no worker has room for the actor.

Cause: the tests start before Substrate's workers are schedulable. A worker pod is Ready as soon as it registers, but the scheduler skips it until atelet has downloaded the gVisor runtimes and the worker has reported them (agent-substrate/substrate#3276). hack/setup-e2e-kind.sh only waits for the Deployment rollout.

Fix (test-only): wait for schedulable workers, or retry resume on ResourceExhausted as Substrate's own e2e does. Also add atelet and worker logs to the failure dump; without them this run cannot show why the workers were slow.

Follow-up: ax-server returns this error as Internal and marks the task Failed. It could be treated as transient, like the errors in #463.

Activity

  1. mayawang commented on Nov 11, 2026

    @mayawang
    Collaborator

    +1 on the follow-up. Per #468, a capacity error should leave the task Pending rather than Failed, but AX shouldn't retry or queue it itself, Substrate will queue (agent-substrate/substrate#2059)

  2. changed the title [-]E2E flake: `ax resume` fails with "no worker has room for the actor" right after setup[/-] [+]E2E flaky: `ax resume` fails with "no worker has room for the actor" right after setup[/+] on Nov 11, 2026
  3. yjjnls commented on Nov 19, 2026

    @yjjnls

    Same flake pattern, and I took the test-only fix from the report. Draft on my fork:

    main...yjjnls:ax:g83a2-e2e-resume-capacity

    • test/e2e/harness_test.go: adds mustResumeAX, which retries ax resume while the CLI output carries the capacity rejection (ResourceExhausted / "no worker has room for the actor"), bounded to 2 minutes at a 2-second interval, and switches every resume call site to it. Other resume errors still fail the test immediately; capacity retries stay in the test harness, matching the Retry and waiting policy for Substrate errors #468 direction that AX itself neither retries nor queues capacity errors.
    • .github/workflows/e2e.yml: collects atelet (-l app=atelet) and ax-workers logs in the "Collect cluster diagnostics on failure" step, so a slow-runtime failure shows why the workers were not schedulable.

    I first looked at waiting for schedulable workers in hack/setup-e2e-kind.sh instead. WorkerPool status exposes readyReplicas and the sandbox class resolution conditions, but nothing that says the sandbox runtimes have been downloaded and reported; readyReplicas flips when the pod registers, which is exactly the gap described in the report. So the bounded retry seemed like the smaller change with a clearer failure signal.

    Verified with gofmt -l, go vet ./test/e2e/, and the package compile path (go test -run '^$' ./test/e2e/, which exits after the --e2e skip); I could not run the Kind suite here.

    The follow-up from the report is unchanged on current main: ResourceExhausted is not covered by substrate.IsTransientError (Unavailable/DeadlineExceeded/Aborted only, internal/substrate/client.go), so recordFailure stores the task as Failed and returns Internal (internal/server/server.go).

    Outside PRs are closed at the moment, so happy to have someone open a PR from the branch if the approach looks right; happy to rebase, split, or step aside if you have plans for this.

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