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 · 3 comments
Open

x/build/cmd/coordinator: detect temp dir leaks #23619

bradfitz opened this issue Jan 30, 2018 · 3 comments
Labels
Milestone

Comments

@bradfitz
Copy link
Contributor

@bradfitz bradfitz 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
@alexbrainman
Copy link
Member

@alexbrainman alexbrainman 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

Loading

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

@bradfitz bradfitz 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

Loading

@bradfitz
Copy link
Contributor Author

@bradfitz bradfitz commented Dec 5, 2019

More temp dir leaks were manually found in https://go-review.googlesource.com/c/go/+/209970

Loading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants