Skip to content
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

cmd/dist: "moved GOROOT" test failing on freebsd-arm builder #29523

Closed
paulzhol opened this issue Jan 3, 2019 · 1 comment
Closed

cmd/dist: "moved GOROOT" test failing on freebsd-arm builder #29523

paulzhol opened this issue Jan 3, 2019 · 1 comment
Labels
Builders x/build issues (builders, bots, dashboards) FrozenDueToAge

Comments

@paulzhol
Copy link
Member

paulzhol commented Jan 3, 2019

##### moved GOROOT
failed to initialize build cache at /home/paulzhol/.cache/go-build: mkdir /home/paulzhol/.cache: read-only file system

example log: https://build.golang.org/log/6efc1e3b5937210f65aa18552a990cd733145b3c

$HOME (and /) are readonly, GOCACHE is set (twice) in the buildlet environment:

:: Running /tmp/workdir-host-freebsd-arm-paulzhol/go/src/make.bash with args ["/tmp/workdir-host-freebsd-arm-paulzhol/go/src/make.bash"] and env ["BLOCKSIZE=K" "MAIL=/var/mail/paulzhol" "PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/home/paulzhol/bin" "GO_TEST_TIMEOUT_SCALE=30" "CGO_ENABLED=1" "GOARM=7" "GOCACHE=/tmp/gocahe" "USER=paulzhol" "HOME=/home/paulzhol" "PWD=/" "RC_PID=21" "WORKDIR=/tmp/workdir-host-freebsd-arm-paulzhol" "GOROOT_BOOTSTRAP=/tmp/workdir-host-freebsd-arm-paulzhol/go1.4" "GO_BUILDER_NAME=freebsd-arm-paulzhol" "GOROOT_BOOTSTRAP=/usr/home/paulzhol/go1.4" "GOARM=7" "CGO_ENABLED=1" "GOBIN=" "TMPDIR=/tmp/workdir-host-freebsd-arm-paulzhol/tmp" "GOCACHE=/tmp/workdir-host-freebsd-arm-paulzhol/gocache"] in dir /tmp/workdir-host-freebsd-arm-paulzhol/go/src

@paulzhol paulzhol added the Builders x/build issues (builders, bots, dashboards) label Jan 3, 2019
@paulzhol
Copy link
Member Author

The moved_goroot test explicitly filters GOCACHE from the environment:

go/src/cmd/dist/test.go

Lines 529 to 533 in 7cbfa55

for _, e := range os.Environ() {
if !strings.HasPrefix(e, "GOROOT=") && !strings.HasPrefix(e, "GOCACHE=") {
cmd.Env = append(cmd.Env, e)
}
}

forcing the use of os.UserCacheDir() in cmd/go/internal/cache/default.go DefaultDir().

Switched to setting XDG_CACHE_HOME instead of GOCACHE for the buildlet environment.

@golang golang locked and limited conversation to collaborators Jan 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Builders x/build issues (builders, bots, dashboards) FrozenDueToAge
Projects
None yet
Development

No branches or pull requests

2 participants