Skip to content

SIGSEGV running application using go 1.17 #48212

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

Closed
danieldonoghue opened this issue Sep 6, 2021 · 1 comment
Closed

SIGSEGV running application using go 1.17 #48212

danieldonoghue opened this issue Sep 6, 2021 · 1 comment

Comments

@danieldonoghue
Copy link

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

$ go version
go version go1.17 darwin/amd64

$ brew --version
Homebrew 3.2.10-69-gfaa56d2

Does this issue reproduce with the latest release?

yes; works with go 1.16.4

What operating system and processor architecture are you using (go env)?

darwin/amd64

go env Output
$ go env

GO111MODULE="auto"
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/daniel/Library/Caches/go-build"
GOENV="/Users/daniel/Library/Application Support/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/daniel/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/daniel/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/Cellar/go/1.17/libexec"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.17/libexec/pkg/tool/darwin_amd64"
GOVCS=""
GOVERSION="go1.17"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/daniel/new.freespee/ari-call-handler/go.mod"
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/8r/019j0fzx22b6y745vld0g9hr0000gn/T/go-build3554680162=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

$ go build
$ ./call-handler

What did you expect to see?

output from built application

What did you see instead?

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

runtime stack:
runtime: unexpected return pc for runtime.sigpanic called from 0x7fff204e9c9e
stack: frame={sp:0x7ffeefbff778, fp:0x7ffeefbff7c8} stack=[0x7ffeefb80818,0x7ffeefbff880)
0x00007ffeefbff678:  0x01007ffeefbff698  0x0000000000000004
0x00007ffeefbff688:  0x000000000000001f  0x00007fff204e9c9e
0x00007ffeefbff698:  0x0b01dfacedebac1e  0x0000000000000001
0x00007ffeefbff6a8:  0x0000000004036691   0x00007ffeefbff748
0x00007ffeefbff6b8:  0x00000000046cf002  0x00007ffeefbff700
0x00007ffeefbff6c8:  0x0000000004036948   0x0000000004c1c900
0x00007ffeefbff6d8:  0x0000000000000001  0x0000000000000001
0x00007ffeefbff6e8:  0x00007ffeefbff748  0x0000000004036691 
0x00007ffeefbff6f8:  0x0000000004c1c900  0x00007ffeefbff738
0x00007ffeefbff708:  0x00000000040368d0   0x00007ffeefbff718
0x00007ffeefbff718:  0x0000000004036900   0x0000000004c1c900
0x00007ffeefbff728:  0x0000000004036691   0x00007ffeefbff748
0x00007ffeefbff738:  0x00007ffeefbff768  0x0000000004036691 
0x00007ffeefbff748:  0x00007ffeefbff750  0x00000000040366c0 
0x00007ffeefbff758:  0x00000000046dc6d4  0x000000000000002a
0x00007ffeefbff768:  0x00007ffeefbff7b8  0x000000000404c336 
0x00007ffeefbff778: <0x00000000046dc6d4  0x0000000004a84b88
0x00007ffeefbff788:  0x0000000004bc9aa0  0x0000000004046031 
0x00007ffeefbff798:  0x00000000040460e3   0x0000000000000000
0x00007ffeefbff7a8:  0x000000c00011f968  0x0000000000000000
0x00007ffeefbff7b8:  0x00007ffeefbff800 !0x00007fff204e9c9e
0x00007ffeefbff7c8: >0x00007ffeefbff800  0x0000000004bbc000
0x00007ffeefbff7d8:  0x000000000000040c  0x00000000042125a5 
0x00007ffeefbff7e8:  0x000000000406965f   0x000000c00011f818
0x00007ffeefbff7f8:  0x00007ffeefbff840  0x000000c00011f7e8
0x00007ffeefbff808:  0x00000000040674d0   0x0000000000000000
0x00007ffeefbff818:  0x000000c00002a1c8  0x0000000000000003
0x00007ffeefbff828:  0x0000000000000000  0x000000000461c4e0
0x00007ffeefbff838:  0x0000000000000840  0x000000c0000001a0
0x00007ffeefbff848:  0x00000000040655e9   0x0000000000000004
0x00007ffeefbff858:  0x0000000004815480  0x0000000004c1c900
0x00007ffeefbff868:  0x00007ffeefbff8b0  0x00000000040654e5 
0x00007ffeefbff878:  0x000000000406549d 
runtime.throw({0x46dc6d4, 0x4a84b88})
	/usr/local/Cellar/go/1.17/libexec/src/runtime/panic.go:1198 +0x71
runtime: unexpected return pc for runtime.sigpanic called from 0x7fff204e9c9e
stack: frame={sp:0x7ffeefbff778, fp:0x7ffeefbff7c8} stack=[0x7ffeefb80818,0x7ffeefbff880)
0x00007ffeefbff678:  0x01007ffeefbff698  0x0000000000000004
0x00007ffeefbff688:  0x000000000000001f  0x00007fff204e9c9e
0x00007ffeefbff698:  0x0b01dfacedebac1e  0x0000000000000001
0x00007ffeefbff6a8:  0x0000000004036691   0x00007ffeefbff748
0x00007ffeefbff6b8:  0x00000000046cf002  0x00007ffeefbff700
0x00007ffeefbff6c8:  0x0000000004036948   0x0000000004c1c900
0x00007ffeefbff6d8:  0x0000000000000001  0x0000000000000001
0x00007ffeefbff6e8:  0x00007ffeefbff748  0x0000000004036691 
0x00007ffeefbff6f8:  0x0000000004c1c900  0x00007ffeefbff738
0x00007ffeefbff708:  0x00000000040368d0   0x00007ffeefbff718
0x00007ffeefbff718:  0x0000000004036900   0x0000000004c1c900
0x00007ffeefbff728:  0x0000000004036691   0x00007ffeefbff748
0x00007ffeefbff738:  0x00007ffeefbff768  0x0000000004036691 
0x00007ffeefbff748:  0x00007ffeefbff750  0x00000000040366c0 
0x00007ffeefbff758:  0x00000000046dc6d4  0x000000000000002a
0x00007ffeefbff768:  0x00007ffeefbff7b8  0x000000000404c336 
0x00007ffeefbff778: <0x00000000046dc6d4  0x0000000004a84b88
0x00007ffeefbff788:  0x0000000004bc9aa0  0x0000000004046031 
0x00007ffeefbff798:  0x00000000040460e3   0x0000000000000000
0x00007ffeefbff7a8:  0x000000c00011f968  0x0000000000000000
0x00007ffeefbff7b8:  0x00007ffeefbff800 !0x00007fff204e9c9e
0x00007ffeefbff7c8: >0x00007ffeefbff800  0x0000000004bbc000
0x00007ffeefbff7d8:  0x000000000000040c  0x00000000042125a5 
0x00007ffeefbff7e8:  0x000000000406965f   0x000000c00011f818
0x00007ffeefbff7f8:  0x00007ffeefbff840  0x000000c00011f7e8
0x00007ffeefbff808:  0x00000000040674d0   0x0000000000000000
0x00007ffeefbff818:  0x000000c00002a1c8  0x0000000000000003
0x00007ffeefbff828:  0x0000000000000000  0x000000000461c4e0
0x00007ffeefbff838:  0x0000000000000840  0x000000c0000001a0
0x00007ffeefbff848:  0x00000000040655e9   0x0000000000000004
0x00007ffeefbff858:  0x0000000004815480  0x0000000004c1c900
0x00007ffeefbff868:  0x00007ffeefbff8b0  0x00000000040654e5 
0x00007ffeefbff878:  0x000000000406549d 
runtime.sigpanic()
	/usr/local/Cellar/go/1.17/libexec/src/runtime/signal_unix.go:719 +0x396

goroutine 1 [syscall, locked to thread]:
syscall.syscall(0x42125a0, 0x1, 0x40487413, 0xc00011f8a8)
	/usr/local/Cellar/go/1.17/libexec/src/runtime/sys_darwin.go:22 +0x3b fp=0xc00011f818 sp=0xc00011f7f8 pc=0x406411b
syscall.syscall(0x4ebd328, 0x18, 0x18, 0x4eb4108)
	:1 +0x26 fp=0xc00011f860 sp=0xc00011f818 pc=0x4069e26
golang.org/x/sys/unix.ioctl(0xc00000e138, 0x0, 0xc00011f8c8)
	/Users/daniel/go/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_amd64.go:731 +0x39 fp=0xc00011f890 sp=0xc00011f860 pc=0x4212239
golang.org/x/sys/unix.IoctlGetTermios(...)
	/Users/daniel/go/pkg/mod/golang.org/x/[email protected]/unix/ioctl.go:72
github.com/mattn/go-isatty.IsTerminal(0x42135fa)
	/Users/daniel/go/pkg/mod/github.com/mattn/[email protected]/isatty_bsd.go:10 +0x50 fp=0xc00011f900 sp=0xc00011f890 pc=0x4212650
github.com/inconshreveable/log15.init.0()
	/Users/daniel/go/pkg/mod/github.com/inconshreveable/[email protected]/root.go:18 +0x55 fp=0xc00011f968 sp=0xc00011f900 pc=0x4215195
runtime.doInit(0x4bc4640)
	/usr/local/Cellar/go/1.17/libexec/src/runtime/proc.go:6498 +0x123 fp=0xc00011faa0 sp=0xc00011f968 pc=0x40460e3
runtime.doInit(0x4bc5280)
	/usr/local/Cellar/go/1.17/libexec/src/runtime/proc.go:6475 +0x71 fp=0xc00011fbd8 sp=0xc00011faa0 pc=0x4046031
runtime.doInit(0x4bc02e0)
	/usr/local/Cellar/go/1.17/libexec/src/runtime/proc.go:6475 +0x71 fp=0xc00011fd10 sp=0xc00011fbd8 pc=0x4046031
runtime.doInit(0x4bc4320)
	/usr/local/Cellar/go/1.17/libexec/src/runtime/proc.go:6475 +0x71 fp=0xc00011fe48 sp=0xc00011fd10 pc=0x4046031
runtime.doInit(0x4bc46e0)
	/usr/local/Cellar/go/1.17/libexec/src/runtime/proc.go:6475 +0x71 fp=0xc00011ff80 sp=0xc00011fe48 pc=0x4046031
runtime.main()
	/usr/local/Cellar/go/1.17/libexec/src/runtime/proc.go:238 +0x1e6 fp=0xc00011ffe0 sp=0xc00011ff80 pc=0x4038fa6
runtime.goexit()
	/usr/local/Cellar/go/1.17/libexec/src/runtime/asm_amd64.s:1581 +0x1 fp=0xc00011ffe8 sp=0xc00011ffe0 pc=0x40677c1

Additional Information

If I build the application with go 1.16.4 it works as expected

@seankhliao
Copy link
Member

Duplicate of #47776

@seankhliao seankhliao marked this as a duplicate of #47776 Sep 6, 2021
@golang golang locked and limited conversation to collaborators Sep 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants