Skip to content

runtime: segmentation violation while adjusting stack pointer #61728

@WAY29

Description

@WAY29

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

$ go version
go version go1.20.6 linux/amd64

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="on"
GOARCH="amd64"
GOBIN=""
GOCACHE="/root/.cache/go-build"
GOENV="/root/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/root/coding/golang/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/root/coding/golang"
GOPRIVATE=""
GOPROXY="https://goproxy.cn,direct"
GOROOT="/root/.go/go1.20.6"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/root/.go/go1.20.6/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="go1.20.6"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/dev/null"
GOWORK=""
CGO_CFLAGS="-O2 -g"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-O2 -g"
CGO_FFLAGS="-O2 -g"
CGO_LDFLAGS="-O2 -g"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build649550129=/tmp/go-build -gno-record-gcc-switches"

What did you do?

When I attempt to debug my project in VS Code by connecting to WSL2 using remote-wsl, I encounter a fatal error. The error occurs with a high probability, but it is not guaranteed to happen every time.

What did you expect to see?

Debug normally

What did you see instead?

"unexpected signal during runtime execution"
Stack:
	0  0x0000000000448720 in runtime.throw
	    at /root/.go/go1.20.6/src/runtime/panic.go:1040
	1  0x0000000000460865 in runtime.sigpanic
	    at /root/.go/go1.20.6/src/runtime/signal_unix.go:825
	2  0x000000000042c010 in runtime.scanstack
	    at /root/.go/go1.20.6/src/runtime/mgcmark.go:810
	3  0x000000000042acc5 in runtime.markroot.func1
	    at /root/.go/go1.20.6/src/runtime/mgcmark.go:239
	4  0x000000000042a979 in runtime.markroot
	    at /root/.go/go1.20.6/src/runtime/mgcmark.go:213
	5  0x000000000042cab8 in runtime.gcDrain
	    at /root/.go/go1.20.6/src/runtime/mgcmark.go:1069
	6  0x0000000000428aed in runtime.gcBgMarkWorker.func2
	    at /root/.go/go1.20.6/src/runtime/mgc.go:1367
	7  0x000000000047e409 in runtime.systemstack
	    at /root/.go/go1.20.6/src/runtime/asm_amd64.s:496
	8  0x00007f6b2bffe9ff in ???
	    at ?:-1
	    error: input/output error
	(truncated)

Metadata

Metadata

Assignees

Labels

NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.compiler/runtimeIssues related to the Go compiler and/or runtime.

Type

No type

Projects

Status

Todo

Relationships

None yet

Development

No branches or pull requests

Issue actions