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: unexpected return pc for runtime.throw called from 0x3 on Ubuntu #59001

Closed
bep opened this issue Mar 13, 2023 · 7 comments
Closed

runtime: unexpected return pc for runtime.throw called from 0x3 on Ubuntu #59001

bep opened this issue Mar 13, 2023 · 7 comments
Assignees
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Milestone

Comments

@bep
Copy link
Contributor

bep commented Mar 13, 2023

See gohugoio/hugo#10830 for more details.

  • Test failure in GitHub actions test, ubuntu-latest and 1.20.x.
  • I have seen this in all Go 1.20 version.
  • I have not seen this in Go < 1.20
  • I have only seen this on Ubuntu.
  • It happens about 20% of the test runs.
Log Extract

signal SIGSEGV: segmentation violation code=0x2 addr=0x2498f12 pc=0x2981a20]

goroutine 13992 [running]:
runtime: g 13992: unexpected return pc for runtime.throw called from 0x3
stack: frame={sp:0x7f80e4efec90, fp:0x7f80e4efecc0} stack=[0xc001cab000,0xc001cac000)

runtime.throw({0x7f80e4efed08?, 0x549a1b?})
/opt/hostedtoolcache/go/1.20.2/x64/src/runtime/panic.go:1047 +0x5d fp=0x7f80e4efecc0 sp=0x7f80e4efec90 pc=0x51e41d
created by time.goFunc
/opt/hostedtoolcache/go/1.20.2/x64/src/time/sleep.go:176 +0x48

goroutine 1 [chan receive]:
runtime.gopark(0xc0003dd440?, 0xc001afaa30?, 0x55?, 0x9?, 0x5545ce?)
/opt/hostedtoolcache/go/1.20.2/x64/src/runtime/proc.go:381 +0xd6 fp=0xc0006bd620 sp=0xc0006bd600 pc=0x521156
runtime.chanrecv(0xc00004e690, 0x0, 0x1)
/opt/hostedtoolcache/go/1.20.2/x64/src/runtime/chan.go:583 +0x42e fp=0xc0006bd6b0 sp=0xc0006bd620 pc=0x4ed42e
runtime.chanrecv1(0xc000046660?, 0x0?)
/opt/hostedtoolcache/go/1.20.2/x64/src/runtime/chan.go:442 +0x18 fp=0xc0006bd6d8 sp=0xc0006bd6b0 pc=0x4ecf98
testing.tRunner.func1()
/opt/hostedtoolcache/go/1.20.2/x64/src/testing/testing.go:1542 +0x8eb fp=0xc0006bd8c0 sp=0xc0006bd6d8 pc=0x68d76b
runtime.deferreturn()
/opt/hostedtoolcache/go/1.20.2/x64/src/runtime/panic.go:476 +0x33 fp=0xc0006bd900 sp=0xc0006bd8c0 pc=0x51ce73
testing.tRunner(0xc00014c9c0, 0xc0005d7b48)
/opt/hostedtoolcache/go/1.20.2/x64/src/testing/testing.go:1582 +0x255 fp=0xc0006bda08 sp=0xc0006bd900 pc=0x68cd95
testing.runTests(0xc00060e8c0?, {0x51df0e0, 0x13a, 0x13a}, {0x1c?, 0x1e?, 0x53c31a0?})
/opt/hostedtoolcache/go/1.20.2/x64/src/testing/testing.go:2034 +0x87d fp=0xc0006bdb78 sp=0xc0006bda08 pc=0x691f7d
testing.(*M).Run(0xc00060e8c0)
/opt/hostedtoolcache/go/1.20.2/x64/src/testing/testing.go:1906 +0xb45 fp=0xc0006bded8 sp=0xc0006bdb78 pc=0x68f7e5
main.main()
_testmain.go:701 +0x2ea fp=0xc0006bdf80 sp=0xc0006bded8 pc=0x27dfc4a
runtime.main()
/opt/hostedtoolcache/go/1.20.2/x64/src/runtime/proc.go:250 +0x207 fp=0xc0006bdfe0 sp=0xc0006bdf80 pc=0x520d07
runtime.goexit()
/opt/hostedtoolcache/go/1.20.2/x64/src/runtime/asm_amd64.s:1598 +0x1 fp=0xc0006bdfe8 sp=0xc0006bdfe0 pc=0x5567a1

goroutine 2 [force gc (idle), 1 minutes]:
runtime.gopark(0x53c51c0?, 0x0?, 0x0?, 0x0?, 0x0?)
/opt/hostedtoolcache/go/1.20.2/x64/src/runtime/proc.go:381 +0xd6 fp=0xc00006c7b0 sp=0xc00006c790 pc=0x521156
runtime.goparkunlock(...)
/opt/hostedtoolcache/go/1.20.2/x64/src/runtime/proc.go:387
runtime.forcegchelper()
/opt/hostedtoolcache/go/1.20.2/x64/src/runtime/proc.go:305 +0xb0 fp=0xc00006c7e0 sp=0xc00006c7b0 pc=0x520f90
runtime.goexit()
/opt/hostedtoolcache/go/1.20.2/x64/src/runtime/asm_amd64.s:1598 +0x1 fp=0xc00006c7e8 sp=0xc00006c7e0 pc=0x5567a1
created by runtime.init.6
/opt/hostedtoolcache/go/1.20.2/x64/src/runtime/proc.go:293 +0x25

goroutine 3 [GC sweep wait]:
runtime.gopark(0x53c2901?, 0x53c2960?, 0xc?, 0x14?, 0x1?)
/opt/hostedtool

@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Mar 13, 2023
@seankhliao seankhliao added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Mar 13, 2023
@cherrymui
Copy link
Member

Could you share the information about the platform you're running on (architecture, environment, go env output)? Would it be possible to share a command that could reproduce this? Thanks.

runtime: g 13992: unexpected return pc for runtime.throw called from 0x3
stack: frame={sp:0x7f80e4efec90, fp:0x7f80e4efecc0} stack=[0xc001cab000,0xc001cac000)

Looks like the G and the stack doesn't match. Maybe it panics on the g0 stack and then throws?

@bep
Copy link
Contributor Author

bep commented Mar 14, 2023

Go Env
GO111MODULE="on"
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/runner/.cache/go-build"
GOENV="/home/runner/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/runner/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/runner/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org"
GOROOT="/opt/hostedtoolcache/go/1.[20](https://github.com/gohugoio/hugo/actions/runs/4415139076/jobs/7737725366#step:17:21).2/x64"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/opt/hostedtoolcache/go/1.20.2/x64/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="go1.20.2"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/runner/work/hugo/hugo/go.mod"
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-build1[29](https://github.com/gohugoio/hugo/actions/runs/4415139076/jobs/7737725366#step:17:30)20[40](https://github.com/gohugoio/hugo/actions/runs/4415139076/jobs/7737725366#step:17:41)891=/tmp/go-build -gno-record-gcc-switches"

This fails (most of the times):

git clone https://github.com/gohugoio/hugo.git
cd hugo
go test -count 6 -race ./... -tags extended

gohugoio/hugo#10833

@cherrymui cherrymui added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. and removed WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. labels Mar 22, 2023
@cherrymui cherrymui added this to the Go1.21 milestone Mar 22, 2023
@mknyszek mknyszek added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Mar 29, 2023
@prattmic
Copy link
Member

Could you also disassemble and see where the SIGSEGV PC is?

@cherrymui
Copy link
Member

I haven't been able to reproduce. I tried a few times running the command, with both Go 1.20 and tip. I saw some timeout or test failure, but not runtime throw. Does it always fail for you, or rarely?

I don't have a Ubuntu machine so I used a Debian one. Do you only see this on Ubuntu, or a specific version of Ubuntu? Thanks.

@bep
Copy link
Contributor Author

bep commented Apr 24, 2023

Does it always fail for you, or rarely?

It fails about 20% of the builds on GitHub with

  • ubuntu-latest image
  • go-version 1.20.x

And it still fails. I'm coming here from the GitHub console having to restart another build.

@bep
Copy link
Contributor Author

bep commented May 20, 2023

I have not seen this issue in a long time now, so for me this is fixed. This issue resolved itself I guess at the same time as I fixed a data race in the code, so there may be a connection there.,

@cherrymui
Copy link
Member

Thanks for the update. We can close this for now. If it happens again we can reopen. Thanks.

@golang golang locked and limited conversation to collaborators May 31, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

6 participants