gops icon indicating copy to clipboard operation
gops copied to clipboard

killed $GOPATH/bin/gops

Open wangjinbei opened this issue 8 years ago • 5 comments
trafficstars

How should i deal with this error?

Error

killed $GOPATH/bin/gops

go version

go version go1.8 darwin/amd64

go env

GOARCH="amd64" GOBIN="" GOEXE="" GOHOSTARCH="amd64" GOHOSTOS="darwin" GOOS="darwin" GOPATH="/Users/william/gocode" GORACE="" GOROOT="/usr/local/go" GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64" GCCGO="gccgo" CC="clang" GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/hk/hn36zx657pb9s_509zcdr4cr0000gp/T/go-build134432162=/tmp/go-build -gno-record-gcc-switches -fno-common" CXX="clang++" CGO_ENABLED="1" PKG_CONFIG="pkg-config" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2"

wangjinbei avatar Jul 12 '17 10:07 wangjinbei

How did you get this error? By running gops?

rakyll avatar Jul 28 '17 21:07 rakyll

Yes~ Just running $GOPATH/bin/gops

wangjinbei avatar Jul 31 '17 01:07 wangjinbei

Facing the same issue

⇒  gops 48450
[1]    48975 killed     gops 48450

where 48450 is the PID of the main program. same issue with other commands

⇒  gops stack 48450
[1]    49049 killed     gops stack 48450

⇒  gops memstats 48450
[1]    49085 killed     gops memstats 48450

go version

go version go1.7.3 darwin/amd64

go env

GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/praveenshukla/work/Go"
GORACE=""
GOROOT="/usr/local/Cellar/go/1.7.3/libexec"
GOTOOLDIR="/usr/local/Cellar/go/1.7.3/libexec/pkg/tool/darwin_amd64"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/yx/ct2vrq617nl836qj42qp17xr0000gn/T/go-build061650846=/tmp/go-build -gno-record-gcc-switches -fno-common"
CXX="clang++"
CGO_ENABLED="1"

achilles42 avatar Mar 10 '18 19:03 achilles42

Similar issue with go version go1.11.4 linux/amd64. gops (even with no args) consumes a lot of memory and gets killed.

markdoyle avatar Feb 20 '19 21:02 markdoyle

I have the same error on an m2 macbook.

I have gotten it to work by compiling it for amd64 instead of arm64.

GOOS=darwin GOARCH=amd64 go build  .

Just in case here is some debug info:

Go version

go version go1.21.0 darwin/arm64

Go env

GO111MODULE='on'
GOARCH='arm64'
GOBIN=''
GOCACHE='/Users/user/Library/Caches/go-build'
GOENV='/Users/user/Library/Application Support/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='arm64'
GOHOSTOS='darwin'
GOINSECURE=''
GOMODCACHE='/Users/user/go/pkg/mod'
GONOPROXY='github.com/freshportal/*'
GONOSUMDB='github.com/freshportal/*'
GOOS='darwin'
GOPATH='/Users/user/go'
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/usr/local/go'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/usr/local/go/pkg/tool/darwin_arm64'
GOVCS=''
GOVERSION='go1.21.0'
GCCGO='gccgo'
AR='ar'
CC='clang'
CXX='clang++'
CGO_ENABLED='1'
GOMOD='/Volumes/Dev/Work/git/gops/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 -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -ffile-prefix-map=/var/folders/44/kgj_lzr94flftw6mqr8b84200000gn/T/go-build3601966105=/tmp/go-build -gno-record-gcc-switches -fno-common'

jeroen1602 avatar Oct 16 '23 11:10 jeroen1602