Repository navigation
post: run the fstrim timeout under sudo so it can stop fstrim - #149
Open
magma-beef wants to merge 1 commit into
Open
magma-beef wants to merge 1 commit into
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>
Contributor
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Summary
Bug fix to the pre-unmount trim from #147 (v1 line; #148 is the same fix on
release/v2).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 the timeout 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: hosts send budget 0, so the trim is skipped before this command runs.
Checks: lefthook pre-commit (prettier, eslint, tsc, build, dist diff).
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
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need. (Staging)