You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
spawn pool: workers never terminate, concurrent pools clobber each other's role, pooled outputs likely untagged #1134
Found in code while writing the tasks-and-pools guide for spore-host/spore-host#585 part 3. Not run on AWS. The guide documents the current behaviour and warns: one pool at a time per account, and always pool drain.
Workers don't self-terminate.
On a clean drain the worker loop just breaks (cmd/pool.go:161-164), and nothing writes /tmp/SPAWN_COMPLETE, so on_complete never fires.
spored's idle action is stop, never terminate (pkg/agent/agent.go:765-769).
So "Workers self-terminate on idle-timeout (scale to zero)" (cmd/pool.go:58), the drain message (:458) and pkg/taskpool/pool.go:90 overstate it. A stopped worker still bills EBS until the TTL.
After pool drain deletes the queue, workers spin until TTL.Worker.Run retries every claim error once a second and never checks its idle deadline on that path (pkg/taskpool/worker.go:93-101).
Every pool shares the role spawn-pool-worker (cmd/pool.go:288). CreateOrGetInstanceProfile overwrites its single inline policy (pkg/aws/iam.go:499-503), which is scoped to one run's queue. A second pool create therefore cuts the first pool's workers off from their queue.
No ECR pull grant, so a private-ECR image can't run in a pool.
Minor:
The visibility timeout comment says "sized from the TTL"; it's a fixed 900 (cmd/pool.go:208).
docs/pooled-task-execution-design.md §4 describes a reconcile loop that tops up and replaces reaped Spot workers, but pool create reconciles once and returns (:347).
pkg/taskpool/worker.go:185 assumes a failed completion record exists, but a spec that fails to parse writes none and is still acked.
Split into: #1146 (workers never terminate and spin after drain, items 1+2), #1147 (shared spawn-pool-worker role clobbered by concurrent pools, item 3), #1148 (pooled outputs untagged and no ECR grant, items 4+5), #1149 (minor items). Closing as split.
Activity
scttfrdmn commentedon Oct 19, 2026
Split into: #1146 (workers never terminate and spin after drain, items 1+2), #1147 (shared spawn-pool-worker role clobbered by concurrent pools, item 3), #1148 (pooled outputs untagged and no ECR grant, items 4+5), #1149 (minor items). Closing as split.