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: Breakpoint SIGSEGV on ppc64le #52101

Closed
alexsaezm opened this issue Apr 1, 2022 · 1 comment
Closed

runtime: Breakpoint SIGSEGV on ppc64le #52101

alexsaezm opened this issue Apr 1, 2022 · 1 comment
Labels
arch-ppc64x FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@alexsaezm
Copy link
Contributor

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

$ go version
go version go1.17.7 linux/ppc64le

Also happens in all versions.

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/centos/.cache/go-build"
GOENV="/home/centos/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="ppc64le"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/centos/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/centos/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/lib/golang"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/golang/pkg/tool/linux_ppc64le"
GOVCS=""
GOVERSION="go1.17.7"
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-build3945521704=/tmp/go-build -gno-record-gcc-switches"

What did you do?

In ppc64le, if you run the following code:

package main

import "runtime"

func main() {
	runtime.Breakpoint()
}

you get a SIGSEGV:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x68940]

goroutine 1 [running]:
runtime.Breakpoint(...)
	/usr/lib/golang/src/runtime/proc.go:4537
main.main()
	/home/centos/go/src/github.com/alexsaezm/test_go_breakpoint/main.go:6 +0x28

What did you expect to see?

A trap like in amd64.

What did you see instead?

a SIGSEGV.

alexsaezm added a commit to alexsaezm/go that referenced this issue Apr 1, 2022
Currently runtime.Breakpoint generates a SIGSEGV in ppc64.
The solution is an unconditional trap similar to what clang
and gcc do. It is documented in the section C.6 of the ABI Book 3.

Fixes golang#52101
@gopherbot
Copy link

Change https://go.dev/cl/397554 mentions this issue: Fix breakpoint ppc64x

alexsaezm added a commit to alexsaezm/go that referenced this issue Apr 1, 2022
Currently runtime.Breakpoint generates a SIGSEGV in ppc64.
The solution is an unconditional trap similar to what clang
and gcc do. It is documented in the section C.6 of the ABI Book 3.

Fixes golang#52101
alexsaezm added a commit to alexsaezm/go that referenced this issue Apr 1, 2022
Currently runtime.Breakpoint generates a SIGSEGV in ppc64.
The solution is an unconditional trap similar to what clang
and gcc do. It is documented in the section C.6 of the ABI Book 3.

Fixes golang#52101
@cherrymui cherrymui changed the title runtime.Breakpoint SIGSEGV in ppc64le runtime: Breakpoint SIGSEGV on ppc64le Apr 5, 2022
@cherrymui cherrymui added the NeedsFix The path to resolution is known, but the work has not been done. label Apr 5, 2022
@cherrymui cherrymui added this to the Unplanned milestone Apr 5, 2022
alexsaezm added a commit to alexsaezm/go that referenced this issue May 23, 2022
Currently runtime.Breakpoint generates a SIGSEGV in ppc64.
The solution is an unconditional trap similar to what clang
and gcc do. It is documented in the section C.6 of the ABI Book 3.

Fixes golang#52101
@golang golang locked and limited conversation to collaborators Jun 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-ppc64x FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants