go: cmd/link: crashes on ppc64le and others

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

go version devel +9ef9765c16 Tue Jun 12 11:08:14 2018 +0000 linux/ppc64le

Does this issue reproduce with the latest release?

Affects master, bisected and the issues started with commit

[bd83774593bca66cc899d5180c77680bc907fab8] cmd/link: separate virtual address layout from file layout

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

GOARCH="ppc64le"
GOBIN=""
GOCACHE="/root/.cache/go-build"
GOEXE=""
GOHOSTARCH="ppc64le"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/root/go"
GORACE=""
GOROOT="/usr/lib/golang"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/golang/pkg/tool/linux_ppc64le"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
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-build008088815=/tmp/go-build -gno-record-gcc-switches"

What did you do?

git clone https://github.com/golang/go
cd go/src
GOROOT_BOOTSTRAP=/usr/lib/golang ./all.bash

What did you expect to see?

Build/Bootstrap of GC(all.bash) passing

What did you see instead?

Building Go cmd/dist using /usr/lib/golang/.
Building Go toolchain1 using /usr/lib/golang/.
Building Go bootstrap cmd/go (go_bootstrap) using Go toolchain1.
Building Go toolchain2 using go_bootstrap and Go toolchain1.
go tool dist: FAILED: /root/go/pkg/tool/linux_ppc64le/go_bootstrap install -gcflags=all= -ldflags=all= -i cmd/asm cmd/cgo cmd/compile cmd/link: signal: segmentation fault

Notes

Doesn’t seems to be related to the boostrap compiler as have been using 9ef9765c16 for bisect and also tried few builds with go1.10 and go1.9, this issue seems to span all Fedora releases.

CC’ed @laboger

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 15 (14 by maintainers)

Most upvoted comments

@laboger, @tklauser, we do indeed compile for ppc64 on trybots, but it’s cross-compiled from Linux, not run on real ppc64 hardware, which seems to be the issue here. Looks like it does cross-compile fine from Linux.

The definition from x/build/dashboard/builders.go is:

        addMiscCompile := func(suffix, rx string) { 
                addBuilder(BuildConfig{ 
                        Name:        "misc-compile" + suffix, 
                        HostType:    "host-linux-jessie", 
                        TryBot:      true, 
                        TryOnly:     true, 
                        CompileOnly: true, 
                        Notes:       "Runs buildall.sh to cross-compile std packages for " + rx + ", but doesn't run any tests.",
                        allScriptArgs: []string{
                                // Filtering pattern to buildall.bash:                                                                                                                
                                rx,
                        },
                })
        }
        addMiscCompile("", "^(linux-arm64|linux-s390x|solaris-amd64|darwin-386)$") // 4 ports                                                                                         
        addMiscCompile("-mobile", "(^android|darwin-arm64)")                       // 5 ports                                                                                         
        addMiscCompile("-nacl", "^nacl")                                           // 3                                                                                               
        addMiscCompile("-mips", "^linux-mips")                                     // 4                                                                                               
        addMiscCompile("-ppc", "^linux-ppc64")                                     // 2                                                                                               
        addMiscCompile("-plan9", "^plan9-")                                        // 3                                                                                               
        addMiscCompile("-freebsd", "^freebsd-")                                    // 3                                                                                               
        addMiscCompile("-netbsd", "^netbsd-")                                      // 3                                                                                               
        addMiscCompile("-openbsd", "^openbsd-")                                    // 3                                                                                               

Again, the goal of TryBots is to be fast and have decent coverage to catch most mistakes, but not all.