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/coordinator: detect temp dir leaks #23619

Open
bradfitz opened this issue Jan 30, 2018 · 2 comments

Comments

@bradfitz
Copy link
Member

commented Jan 30, 2018

The build infrastructure could explicitly set $TMPDIR (or %TMP% on Windows) to an empty directory and at the end of a successful build check that the directory is still empty. If not, it could fail.

Or we could do it in cmd/dist test, perhaps optionally.

/cc @ianlancetaylor @alexbrainman

@gopherbot gopherbot added this to the Unreleased milestone Jan 30, 2018

@gopherbot gopherbot added the Builders label Jan 30, 2018

@alexbrainman

This comment has been minimized.

Copy link
Member

commented Jan 31, 2018

SGTM

Non Windows users might struggle if they do not know that you cannot delete running executable on Windows, you cannot delete opened file on Windows, you cannot remove directory if it is current directory on Windows and similar.

Alex

@bradfitz bradfitz changed the title x/build: detect temp dir leaks x/build/cmd/coordinator: detect temp dir leaks Mar 1, 2019

@bradfitz

This comment has been minimized.

Copy link
Member Author

commented Mar 1, 2019

The first part of this is done. https://go-review.googlesource.com/c/144637 in Oct 2018 set $TMPDIR to $WORKDIR/tmp.

Now we need to make the coordinator do the $WORKDIR/tmp scan at the end of a successful build.

This bug is about modifying the coordinator to do that. Bug #30500 is about fixing the resulting problems. We'll probably need a way to make the trybot behavior opt-in for a bit while we clean up the tree.

/cc @bsiegert

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.