Skip to content

fmt: windows go1.24.0 could not import reflect (can't find export data (bufio: buffer full)) #71933

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

Closed
quentin-k opened this issue Feb 24, 2025 · 8 comments

Comments

@quentin-k
Copy link

Go version

go version go1.24.0 windows/amd64

Output of go env in your module/workspace:

set AR=ar
set CC=gcc
set CGO_CFLAGS=-O2 -g
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-O2 -g
set CGO_ENABLED=0
set CGO_FFLAGS=-O2 -g
set CGO_LDFLAGS=-O2 -g
set CXX=g++
set GCCGO=gccgo
set GO111MODULE=
set GOAMD64=v1
set GOARCH=amd64
set GOAUTH=netrc
set GOBIN=
set GOCACHE=C:\Users\REDACTED\AppData\Local\go-build
set GOCACHEPROG=
set GODEBUG=
set GOENV=C:\Users\REDACTED\AppData\Roaming\go\env
set GOEXE=.exe
set GOEXPERIMENT=
set GOFIPS140=off
set GOFLAGS=
set GOGCCFLAGS=-m64 -fno-caret-diagnostics -Qunused-arguments -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=C:\Users\REDACTED\AppData\Local\Temp\go-build4059615952=/tmp/go-build -gno-record-gcc-switches
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GOMOD=C:\Users\REDACTED\source\go\hello\go.mod
set GOMODCACHE=C:\Users\REDACTED\go\pkg\mod
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=C:\Users\REDACTED\go
set GOPRIVATE=
set GOPROXY=https://proxy.golang.org,direct
set GOROOT=C:\Program Files\Go
set GOSUMDB=sum.golang.org
set GOTELEMETRY=local
set GOTELEMETRYDIR=C:\Users\REDACTED\AppData\Roaming\go\telemetry
set GOTMPDIR=
set GOTOOLCHAIN=auto
set GOTOOLDIR=C:\Program Files\Go\pkg\tool\windows_amd64
set GOVCS=
set GOVERSION=go1.24.0
set GOWORK=
set PKG_CONFIG=pkg-config

What did you do?

I was working on a project and go failed to compile the program with an error in internal/fmtsort and internal/filepathlite. I reproduced the issue with the following code saved as hello.go

package main

import (
	"fmt"
)

func main() {
	fmt.Printf("Hello\n")
}

I tried with go1.23.6 and on go.dev/play it compiled just fine.

What did you see happen?

go build hello.go

internal/fmtsort

C:\Program Files\Go\src\internal\fmtsort\sort.go:13:2: could not import reflect (can't find export data (bufio: buffer full))
C:\Program Files\Go\src\internal\fmtsort\sort.go:136:1: missing return

internal/filepathlite

C:\Program Files\Go\src\internal\filepathlite\path.go:14:2: could not import io/fs (can't find export data (bufio: buffer full))

What did you expect to see?

no errors

@seankhliao
Copy link
Member

that looks like you have a corrupted installation of go.

@seankhliao seankhliao closed this as not planned Won't fix, can't repro, duplicate, stale Feb 24, 2025
@ianlancetaylor
Copy link
Member

Try removing the entire previous installation and reinstalling.

@quentin-k
Copy link
Author

I've tried doing that by running the uninstaller as well as by removing the go directory in my home dir then re-running the installer and it still doesn't work. I tried installing it in windows sandbox to see if it was an issue with the installer I downloaded and it works just fine when I installed it there.

@ianlancetaylor
Copy link
Member

I don't know what is happening, but nobody else is reporting this problem, and you yourself are able to make it work in a sandbox. There must be something specific about the system you are using. For example, maybe it's low on disk space. I don't think we're going to be able to help you. Do let us know if you can reproduce the problem on a different system. Sorry.

@thediveo
Copy link
Contributor

"security" software is also a constant source of corruption, in more than one meaning.

@quentin-k
Copy link
Author

I tried putting it on a dev drive and disabling security tools on said drive and it still didn't work, even with the source code in the dev drive as well. I have plenty of storage available and resource utilization is low so I don't think those are causing an issue with corruption. As far as I understand, putting the install onto a dev drive should isolate it from any components that might've caused corruption. Even an exclusion on the go install path when it was not on a dev drive still had corruption. I know it is likely an issue with my system setup but am confused as to where the issue lies. go1.23.6 does work which adds more confusion.

@thediveo
Copy link
Contributor

That could point to the exception rules for "defender" because to my limited understanding devdrive comes with a set of exception rules, but with tools changing that will always be outdated.

@quentin-k
Copy link
Author

go 1.24.1 fixes the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants