Skip to content

misc/cgo/testshared: shared libs tests fail on arm64 with segmentation fault  #28334

Closed
@kyoukim

Description

@kyoukim

Please answer these questions before submitting your issue. Thanks!

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

1.9.4, 1.10.3, 1.11.1, and perhaps more

Does this issue reproduce with the latest release?

Yes

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

GOARCH="arm64"
GOBIN=""
GOEXE=""
GOHOSTARCH="arm64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/aion1223/go"
GORACE=""
GOROOT="/usr/lib/golang"
GOTOOLDIR="/usr/lib/golang/pkg/tool/linux_arm64"
GCCGO="gccgo"
CC="gcc"
GOGCCFLAGS="-fPIC -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build048848957=/tmp/go-build -gno-record-gcc-switches"
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"

What did you do?

git clone https://github.com/golang/go go
cd go/src
git fetch --all
git checkout -b mygolang 'git rev-list -n 1 go1.11.1'
./all.bash

I have tried go1.11.1 and go1.10.3 in the same way.

What did you expect to see?

The build process terminates successfully after passing all the tests

What did you see instead?

../misc/cgo/testshared
--- FAIL: TestTrivialExecutable (3.33s)
shared_test.go:41: executing ./bin/trivial (trivial executable) failed signal: segmentation fault (core dumped):
--- FAIL: TestDivisionExecutable (0.59s)
shared_test.go:41: executing ./bin/division (division executable) failed signal: segmentation fault (core dumped):
--- FAIL: TestCgoExecutable (1.15s)
shared_test.go:41: executing ./bin/execgo (cgo executable) failed signal: segmentation fault (core dumped):
--- FAIL: TestGopathShlib (3.47s)
shared_test.go:41: executing ./bin/exe (executable linked to GOPATH library) failed signal: segmentation fault (core dumped):
--- FAIL: TestTwoGopathShlibs (3.42s)
shared_test.go:41: executing ./bin/exe2 (executable linked to GOPATH library) failed signal: segmentation fault (core dumped):
--- FAIL: TestThreeGopathShlibs (5.23s)
shared_test.go:41: executing ./bin/exe3 (executable linked to GOPATH library) failed signal: segmentation fault (core dumped):
--- FAIL: TestABIChecking (3.08s)
shared_test.go:861: exe failed, but without line "abi mismatch detected between the executable and libdepBase.so"; got output:
--- FAIL: TestImplicitInclusion (1.35s)
shared_test.go:41: executing ./bin/implicitcmd (running executable linked against library that contains same package as it) failed signal: segmentation fault (core dumped):
--- FAIL: TestInterface (1.93s)
shared_test.go:41: executing ./bin/iface (running type/itab uniqueness tester) failed signal: segmentation fault (core dumped):
--- FAIL: TestGlobal (1.33s)
shared_test.go:41: executing ./bin/global (global executable) failed signal: segmentation fault (core dumped):
2018/10/23 10:44:37 executing go test -installsuffix=8674665223082153551 -linkshared -test.short sync/atomic failed exit status 1:
signal: segmentation fault (core dumped)
FAIL sync/atomic 0.088s
exit status 1
FAIL _/home/aion1223/go/misc/cgo/testshared 43.680s

misc/cgo/testshared failed with segmentation fault. Yes, it exactly looks like the following link:
#24873
However, unlike the issue, my issue is reproducible with all versions of go I know. My issue is reproducible only on Oracle Linux 7.5 for ARM64, which is available as a docker image. I could not reproduce it with the golang:1.11.1 docker container available in Debian. I did see the fix of 24873 is already in the go1.11.1 source code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions