Go: a full run grows GOCACHE without bound (235 GB) and fills the disk
Maintainers usually reply within 3 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 53/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Domain
- devtools, testing-qa
Research direction
Start by reading the README's Go section and tracing how Go test runs are launched for mutation workers; the issue names target/mutation-workers/run-*/gocache as a possible run-scoped location. Compare documenting the workaround with managing a private cache and cleanup, then verify that a full run keeps disk use bounded and removes its cache when the run ends.
Written by the indexing model from the issue text.
Description
What happens
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 -cachewithGOCACHEset 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.
- Dominant language
- Python
- Stars
- 55
- Forks
- 7
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from unclebob/mutator
-
Difficulty 1/5 Under an hour Newbie friendliness 83/100
Maintainers usually reply within 3 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Maintainers usually reply within 3 days
-
Workers leave out source in a directory named build, out, dist, target or coverage, so every mutant is reported KILLEDPossibly taken @lohmag claimed this 2 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 3 days
-
A differential run can carry a killed outcome onto a surviving mutant and exit 0Possibly taken @andrewmolyuk claimed this today. Open
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Maintainers usually reply within 3 days
-
Edits made to the file under test during a run are reverted when the run endsPossibly taken @andrewmolyuk claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
Maintainers usually reply within 3 days
All issues in unclebob/mutator
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
pydantic/pydantic-ai#12091 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
CSS enhancement good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
pychess/pychess-variants#2448 ·
Maintainers usually reply within 1 day
-
Bump locked PyTensor so Apple clang 21 does not pass -ld64Possibly taken @drbenvincent claimed this today. Openbug dev ops
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Maintainers usually reply within 2 days
-
ai_p2 bug comp-datalake
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
ClickHouse/ClickHouse#128306 · 1 comment ·
Maintainers usually reply within 1 day