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

ERROR: fork/exec ./security/pkg/nodeagent/sds/sdsservice.go: exec format error #41782

Closed
williamaronli opened this issue Oct 4, 2020 · 1 comment

Comments

@williamaronli
Copy link

williamaronli commented Oct 4, 2020

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

$ go version
:~/go/src/istio.io/istio$ go version
go version go1.15 linux/amd64

Does this issue reproduce with the latest release?

it uses a golang tool

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

linux

go env
$ go env
```
fengxiangli@aronli:~/go/src/istio.io/istio$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN="/bin"
GOCACHE="/usr/local/google/home/fengxiangli/.cache/go-build"
GOENV="/usr/local/google/home/fengxiangli/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/usr/local/google/home/fengxiangli/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/usr/local/google/home/fengxiangli/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/lib/google-golang"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/google-golang/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/usr/local/google/home/fengxiangli/go/src/istio.io/istio/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 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build049337269=/tmp/go-build -gno-record-gcc-switches"
```

What did you do?

I try to run stress test using the tool https://godoc.org/golang.org/x/tools/cmd/stress

stress ./security/pkg/nodeagent/sds/sdsservice.go -test.run=TestSometing -test.cpu=10

What did you expect to see?

I want to do a stress test for my package like something and return something like this:

fengxiangli :~/go/src/istio.io/istio$ go test ./security/pkg/nodeagent/sds/...
ok  	istio.io/istio/security/pkg/nodeagent/sds	11.724s

What did you see instead?

/tmp/go-stress-20201004T045814-743228915
ERROR: fork/exec ./security/pkg/nodeagent/sds/sdsservice.go: exec format error
@davecheney
Copy link
Contributor

It looks like you are trying to execute a .go source file. You need to compile the program first.

Unlike many projects, the Go project does not use GitHub Issues for general discussion or asking questions. GitHub Issues are used for tracking bugs and proposals only.

For asking questions, see:

@golang golang locked and limited conversation to collaborators Oct 4, 2021
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