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

compiling with go1.17rc1 make a binary that fatal with SIGSEGV #47279

Closed
urbanishimwe opened this issue Jul 19, 2021 · 7 comments
Closed

compiling with go1.17rc1 make a binary that fatal with SIGSEGV #47279

urbanishimwe opened this issue Jul 19, 2021 · 7 comments
Labels
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.

Comments

@urbanishimwe
Copy link

urbanishimwe commented Jul 19, 2021

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

$ go version
go version go1.17rc1 darwin/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=""
GOARCH="amd64"
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/Users/user/go-darwin-amd64-bootstrap"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOVCS=""
GOVERSION="go1.17rc1"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
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"
GOGCCFLAGS="-fPIC -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/7w/flrplbwd0jg9lfhwcwjxvc_80000gn/T/go-build3902858131=/tmp/go-build -gno-record-gcc-switches -fno-common"
GOROOT/bin/go version: go version go1.17rc1 darwin/amd64
GOROOT/bin/go tool compile -V: compile version go1.17rc1
uname -v: Darwin Kernel Version 20.5.0: Sat May  8 05:10:33 PDT 2021; root:xnu-7195.121.3~9/RELEASE_X86_64
ProductName:	macOS
ProductVersion:	11.4
BuildVersion:	20F71
lldb --version: lldb-1205.0.27.3
Apple Swift version 5.4 (swiftlang-1205.0.26.9 clang-1205.0.19.55)

What did you do?

I compiled a Go source code with go1.17rc1!

What did you expect to see?

I expected the resulted binary to run successfully just like when compiled with go1.16.5

What did you see instead?

running the binary:

fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0xb01dfacedebac1e pc=0x7fff2057acbe]

runtime stack:
runtime: unexpected return pc for runtime.sigpanic called from 0x7fff2057acbe
stack: frame={sp:0x7ffeefbff918, fp:0x7ffeefbff968} stack=[0x7ffeefb809b8,0x7ffeefbffa20)
0x00007ffeefbff818:  0x01007ffeefbff838  0x0000000000000004 
0x00007ffeefbff828:  0x000000000000001f  0x00007fff2057acbe 
0x00007ffeefbff838:  0x0b01dfacedebac1e  0x0000000000000001 
0x00007ffeefbff848:  0x0000000004039e11 <runtime.throw+0x0000000000000071>  0x00007ffeefbff8e8 
0x00007ffeefbff858:  0x0000000005232c17  0x00007ffeefbff8a0 
0x00007ffeefbff868:  0x000000000403a0c8 <runtime.fatalthrow.func1+0x0000000000000048>  0x00000000061d74a0 
0x00007ffeefbff878:  0x0000000000000001  0x0000000000000001 
0x00007ffeefbff888:  0x00007ffeefbff8e8  0x0000000004039e11 <runtime.throw+0x0000000000000071> 
0x00007ffeefbff898:  0x00000000061d74a0  0x00007ffeefbff8d8 
0x00007ffeefbff8a8:  0x000000000403a050 <runtime.fatalthrow+0x0000000000000050>  0x00007ffeefbff8b8 
0x00007ffeefbff8b8:  0x000000000403a080 <runtime.fatalthrow.func1+0x0000000000000000>  0x00000000061d74a0 
0x00007ffeefbff8c8:  0x0000000004039e11 <runtime.throw+0x0000000000000071>  0x00007ffeefbff8e8 
0x00007ffeefbff8d8:  0x00007ffeefbff908  0x0000000004039e11 <runtime.throw+0x0000000000000071> 
0x00007ffeefbff8e8:  0x00007ffeefbff8f0  0x0000000004039e40 <runtime.throw.func1+0x0000000000000000> 
0x00007ffeefbff8f8:  0x0000000005244567  0x000000000000002a 
0x00007ffeefbff908:  0x00007ffeefbff958  0x0000000004050436 <runtime.sigpanic+0x0000000000000396> 
0x00007ffeefbff918: <0x0000000005244567  0x0000000004042cde <runtime.checkTimers+0x000000000000005e>
...
@thanm thanm added 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. labels Jul 19, 2021
@thanm
Copy link
Contributor

thanm commented Jul 19, 2021

Thanks for reporting, @urbanishimwe .

Could you please include instructions for reproducing the problem, e.g. what application you built and how you ran it when you encountered this crash? Thanks.

@cherrymui
Copy link
Member

@urbanishimwe is your code using the golang.org/x/sys repo? If so, could you try updating that repo? (See #46645) Thanks.

@urbanishimwe
Copy link
Author

@cherrymui it seems to update golang.org/x/sys(v0.0.0-20201101102859-da207088b7d1 => v0.0.0-20210630005230-0f9fa26af87c) fixes the issue!

@cherrymui
Copy link
Member

Thanks for confirming.

@mooxiu
Copy link

mooxiu commented Aug 17, 2021

$go version
go version go1.17 darwin/amd64

I'm using go1.17 from https://golang.org/doc/install and encountering the exact same problem when running a test.

@davecheney
Copy link
Contributor

@MuyaoXiao try go get -u golang.org/x/sys

@mooxiu
Copy link

mooxiu commented Aug 17, 2021

go get -u golang.org/x/sys

Thank you! I missed out the comment above, silly me!

@golang golang locked as resolved and limited conversation to collaborators Aug 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
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

5 participants