dryark / stf_ios_support

Central repo to connect and document components/repos needed for IOS stf support
Other
153 stars 65 forks source link

Runtime Exception in Go lang #110

Closed Deepak263018 closed 2 years ago

Deepak263018 commented 3 years ago

My code is working fine on go version 1.16 But if I install go on Mac OS 11.4 using brew by default it install latest version on go 1.17.On go version 1.16 my code is working fine even I downgrade the go version at 1.16 still it showing same error as given below. I also define GOPATH into .zshrc file

My GO ENV on Mac OS 11.4:------ GO111MODULE="" GOARCH="amd64" GOBIN="" GOCACHE="/Users/myusername/Library/Caches/go-build" GOENV="/Users/myusername/Library/Application Support/go/env" GOEXE="" GOEXPERIMENT="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="darwin" GOINSECURE="" GOMODCACHE="/Users/myusername/go/pkg/mod" GONOPROXY="" GONOSUMDB="" GOOS="darwin" GOPATH="/Users/myusername/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="/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 -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/97/94ldp9356fsdfg154lhbp8nr0000gn/T/go-build2653940064=/tmp/go-build -gno-record-gcc-switches -fno-common"

Error:---

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

runtime stack: runtime: unexpected return pc for runtime.sigpanic called from 0x7fff20397cbe stack: frame={sp:0x70000d3efe58, fp:0x70000d3efea8} stack=[0x70000d370338,0x70000d3eff38) 0x000070000d3efd58: 0x010070000d3efd78 0x0000000000000004 0x000070000d3efd68: 0x000000000000001f 0x00007fff20397cbe 0x000070000d3efd78: 0x0b01dfacedebac1e 0x0000000000000001 0x000070000d3efd88: 0x0000000004037571 <runtime.throw+0x0000000000000071> 0x000070000d3efe28 0x000070000d3efd98: 0x000000000441c65c 0x000070000d3efde0 0x000070000d3efda8: 0x0000000004037828 <runtime.fatalthrow.func1+0x0000000000000048> 0x000000c0000821a0 0x000070000d3efdb8: 0x0000000000000001 0x0000000000000001 0x000070000d3efdc8: 0x000070000d3efe28 0x0000000004037571 <runtime.throw+0x0000000000000071> 0x000070000d3efdd8: 0x000000c0000821a0 0x000070000d3efe18 0x000070000d3efde8: 0x00000000040377b0 <runtime.fatalthrow+0x0000000000000050> 0x000070000d3efdf8 0x000070000d3efdf8: 0x00000000040377e0 <runtime.fatalthrow.func1+0x0000000000000000> 0x000000c0000821a0 0x000070000d3efe08: 0x0000000004037571 <runtime.throw+0x0000000000000071> 0x000070000d3efe28 0x000070000d3efe18: 0x000070000d3efe48 0x0000000004037571 <runtime.throw+0x0000000000000071> 0x000070000d3efe28: 0x000070000d3efe30 0x00000000040375a0 <runtime.throw.func1+0x0000000000000000> 0x000070000d3efe38: 0x0000000004422751 0x000000000000002a 0x000070000d3efe48: 0x000070000d3efe98 0x000000000404cf36 <runtime.sigpanic+0x0000000000000396> 0x000070000d3efe58: <0x0000000004422751 0x0000000000000000 0x000070000d3efe68: 0x000070000d3efed8 0x0000000000000000 0x000070000d3efe78: 0x000000c000080000 0x0000000000000000 0x000070000d3efe88: 0x000000c000206c98 0x00000000040b25a0 <syscall.libc_write_trampoline+0x0000000000000000> 0x000070000d3efe98: 0x000070000d3efee0 !0x00007fff20397cbe 0x000070000d3efea8: >0x000070000d3efee0 0x00000000046d8000 0x000070000d3efeb8: 0x00000000000004ae 0x0000000004109da5 <golang.org/x/sys/unix.libc_ioctl_trampoline+0x0000000000000005> 0x000070000d3efec8: 0x0000000004069aff <runtime.syscall+0x000000000000001f> 0x000000c0002069d8 0x000070000d3efed8: 0x000070000d3eff20 0x000000c0002069a8 0x000070000d3efee8: 0x0000000004067990 <runtime.asmcgocall+0x0000000000000070> 0x0000000000000001 0x000070000d3efef8: 0x0000000004011700 <runtime.persistentalloc.func1+0x0000000000000040> 0x1700000000001018 0x000070000d3eff08: 0x000070000d3eff20 0x0000000004764cf8 0x000070000d3eff18: 0x0000000000001680 0x000000c0000001a0 0x000070000d3eff28: 0x0000000004065aa9 <runtime.systemstack+0x0000000000000049> 0x000070000d3eff50 runtime.throw({0x4422751, 0x0}) /usr/local/Cellar/go/1.17/libexec/src/runtime/panic.go:1198 +0x71 runtime: unexpected return pc for runtime.sigpanic called from 0x7fff20397cbe stack: frame={sp:0x70000d3efe58, fp:0x70000d3efea8} stack=[0x70000d370338,0x70000d3eff38) 0x000070000d3efd58: 0x010070000d3efd78 0x0000000000000004 0x000070000d3efd68: 0x000000000000001f 0x00007fff20397cbe 0x000070000d3efd78: 0x0b01dfacedebac1e 0x0000000000000001 0x000070000d3efd88: 0x0000000004037571 <runtime.throw+0x0000000000000071> 0x000070000d3efe28 0x000070000d3efd98: 0x000000000441c65c 0x000070000d3efde0 0x000070000d3efda8: 0x0000000004037828 <runtime.fatalthrow.func1+0x0000000000000048> 0x000000c0000821a0 0x000070000d3efdb8: 0x0000000000000001 0x0000000000000001 0x000070000d3efdc8: 0x000070000d3efe28 0x0000000004037571 <runtime.throw+0x0000000000000071> 0x000070000d3efdd8: 0x000000c0000821a0 0x000070000d3efe18 0x000070000d3efde8: 0x00000000040377b0 <runtime.fatalthrow+0x0000000000000050> 0x000070000d3efdf8 0x000070000d3efdf8: 0x00000000040377e0 <runtime.fatalthrow.func1+0x0000000000000000> 0x000000c0000821a0 0x000070000d3efe08: 0x0000000004037571 <runtime.throw+0x0000000000000071> 0x000070000d3efe28 0x000070000d3efe18: 0x000070000d3efe48 0x0000000004037571 <runtime.throw+0x0000000000000071> 0x000070000d3efe28: 0x000070000d3efe30 0x00000000040375a0 <runtime.throw.func1+0x0000000000000000> 0x000070000d3efe38: 0x0000000004422751 0x000000000000002a 0x000070000d3efe48: 0x000070000d3efe98 0x000000000404cf36 <runtime.sigpanic+0x0000000000000396> 0x000070000d3efe58: <0x0000000004422751 0x0000000000000000 0x000070000d3efe68: 0x000070000d3efed8 0x0000000000000000 0x000070000d3efe78: 0x000000c000080000 0x0000000000000000 0x000070000d3efe88: 0x000000c000206c98 0x00000000040b25a0 <syscall.libc_write_trampoline+0x0000000000000000> 0x000070000d3efe98: 0x000070000d3efee0 !0x00007fff20397cbe 0x000070000d3efea8: >0x000070000d3efee0 0x00000000046d8000 0x000070000d3efeb8: 0x00000000000004ae 0x0000000004109da5 <golang.org/x/sys/unix.libc_ioctl_trampoline+0x0000000000000005> 0x000070000d3efec8: 0x0000000004069aff <runtime.syscall+0x000000000000001f> 0x000000c0002069d8 0x000070000d3efed8: 0x000070000d3eff20 0x000000c0002069a8 0x000070000d3efee8: 0x0000000004067990 <runtime.asmcgocall+0x0000000000000070> 0x0000000000000001 0x000070000d3efef8: 0x0000000004011700 <runtime.persistentalloc.func1+0x0000000000000040> 0x1700000000001018 0x000070000d3eff08: 0x000070000d3eff20 0x0000000004764cf8 0x000070000d3eff18: 0x0000000000001680 0x000000c0000001a0 0x000070000d3eff28: 0x0000000004065aa9 <runtime.systemstack+0x0000000000000049> 0x000070000d3eff50 runtime.sigpanic() /usr/local/Cellar/go/1.17/libexec/src/runtime/signal_unix.go:719 +0x396

