go: runtime: syscall on macOS hangs and causes 100% CPU
What version of Go are you using (go version
)?
$ go version go1.19.5
The problem occurs with a pre-built version of Hugo.
Does this issue reproduce with the latest release?
Not yet tested (the prebuilt releases of Hugo us go1.19.5).
What operating system and processor architecture are you using (go env
)?
go env
Output
$ go env GO111MODULE="" GOARCH="arm64" GOBIN="" GOCACHE="/Users/pauljolly/Library/Caches/go-build" GOENV="/Users/pauljolly/Library/Application Support/go/env" GOEXE="" GOEXPERIMENT="" GOFLAGS="" GOHOSTARCH="arm64" GOHOSTOS="darwin" GOINSECURE="" GOMODCACHE="/Users/pauljolly/go/pkg/mod" GONOPROXY="" GONOSUMDB="" GOOS="darwin" GOPATH="/Users/pauljolly/go" GOPRIVATE="" GOPROXY="https://proxy.golang.org,direct" GOROOT="/opt/homebrew/Cellar/go/1.20.1/libexec" GOSUMDB="sum.golang.org" GOTMPDIR="" GOTOOLDIR="/opt/homebrew/Cellar/go/1.20.1/libexec/pkg/tool/darwin_arm64" GOVCS="" GOVERSION="go1.20.1" GCCGO="gccgo" AR="ar" CC="clang" CXX="clang++" CGO_ENABLED="1" GOMOD="/Users/pauljolly/tmp/cuelang.org/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 -fdebug-prefix-map=/var/folders/gs/_w_ys5tx43b255wkxwf67qy40000gp/T/go-build568172395=/tmp/go-build -gno-record-gcc-switches -fno-common"
What did you do?
Instead Hugo v0.108.0 extended from https://github.com/gohugoio/hugo/releases/download/v0.108.0/hugo_extended_0.108.0_darwin-universal.tar.gz.
Ran hugo
to build https://github.com/cue-lang/cuelang.org/tree/alpha.
What did you expect to see?
Hugo outputting to stdout that it is serving on localhost.
What did you see instead?
Process hanging, stuck at 100% CPU.
Here is a trace of the hugo
process:
https://gist.github.com/myitcv/3e5ad9823c202082949f8c72c230122c
Next steps on our side are to try and rebuild Hugo extended using Go tip, but any pointers/ideas in the meantime would be much appreciated.
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 1
- Comments: 15 (15 by maintainers)
Huh, well you certainly had a deep cgo stack, so that makes sense. I don’t fully understand why the program was hanging rather than crashing with a SIGSEGV on stack overflow, but that is OK.
Oops, I forgot to add git checkout of the release branch to the instructions above. I’ve edited to add it.