-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/go: install/build doesn't remove temporary files when aborted #25808
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
Comments
I believe tmpfs will swap out to disk when memory is too low, but that's an orthogonal issue. /cc @ianlancetaylor , @rsc |
I can think of at least two ways we could address this:
|
Context is inappropriate here. We have context - the whole binary. |
(Even better, make one temporary directory and put all the others under it and then there's just one tree to remove.) |
what is blocking this issue from being resolved |
@szmcdull It hasn't been a high enough priority for anybody to work on it. Go is an open source project; would you be interested in taking a look and sending a fix? Thanks. |
Go version: go1.10 linux/amd64
I've noticed
go build
andgo install
don't remove temporary files in/tmp/go-*
when aborted with Ctrl-C.This is an issue with big programs (binary size ~1GB due to linking with a huge C/C++ library), because late in the linking process an intermediary file is created as big as the output file (probably it's the output file itself) that just stays in
/tmp
on atmpfs
. Aborting a few times at this stage in the build will quickly fill the RAM on a regular computer until the next reboot (or until manually removing all temporary files).It would be nice if the Go toolchain would remove it's own temporary files when aborted.
The text was updated successfully, but these errors were encountered: