Skip to content

Recover containers from stuck FUSE mounts - #1824

Merged
luke-lombardi merged 1 commit into
mainfrom
ll/cleanup-fuse
Aug 3, 2026
Merged

Recover containers from stuck FUSE mounts#1824
luke-lombardi merged 1 commit into
mainfrom
ll/cleanup-fuse

Conversation

@luke-lombardi

@luke-lombardi luke-lombardi commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Summary by cubic

Recover containers that hang on shutdown due to stuck FUSE mounts. Adds thread-safe lifecycle state and guarded stop escalation to safely abort stuck mounts and prevent indefinite shutdowns.

  • Bug Fixes
    • pkg/storage/geese.go: On geesefs flush timeout, locate the FUSE connection via /proc/self/mountinfo and abort it by writing to /sys/fs/fuse/connections/<id>/abort (mounts fusectl if needed).
    • pkg/worker/worker.go: Guard single stop escalation with StopEscalationStarted; default StopReason to unknown when missing. After SIGKILL, wait 2m; if still running on Geese storage, unmount the workspace to recover a stuck FUSE mount, but only when workspaceOnlyStopping confirms all siblings in the workspace are stopping. Add thread-safe lifecycle state (stateMu, lifecycleState, setExitCode, setStopReason) to avoid races.
    • pkg/worker/{lifecycle.go,criu.go,sandbox.go}: Read/write stop reasons and exit codes via lifecycleState and setters to prevent data races. pkg/worker/worker_test.go: Added a concurrency test to verify workspaceOnlyStopping protects running siblings.

Written for commit a5b8827. Summary will update on new commits.

Review in cubic

@luke-lombardi
luke-lombardi requested a review from mernit August 2, 2026 18:58

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 3 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread pkg/worker/worker.go
@luke-lombardi
luke-lombardi merged commit 49dfd64 into main Aug 3, 2026
4 checks passed
@luke-lombardi
luke-lombardi deleted the ll/cleanup-fuse branch August 3, 2026 01:17
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.

2 participants