Closed Deepak263018 closed 2 years ago
I downgrade the Go version to 1.16 & set Env_path export PATH="/usr/local/opt/go@1.16/bin:$PATH"
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.
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)