Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/build/cmd/gomote: gomote put overwrite of binary causes immediate SIGKILL on darwin #54132

Closed
prattmic opened this issue Jul 29, 2022 · 1 comment
Assignees
Labels
Builders x/build issues (builders, bots, dashboards) FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@prattmic
Copy link
Member

gomote put a binary to a darwin builder, run the binary, and then gomote put a different build overwriting that binary. Now attempting to run this binary will result in an immediate SIGKILL.

This is because the binary has a code signature, which the kernel caches when the binary runs. Overwriting the binary changes the signature but the kernel doesn't invalidate the cache. The mismatch causes immediate SIGKILL.

Removing the original file and adding a new one rather than overwriting it does clear the cache and solve the problem.

We could adjust the buildlet to unlink first rather than using O_TRUNC when putting new files in order to handle this automatically for gomote.

@prattmic prattmic added this to the Unreleased milestone Jul 29, 2022
@prattmic prattmic self-assigned this Jul 29, 2022
@gopherbot gopherbot added the Builders x/build issues (builders, bots, dashboards) label Jul 29, 2022
@gopherbot
Copy link

Change https://go.dev/cl/420218 mentions this issue: cmd/buildlet: remove files rather than truncate on darwin

@dmitshur dmitshur added the NeedsFix The path to resolution is known, but the work has not been done. label Aug 1, 2022
@golang golang locked and limited conversation to collaborators Aug 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Builders x/build issues (builders, bots, dashboards) FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

3 participants