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

fixedbugs/bug513.go fails on ppc64le with go 1.17.2 #49066

Closed
nmeum opened this issue Oct 19, 2021 · 5 comments
Closed

fixedbugs/bug513.go fails on ppc64le with go 1.17.2 #49066

nmeum opened this issue Oct 19, 2021 · 5 comments
Labels
arch-ppc64x FrozenDueToAge RaceDetector WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Milestone

Comments

@nmeum
Copy link

nmeum commented Oct 19, 2021

I am currently working on upgrading the Alpine Linux Go package from 1.17.1 to 1.17.2. At Alpine, we run the Go testsuite as part of our package. With 1.17.2 the test suite fails only on the ppc64le architecture which is weird because our buildlogs indicate that it passed successfully with 1.17.1 on ppc64le. The test that fails is fixedbugs/bug513.go and as far as I can tell the test case itself has not been modified in the 1.17.2 release which leads me to believe that this might have regressed with 1.17.2. More information below.

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

$ go version
go version go1.17.2 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/buildozer/.cache/go-build"
GOENV="/home/buildozer/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="ppc64le"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/buildozer/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/buildozer/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/home/buildozer/aports/community/go/src/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/home/buildozer/aports/community/go/src/go/pkg/tool/linux_ppc64le"
GOVCS=""
GOVERSION="go1.17.2"
GCCGO="gccgo"
GOPPC64="power8"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/dev/null"
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-build2007078828=/tmp/go-build -gno-record-gcc-switches

What did you do?

I build Go 1.17.2 as one would normally using ./make.bash and ran the fixedbugs/bug513.go test case as follows:

go/test $ ../bin/go run run.go -- fixedbugs/bug513.go

What did you expect to see?

A successful test run.

What did you see instead?

I consistently get the following test failure:

output should be empty when (optional) expected-output file fixedbugs/bug513.out is not present. Instead saw
FATAL: ThreadSanitizer CHECK failed: ./gotsan.cpp:14506 "((personality(old_personality | ADDR_NO_RANDOMIZE))) != ((-1))" (0xffffffffffffffff, 0xffffffffffffffff)

FAIL    fixedbugs/bug513.go     4.985s
exit status 1
algitbot pushed a commit to alpinelinux/aports that referenced this issue Oct 19, 2021
@cherrymui
Copy link
Member

Yeah, I don't see any change in Go 1.17.2 could cause that. The failure comes from ThreadSanitizer itself, and seems to be related to ASLR. Do you have any changes on your machine/environment related to ASLR? Does the test pass with Go 1.17.1 on the same machine/environment? Thanks.

@cherrymui cherrymui added WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. arch-ppc64x RaceDetector labels Oct 19, 2021
@nmeum
Copy link
Author

nmeum commented Oct 20, 2021

Does the test pass with Go 1.17.1 on the same machine/environment?

Interesting, the 1.17.1 test does in fact fail on the same machine as well.

The failure comes from ThreadSanitizer itself, and seems to be related to ASLR. Do you have any changes on your machine/environment related to ASLR?

Not sure, we build Go in Docker/LXC containers the test fails in both. The Kernel version between the successful 1.17.1 build in September and the build now will likely differ. Is there anything else that needs to be taken into consideration in regards to ASLR? Is there any way to further debug why this test case is failing (independent of attempting to figuring out relevant changes to the environment)? Unfortunately I am personally I am not familiar with Go runtime internals myself.

@cherrymui
Copy link
Member

The error is from ThreadSanitizer (not the Go runtime). It probably requires ASLR disabled. https://github.com/llvm/llvm-project/blob/main/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp#L2158

@seankhliao seankhliao added WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. and removed WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. labels Aug 20, 2022
@seankhliao seankhliao added this to the Unplanned milestone Aug 20, 2022
@gopherbot
Copy link

Timed out in state WaitingForInfo. Closing.

(I am just a bot, though. Please speak up if this is a mistake or you have the requested information.)

@laboger
Copy link
Contributor

laboger commented Sep 20, 2022

This could be the same problem as in #35547. When running in a container, if ASLR is active, the thread sanitizer code tries to disable it on ppc64le. But the container might not have the permissions to do the syscall that to disable ASLR. There is a way to override that in the container as is described in this issue.

@golang golang locked and limited conversation to collaborators Sep 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-ppc64x FrozenDueToAge RaceDetector WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

5 participants