You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Go: a full run grows GOCACHE without bound (235 GB) and fills the disk #17
A full run over a large Go codebase filled the disk. About 33,000 mutation sites in 65 packages ran for roughly 5 hours. Go's build cache (go env GOCACHE, ~/Library/Caches/go-build on macOS) grew to 235 GB. The disk reached 0 bytes free, and later packages failed with [Errno 28] No space left on device. Other processes on the machine failed too.
Why
Every mutant changes one source file, so go test compiles a new package archive and links a new test binary. Each binary is cached under a fresh key. With thousands of mutants per package, the cache grows by gigabytes per package and is never trimmed: Go's own trimming removes only entries unused for 5 days.
Workaround
Run with a private cache and remove it after each package:
GOCACHE=$PWD/target/gocache mutator ... ; go clean -cache
Suggestion
One of these, from simplest:
Mention the disk cost in the README's Go section, together with the workaround.
Give the mutant runs a cache under the run directory (target/mutation-workers/run-*/gocache), seeded from the user's cache or shared across workers, and delete it with the run.
Run go clean -cache with GOCACHE set to the private cache between files.
Option 2 keeps dependency builds warm within a run and bounds disk use to one run.
Environment
mutator a5a0cb8, Go 1.27.1, macOS arm64, --max-workers 14.
Activity