Description
This probably seems a bit bizarre, and comes out of #56494 (comment) and #55955 (comment). I'm not sure how it's possible, I think it's a MacOS specific issue, possibly to do with ulimit -n
, which I understand may have been changed around go1.19.
Testing it is painful as my computer actually crashes as a result, and the project is private, but I'm happy to what I can to expose the issue or make a reproduction.
What version of Go are you using (go version
)?
go version devel go1.21-e007c515f3 Mon Apr 24 15:49:38 2023 +0000 darwin/arm64
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (go env
)?
GO111MODULE=""
GOARCH="arm64"
GOBIN=""
GOCACHE="/Users/anacrolix/Library/Caches/go-build"
GOENV="/Users/anacrolix/Library/Application Support/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="arm64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/anacrolix/go/pkg/mod"
GONOPROXY="github.com/anacrolix,github.com/some-company"
GONOSUMDB="github.com/anacrolix,github.com/some-company"
GOOS="darwin"
GOPATH="/Users/anacrolix/go"
GOPRIVATE="github.com/anacrolix,github.com/some-company"
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/Users/anacrolix/src/go.master"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/Users/anacrolix/src/go.master/pkg/tool/darwin_arm64"
GOVCS=""
GOVERSION="devel go1.21-e007c515f3 Mon Apr 24 15:49:38 2023 +0000"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/abs/path/to/go.mod"
GOWORK=""
CGO_CFLAGS="-O2 -g"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-O2 -g"
CGO_FFLAGS="-O2 -g"
CGO_LDFLAGS="-O2 -g"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -ffile-prefix-map=/var/folders/m4/f67w9zfx1pl386_2yjs7xtkm0000gn/T/go-build2760210553=/tmp/go-build -gno-record-gcc-switches -fno-common"
What did you do?
go mod tidy
What did you expect to see?
Nothing. Maybe a tidier go.mod and go.sum.
What did you see instead?
CPU is at 300-400% and memory climbs to ~400-500MiB over a few minutes then my computer switches off.