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

runtime: ppc64x binaries randomly segfault on linux 5.13rc6 #46803

Closed
pmur opened this issue Jun 17, 2021 · 4 comments
Closed

runtime: ppc64x binaries randomly segfault on linux 5.13rc6 #46803

pmur opened this issue Jun 17, 2021 · 4 comments

Comments

@pmur
Copy link
Contributor

@pmur pmur commented Jun 17, 2021

I am unable to build a toolchain using a linux 5.13rc6 kernel on Fedora 33. During the build process the host toolchain will randomly segfault.

This seems to be related to the switchover to a C compiled VDSO, which clobbers g (r30).

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

$ go version go1.15.12 linux/ppc64le

Does this issue reproduce with the latest release?

Yes

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

go env Output
$ go env
GO111MODULE=""
GOARCH="ppc64le"
GOBIN=""
GOCACHE="/home/murp/.cache/go-build"
GOENV="/home/murp/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="ppc64le"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/murp/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/murp/go"
GOPRIVATE=""
GOPROXY="direct"
GOROOT="/usr/lib/golang"
GOSUMDB="off"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/golang/pkg/tool/linux_ppc64le"
GCCGO="gccgo"
GOPPC64="power8"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/murp/git/go/src/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build511416598=/tmp/go-build -gno-record-gcc-switches"

What did you do?

./make.bash

Building Go cmd/dist using /usr/lib/golang. (go1.15.12 linux/ppc64le)
/usr/lib/golang/pkg/tool/linux_ppc64le/link: signal: segmentation fault (core dumped)

./make.bash -v

cmd/dist

Building Go toolchain1 using /usr/lib/golang.
math/bits
bootstrap/internal/unsafeheader
bootstrap/math/bits
bootstrap/internal/goexperiment
bootstrap/internal/goversion
bootstrap/internal/race
bootstrap/cmd/compile/internal/test
bootstrap/sort
math
bootstrap/container/heap
math/rand
strconv
bootstrap/strconv
crypto
io/ioutil
os/exec
regexp/syntax
reflect
regexp
encoding/binary
fmt
bootstrap/cmd/internal/sys
encoding/base64
crypto/sha1
crypto/sha256
crypto/md5
bootstrap/internal/buildcfg
bootstrap/cmd/internal/bio
flag
bootstrap/cmd/internal/src
bootstrap/cmd/internal/edit
bootstrap/cmd/internal/pkgpath
bootstrap/debug/dwarf
bootstrap/compress/flate
go/token
encoding/json
bootstrap/math/big
bootstrap/cmd/internal/objabi
net/url
go/scanner
bootstrap/cmd/internal/dwarf
bootstrap/cmd/asm/internal/flags
bootstrap/cmd/asm/internal/lex
go build bootstrap/cmd/internal/bio: /usr/lib/golang/pkg/tool/linux_ppc64le/compile: signal: segmentation fault (core dumped)
bootstrap/cmd/internal/gcprog
bootstrap/cmd/compile/internal/syntax
text/template/parse
go build bootstrap/compress/flate: /usr/lib/golang/pkg/tool/linux_ppc64le/compile: signal: segmentation fault (core dumped)
compress/flate
go build go/scanner: /usr/lib/golang/pkg/tool/linux_ppc64le/compile: signal: segmentation fault (core dumped)
go build encoding/json: /usr/lib/golang/pkg/tool/linux_ppc64le/compile: signal: segmentation fault (core dumped)
compress/gzip
go build bootstrap/math/big: /usr/lib/golang/pkg/tool/linux_ppc64le/compile: signal: segmentation fault (core dumped)
runtime/pprof
go build bootstrap/cmd/asm/internal/lex: /usr/lib/golang/pkg/tool/linux_ppc64le/compile: signal: segmentation fault (core dumped)
go build bootstrap/debug/dwarf: /usr/lib/golang/pkg/tool/linux_ppc64le/compile: signal: segmentation fault (core dumped)
bootstrap/cmd/link/internal/benchmark
go build bootstrap/cmd/compile/internal/syntax: /usr/lib/golang/pkg/tool/linux_ppc64le/compile: signal: segmentation fault (core dumped)
go tool dist: FAILED: /usr/lib/golang/bin/go install -gcflags=-l -tags=math_big_pure_go compiler_bootstrap -v bootstrap/cmd/...: exit status 1
@derekparker
Copy link
Contributor

@derekparker derekparker commented Jun 17, 2021

Loading

@pmur pmur changed the title runtime: ppc64x broken on linux 5.13rc6 runtime: ppc64x binaries randomly crash on linux 5.13rc6 Jun 17, 2021
@pmur pmur changed the title runtime: ppc64x binaries randomly crash on linux 5.13rc6 runtime: ppc64x binaries randomly segfault on linux 5.13rc6 Jun 17, 2021
@gopherbot
Copy link

@gopherbot gopherbot commented Jun 17, 2021

Change https://golang.org/cl/328110 mentions this issue: runtime: fix crash during VDSO calls on PowerPC

Loading

@gopherbot gopherbot closed this in 16e82be Jun 21, 2021
@pmur
Copy link
Contributor Author

@pmur pmur commented Jun 21, 2021

@gopherbot please consider a backport to 1.16 and 1.15. This is necessary for running any linux kernel version 5.13 or above.

Loading

@gopherbot
Copy link

@gopherbot gopherbot commented Jun 21, 2021

Backport issue(s) opened: #46857 (for 1.15), #46858 (for 1.16).

Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://golang.org/wiki/MinorReleases.

Loading

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

Successfully merging a pull request may close this issue.

4 participants