x/build/cmd/gomote: gomote put overwrite of binary causes immediate SIGKILL on darwin #54132
Labels
Builders
x/build issues (builders, bots, dashboards)
FrozenDueToAge
NeedsFix
The path to resolution is known, but the work has not been done.
Milestone
gomote put
a binary to a darwin builder, run the binary, and thengomote 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.
The text was updated successfully, but these errors were encountered: