Skip to content

fix(pool): reap orphan MicroVMs on pool start (#373) - #376

Merged
ZhiXiao-Lin merged 2 commits into
mainfrom
fix/373-pool-orphan-reap
Sep 14, 2026
Merged

ZhiXiao-Lin merged 2 commits into
mainfrom
fix/373-pool-orphan-reap

Conversation

@ZhiXiao-Lin

Copy link
Copy Markdown

Summary

  • On pool start, discover init-reparented (PPID=1) a3s-box-shim processes whose --config paths belong to the current A3S_HOME, then reap them before bind/prewarm.
  • Closes the [linux][P1] pool: daemon crash leaves orphan MicroVMs #373 leak where daemon SIGKILL left invisible MicroVMs that pool stop / ps / system-prune could not see.
  • Fences on PPID 1 + home-scoped config so live CLI/CRI shims are not killed. Does not invent warm-VM reattach, flip B2, or widen drain timeouts.

Test plan

  • cargo test -p a3s-box-runtime discover_tests (cmdline parse + home fence; Windows-safe)
  • Linux/KVM: SIGKILL pool daemon → pool start again → no leftover shims referencing A3S_HOME (issue repro)
  • CI green on this PR

ZhiXiao-Lin and others added 2 commits September 14, 2026 15:20
Warm-pool ownership is in-memory; after daemon SIGKILL, home-scoped
a3s-box-shim processes reparented to init were invisible to stop/ps/prune.
Discover PPID-1 shims under A3S_HOME and reap before prewarm (#373).
Does not invent reattach or flip B2.

Co-authored-by: Cursor <[email protected]>
@ZhiXiao-Lin
ZhiXiao-Lin force-pushed the fix/373-pool-orphan-reap branch from 140ce75 to d8b6186 Compare September 14, 2026 07:21
@ZhiXiao-Lin
ZhiXiao-Lin merged commit a94c18a into main Sep 14, 2026
14 checks passed
@ZhiXiao-Lin
ZhiXiao-Lin deleted the fix/373-pool-orphan-reap branch September 14, 2026 08:07
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.

1 participant