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

killed $GOPATH/bin/gops #42

Open
wangjinbei opened this issue Jul 12, 2017 · 5 comments
Open

killed $GOPATH/bin/gops #42

wangjinbei opened this issue Jul 12, 2017 · 5 comments

Comments

@wangjinbei
Copy link

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"

@rakyll
Copy link
Collaborator

rakyll commented Jul 28, 2017

How did you get this error? By running gops?

@wangjinbei
Copy link
Author

Yes~
Just running $GOPATH/bin/gops

@achilles42
Copy link

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"

@markdoyle
Copy link

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

@jeroen1602
Copy link

jeroen1602 commented Oct 16, 2023

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'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants