fix: prevent containers from sticking during shutdown (#1826)
<!-- This is an auto-generated description by cubic. --> ## Summary by cubic Fixes containers sticking during shutdown by reliably cancelling startup when a stop is issued and recovering from wedged workspace mounts (GeeseFS) after SIGKILL. - **Bug Fixes** - Replace “build” cancels with per-`container` cancels; cancel startup contexts on stop events and after worker reconnects. - Close startup race: `cancelContainerIfAlreadyStopping` checks local lifecycle state first, then repository with a 2s timeout. - Recover stuck shutdowns: `abortStuckWorkspaceMount` unmounts GeeseFS workspaces after SIGKILL timeout even if no runtime existed, without impacting other containers. - Swap `cancelBuild` → `cancelContainer` in lifecycle handling; improved logging and tests for race and mount recovery. - **Dependencies** - Update `github.com/beam-cloud/geesefs` replacement to a newer commit. <sup>Written for commit 496180a706d2d3fb9799891c6a3891d473848f1a. Summary will update on new commits.</sup> <a href="https://cubic.dev/pr/beam-cloud/beta9/pull/1826?utm_source=github" target="_blank" rel="noopener noreferrer" data-no-image-dialog="true"><picture><source media="(prefers-color-scheme: dark)" srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img alt="Review in cubic" src="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"></picture></a> <!-- End of auto-generated description by cubic. -->
L
luke-lombardi committed
17bbb4eee338b222b4e42e74dcd1997725694819
Parent: fe6e0dd
Committed by GitHub <noreply@github.com>
on 8/3/2026, 10:59:43 PM