forge-test gate: keep GOCACHE off the virtiofs cache mount (Go mmap fails) #730
Labels
No labels
breaking
bug
documentation
enhancement
epic
good first issue
help wanted
refactoring
resolution/duplicate
resolution/invalid
resolution/wontfix
security
severity/critical
severity/high
severity/low
severity/medium
status/abandoned
status/blocked
status/needs-decision
status/needs-info
status/needs-verification
testing
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Blocks
#692 gate: run the forge tests only inside an Incus VM
sixfold-space/madtea
Reference
sixfold-space/madtea#730
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The forge-test Incus VM mounts a persistent host cache over virtiofs so caches survive the per-run snapshot reset. A Go build that points GOCACHE or GOMODCACHE at that mount fails: every import reports "could not import (no such device)" (ENXIO). Go memory-maps its cache artifacts and the virtiofs mount rejects mmap; a plain read of the same file works, so the failure looks like a filesystem fault rather than a build error.
In testing, a
go test -tags forgebuild with the caches on the VM's local disk passes; the same build with the caches on the virtiofs mount fails at import. The forge matrix passes end to end only with local-disk caches.What to do
The gate step that runs the forge tests in the VM must set GOCACHE and GOMODCACHE to a VM-local path, not the virtiofs cache mount. The downloaded forge binaries are executed, and the kernel memory-maps an executable, so they are likely to hit the same limit on virtiofs; keep the resolved-binary cache off the virtiofs mount too, or enable virtiofs DAX on the mount and confirm a build passes.
Acceptance
go test -tags forgein the VM with the build and module caches on VM-local disk, and it passes.Blocks #692.
Resolved. The persistent virtiofs cache mount this is about is gone. It was a stray
gocachedisk device (a host cache dir mounted at /cache); provision.sh now strips any device that is not the NIC or root disk and asserts the set. The runner keeps GOCACHE, GOMODCACHE, and the binary cache at the test user's $HOME on VM-local disk, andgo test -tags forge ./internal/testforge/...passes green in the VM (PR #760). ADR 0052 accepted that local-disk caches give up cross-run warming for a correct build, so no virtiofs cache mount is left to keep GOCACHE off.