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

internal/poll: build failures during file copies from commit 40ced0c00b04a5b9832bb5b47c995c82854f26ae onward #54876

Closed
siebenmann opened this issue Sep 5, 2022 · 3 comments
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. FrozenDueToAge

Comments

@siebenmann
Copy link

What version of Go are you using (go version)?

The last working version is:

$ go version
go version devel go1.20-af7f417665 Mon Sep 5 08:08:24 2022 +0000 linux/amd64

Does this issue reproduce with the latest release?

No.

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/homes/hawklords/cks/.cache/go-build"
GOENV="/homes/hawklords/cks/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/homes/hawklords/cks/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/homes/hawklords/cks/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/data/code/go-lang/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/data/code/go-lang/go/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="devel go1.20-af7f417665 Mon Sep 5 08:08:24 2022 +0000"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/dev/null"
GOWORK=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -fdebug-prefix-map=/tmpfs/go-build2233105691=/tmp/go-build -gno-record-gcc-switches"

I am on 64-bit x86 Fedora Linux with kernel 5.19.4-200.fc36.x86_64. My TMP/TMPDIR is either an ext4 filesystem or a tmpfs filesystem, depending on the exact build setup, and the final install destination is on a ZFS filesystem.

I believe that this means that error checks on copy_file_range(2) aren't redundant because (apparently) not all filesystems support this.

What did you do?

Tried to build go with ./all.bash.

What did you expect to see?

A successful build.

What did you see instead?

Building Go cmd/dist using /data/code/go-lang/v1.19. (go1.19 linux/amd64)
Building Go toolchain1 using /data/code/go-lang/v1.19.
Building Go bootstrap cmd/go (go_bootstrap) using Go toolchain1.
Building Go toolchain2 using go_bootstrap and Go toolchain1.
go install internal/unsafeheader: copying /tmp/go-build1432901531/b007/_pkg_.a to /data/code/go-lang/go/pkg/linux_amd64/internal/unsafeheader.a: write /data/code/go-lang/go/pkg/linux_amd64/internal/unsafeheader.a: copy_file_range: invalid cross-device link
go install internal/goos: copying /tmp/go-build1432901531/b014/_pkg_.a to /data/code/go-lang/go/pkg/linux_amd64/internal/goos.a: write /data/code/go-lang/go/pkg/linux_amd64/internal/goos.a: copy_file_range: invalid cross-device link
go install internal/goarch: copying /tmp/go-build1432901531/b006/_pkg_.a to /data/code/go-lang/go/pkg/linux_amd64/internal/goarch.a: write /data/code/go-lang/go/pkg/linux_amd64/internal/goarch.a: copy_file_range: invalid cross-device link
go install internal/goexperiment: copying /tmp/go-build1432901531/b013/_pkg_.a to /data/code/go-lang/go/pkg/linux_amd64/internal/goexperiment.a: write /data/code/go-lang/go/pkg/linux_amd64/internal/goexperiment.a: copy_file_range: invalid cross-device link
[...]
@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Sep 5, 2022
@mvdan
Copy link
Member

mvdan commented Sep 5, 2022

See https://go-review.googlesource.com/c/go/+/428396, which has been waiting for reviews since the breakage happened in master.

@mfrw
Copy link
Contributor

mfrw commented Sep 6, 2022

Able to repro.

@mvdan
Copy link
Member

mvdan commented Sep 6, 2022

The revert is now merged.

@mvdan mvdan closed this as completed Sep 6, 2022
@golang golang locked and limited conversation to collaborators Sep 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. FrozenDueToAge
Projects
None yet
Development

No branches or pull requests

4 participants