goroutine 1 [syscall]: syscall.syscall(0x4109da0, 0x2, 0x40487413, 0xc000206a68) /usr/local/Cellar/go/1.17/libexec/src/runtime/sys_darwin.go:22 +0x3b fp=0xc0002069d8 sp=0xc0002069b8 pc=0x40645db syscall.syscall(0x8, 0x38, 0xc000206fc0, 0x555555555555)

:1 +0x26 fp=0xc000206a20 sp=0xc0002069d8 pc=0x406a306 golang.org/x/sys/unix.ioctl(0xc000206b58, 0x40a8ac6, 0x203000) /Users/mozark/go/pkg/mod/golang.org/x/sys@v0.0.0-20191025021431-6c3a3bfe00ae/unix/zsyscall_darwin_amd64.go:746 +0x39 fp=0xc000206a50 sp=0xc000206a20 pc=0x4109699 golang.org/x/sys/unix.IoctlGetTermios(...) /Users/mozark/go/pkg/mod/golang.org/x/sys@v0.0.0-20191025021431-6c3a3bfe00ae/unix/ioctl.go:63 github.com/sirupsen/logrus.isTerminal(0xc000206b20) /Users/mozark/go/pkg/mod/github.com/sirupsen/logrus@v1.4.2/terminal_check_bsd.go:10 +0x50 fp=0xc000206ac0 sp=0xc000206a50 pc=0x4114fd0 github.com/sirupsen/logrus.checkIfTerminal({0x449a640, 0xc000010020}) /Users/mozark/go/pkg/mod/github.com/sirupsen/logrus@v1.4.2/terminal_check_notappengine.go:13 +0x75 fp=0xc000206ad8 sp=0xc000206ac0 pc=0x4115075 github.com/sirupsen/logrus.(*TextFormatter).init(...) /Users/mozark/go/pkg/mod/github.com/sirupsen/logrus@v1.4.2/text_formatter.go:86 github.com/sirupsen/logrus.(*TextFormatter).Format.func1() /Users/mozark/go/pkg/mod/github.com/sirupsen/logrus@v1.4.2/text_formatter.go:170 +0x36 fp=0xc000206b00 sp=0xc000206ad8 pc=0x4116716 sync.(*Once).doSlow(0x44a2460, 0xc0000689f0) /usr/local/Cellar/go/1.17/libexec/src/sync/once.go:68 +0xd2 fp=0xc000206b68 sp=0xc000206b00 pc=0x40707f2 sync.(*Once).Do(...) /usr/local/Cellar/go/1.17/libexec/src/sync/once.go:59 github.com/sirupsen/logrus.(*TextFormatter).Format(0xc0000720a0, 0xc000111dc0) /Users/mozark/go/pkg/mod/github.com/sirupsen/logrus@v1.4.2/text_formatter.go:170 +0xebe fp=0xc0002070d8 sp=0xc000206b68 pc=0x41160be github.com/sirupsen/logrus.(*Entry).write(0xc000111dc0) /Users/mozark/go/pkg/mod/github.com/sirupsen/logrus@v1.4.2/entry.go:255 +0xa5 fp=0xc000207150 sp=0xc0002070d8 pc=0x410fd25 github.com/sirupsen/logrus.Entry.log({0xc000110000, 0xc00020e4b0, {0x0, 0x0, 0x0}, 0x0, 0x0, {0x0, 0x0}, 0x0, ...}, ...) /Users/mozark/go/pkg/mod/github.com/sirupsen/logrus@v1.4.2/entry.go:231 +0x22e fp=0xc0002071d0 sp=0xc000207150 pc=0x410f9ce github.com/sirupsen/logrus.(*Entry).Log(0xc000111d50, 0x4, {0xc000207688, 0xe, 0x0}) /Users/mozark/go/pkg/mod/github.com/sirupsen/logrus@v1.4.2/entry.go:268 +0xa8 fp=0xc0002072d8 sp=0xc0002071d0 pc=0x410ff28 github.com/sirupsen/logrus.(*Entry).Info(...) /Users/mozark/go/pkg/mod/github.com/sirupsen/logrus@v1.4.2/entry.go:285 main.main() /Users/mozark/Downloads/packages/Packages/NewSTF_git/coordinator/coordinator.go:364 +0x19c8 fp=0xc000207f80 sp=0xc0002072d8 pc=0x4346ea8 runtime.main() /usr/local/Cellar/go/1.17/libexec/src/runtime/proc.go:255 +0x227 fp=0xc000207fe0 sp=0xc000207f80 pc=0x4039c07 runtime.goexit() /usr/local/Cellar/go/1.17/libexec/src/runtime/asm_amd64.s:1581 +0x1 fp=0xc000207fe8 sp=0xc000207fe0 pc=0x4067c81 goroutine 19 [syscall]: os/signal.signal_recv() /usr/local/Cellar/go/1.17/libexec/src/runtime/sigqueue.go:166 +0x28 os/signal.loop() /usr/local/Cellar/go/1.17/libexec/src/os/signal/signal_unix.go:24 +0x19 created by os/signal.Notify.func1.1 /usr/local/Cellar/go/1.17/libexec/src/os/signal/signal.go:151 +0x2c goroutine 20 [chan receive]: main.coro_sighup.func1() /Users/mozark/Downloads/packages/Packages/NewSTF_git/coordinator/log.go:202 +0x49 created by main.coro_sighup /Users/mozark/Downloads/packages/Packages/NewSTF_git/coordinator/log.go:200 +0xc9
Deepak263018 commented 2 years ago

I downgrade the Go version to 1.16 & set Env_path export PATH="/usr/local/opt/go@1.16/bin:$PATH"

nanoscopic commented 2 years ago

This same error was occurring in ControlFloor and is now fixed. I believe the issue was within one of the dependencies and they have corrected it. It should work again now if you run go get to update dependencies.