-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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
all: repeatedly running all.bash in an unchanged tree grows the Go build cache without limit #61484
Comments
Just a note that every 24 hours the cache is checked for old entries, and entries that are older than 5 days are deleted. So in the long run there is a limit. But it does seem odd that running all.bash with the same sources would increase the cache size. |
@siebenmann, some questions:
|
Specifically, I wonder if that ~200 MB of data per run is due to caching packages built from within test temp directories. If so, maybe some tests should be updated to build with |
(There may be a |
This growth doesn't happen with just 'make.bash' (which only seems to use 455 MBytes or so from a clean cache). Running In terms of the cache's growth rate versus periodic trimming, the cache size can reach hundreds of GBytes (I saw over 350 GB) if you're running 'all.bash' in a loop repeatedly. |
Huh. Could you file a separate issue for the failures you observe from that? (It ought to work.) |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
This issue doesn't reproduce when building Go 1.20.6 from a 'git checkout go1.20.6' in the source tree.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
The first all.bash from source will create about 2.3 GB of Go build cache. Subsequent all.bash runs appear to increase this by about 200 Mbytes each time. If you repeatedly build for long enough (if, for example, you're using this as a little stress test on a new system), this will fill up your $HOME with hundreds of GBytes of ~/.cache/go-build. 'go clean -cache' cleans it all away.
The text was updated successfully, but these errors were encountered: