[Bug]: An actor whose resume, suspend or delete fails gets stuck in RESUMING / SUSPENDING / DELETING; it cannot be deleted, its worker stays allocated, and no API call recovers it
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 52/100
Research direction
Start with hack/repro/stuck-actor/README and run repro_wedge.py followed by recover_probe.py to reproduce the stuck lifecycle. Trace the ResumeActor, SuspendActor, and DeleteActor paths, especially their runsc teardown handling. Done means a node-side failure leaves the actor recoverable through DeleteActor(any_state=true), releases the worker, and handles a missing runsc container as already torn down.
Written by the indexing model from the issue text.
Description
What happened?
When a lifecycle operation fails on the node, the actor is left in the transitional state it was already committed to and never leaves it:
- a failed resume leaves it
ACTOR_STATE_RESUMING - a failed suspend leaves it
ACTOR_STATE_SUSPENDING - a failed delete leaves it
ACTOR_STATE_DELETING
In all three the worker keeps allocated.actors = 1. Nothing in the API gets it out. Re-issuing the same operation returns the same error every time, and DeleteActor(any_state=true) fails on the node teardown and leaves the actor DELETING, still allocated. The only recovery today is deleting the worker pod, which moves the actor to CRASHED and frees the worker.
How we saw it happen
A few ways we saw to reproduce it (and happened in benchmarks):
- The request is cancelled or times out mid-teardown. ateom runs
runsc kill/wait/state/deleteunder the request context; a cancellation landing mid-runsc deleteSIGKILLs runsc partway through destroying the container. runsc deletefails.runsc delete -forcecan remove the container's state record and still exit 128 (e.g. 5s timeout). Every laterrunsc state/runsc deleteon that container then fatal-exits 128 (loading container: file does not exist), so the teardown can never complete on retry.- The sandbox is lost. Observed as the ateom container being OOM-killed, for example.
runsc checkpointthen fails (cannot checkpoint container "_pause" in state stopped) and the delete hits (2).
Expected Behavior
An actor stuck in a transitional state after a node-side failure must be recoverable through the API:
DeleteActor(any_state=true)should succeed and free the worker. A container runsc no longer has a record of is already gone and teardown should treat it as done.- Better: the actor should be moved to
CRASHEDand its worker released, the way a missing worker pod already is.
Steps to Reproduce
Scripts (vibe coded): hack/repro/stuck-actor (talk to ateapi and the router directly; setup in the README there).
python3 repro_wedge.py oomhog --template <template>
# -> VERDICT[oomhog]: PINNED (actor=SUSPENDING, workers_allocated=[...])
python3 recover_probe.py <actor>
# -> DeleteActor(any_state=true) -> INTERNAL ... runsc delete: exit status 128
# +20s state: DELETING | workers allocated: 1
By hand:
- Create an actor from any template and resume it.
- Kill the sandbox (e.g. allocate past the worker's memory limit; the ateom container is OOM-killed and restarted).
SuspendActorreturns INTERNAL (runsc checkpoint: exit status 128); the actor isSUSPENDING, worker allocated.DeleteActor(any_state=true)returns INTERNAL (runsc delete: exit status 128); the actor flips toDELETINGand stays; worker still allocated. Repeating any call gives the same result.
Sandbox Runtime
gVisor (runsc)
- Dominant language
- Go
- Stars
- 2k
- Forks
- 333
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 275
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from agent-substrate/substrate
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
agent-substrate/substrate#1750 · 1 comment ·
-
area/dev-infra area/microVM kind/cleanup
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
agent-substrate/substrate#1695 · 2 comments ·
-
area/node area/observability good first issue kind/feature prio/P2
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
agent-substrate/substrate#1647 · 1 comment ·
-
area/cli kind/bug kind/docs
Difficulty 2/5 Half a day Newbie friendliness 78/100
agent-substrate/substrate#1642 ·
-
area/demos kind/bug
Difficulty 1/5 Under an hour Newbie friendliness 85/100
agent-substrate/substrate#1579 · 1 comment ·
All issues in agent-substrate/substrate
Similar issues
-
optimization optimization:agents-md-curator
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
githubnext/gh-aw-cao#13143 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
blinklabs-io/bursa#904 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
yanet-platform/ipfw-go#129 ·
-
bug confmap/provider/googlesecretmanagerprovider needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
open-telemetry/opentelemetry-collector-contrib#51273 · 2 comments ·
-
bug: AI Gateway client filter lists "Unknown" twice when NULL and literal Unknown clients coexist Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 90/100