Repository navigation
post: run the fstrim timeout under sudo so it can stop fstrim - #148
magma-beef wants to merge 1 commit into
Conversation
An unprivileged timeout cannot signal the root-owned sudo/fstrim it spawned, so the host budget never bounded the trim and fstrim could outlive it and keep the buildkit mount busy. sudo timeout <secs> fstrim gives timeout the privilege to kill fstrim; exit 124 still maps to the timeout outcome. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
|
|
This PR is too large for Bugbot to review. It changes 9 lines and 2,679,536 characters. Split the change into smaller pull requests to get a review. |


Summary
Bug fix to the pre-unmount trim from #143.
trimFilesystemrantimeout <secs> sudo fstrim ...: the unprivilegedtimeoutcannot signal the root-ownedsudo/fstrimit spawned (EPERM), so the host budget never bounded the trim and a slow fstrim could outlive it and keep the buildkit mount busy at unmount.sudopassestimeout's exit 124 through, so thetimeoutoutcome classification insetup_builder.tsis unchanged. Verified on a runner image:timeout 2 sudo sleep 30leavessudo sleep 30running;sudo timeout 1 sleep 30exits 124 with the child gone.Start here:
src/main.ts(trimFilesystem).dist/is the regenerated bundle.No behavior change in prod today: every host still sends budget 0, so the trim is skipped before this command runs.
Checks:
pnpm lint,tsc --noEmit,pnpm test(64),pnpm build.Link to Devin session: https://app.devin.ai/sessions/2e17815c306b4c3cb7af4f6bce008a66
Open in Devin Desktop: https://app.devin.ai/desktop/session/2e17815c306b4c3cb7af4f6bce008a66?variant=devin
Requested by: @magma-beef
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.🟢 Devin Review found nothing to fix · View findings