Skip to content

cmd/dist/dist: random build failures on bcachefs #73938

Open
@stintel

Description

@stintel

Go version

go version go1.24.2 linux/arm64

Output of go env in your module/workspace:

AR='ar'
CC='aarch64-unknown-linux-gnu-gcc'
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_ENABLED='1'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
CXX='aarch64-unknown-linux-gnu-g++'
GCCGO='gccgo'
GO111MODULE=''
GOARCH='arm64'
GOARM64='v8.0'
GOAUTH='netrc'
GOBIN=''
GOCACHE='/home/staff/stijn/.cache/go-build'
GOCACHEPROG=''
GODEBUG=''
GOENV='/home/staff/stijn/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFIPS140='off'
GOFLAGS=''
GOGCCFLAGS='-fPIC -pthread -fmessage-length=0 -ffile-prefix-map=/tmp/go-build1289792922=/tmp/go-build -gno-record-gcc-switches'
GOHOSTARCH='arm64'
GOHOSTOS='linux'
GOINSECURE=''
GOMOD='/build/go/src/go.mod'
GOMODCACHE='/home/staff/stijn/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='linux'
GOPATH='/home/staff/stijn/go'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/usr/lib/go'
GOSUMDB='sum.golang.org'
GOTELEMETRY='local'
GOTELEMETRYDIR='/home/staff/stijn/.config/go/telemetry'
GOTMPDIR=''
GOTOOLCHAIN='local'
GOTOOLDIR='/usr/lib/go/pkg/tool/linux_arm64'
GOVCS=''
GOVERSION='go1.24.2'
GOWORK=''
PKG_CONFIG='pkg-config'

What did you do?

I'm experiencing random build failures when trying to build go on a bcachefs filesystem. There are also reports of go-based software failing to build on bcachefs.

koverstreet/bcachefs#803
https://bugs.gentoo.org/953025

What did you see happen?

Build sometimes fails with go: unlinkat /build/go-build3469699815/b147: directory not empty, but I've seen other random failures. This can be seen in the bcachefs upstream bug report.

Build sometimes fails with > google.golang.org/protobuf v1.35.1: dir has been modified (/var/tmp/portage/app-containers/docker-compose-2.32.3/work/go-mod/google.golang.org/[email protected]

I've also seen it fail like this:

++ ./cmd/dist/dist bootstrap -a -d --no-banner
Building Go toolchain1 using /usr/lib/go.
Building Go bootstrap cmd/go (go_bootstrap) using Go toolchain1.
/home/staff/stijn/go/src/go/build/build.go:1495:9: undefined: readGoInfo
/home/staff/stijn/go/src/go/build/build.go:1501:22: undefined: readComments
/home/staff/stijn/go/src/go/build/build.go:2057:15: undefined: getToolDir

What did you expect to see?

I expected go or the go-based to build normally.

I'm willing to spend time on tracking this down, but I'd appreciate some pointers where to start looking. I have never looked at the go build system code before. Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Buildersx/build issues (builders, bots, dashboards)WaitingForInfoIssue is not actionable because of missing required information, which needs to be provided.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions