gotrace icon indicating copy to clipboard operation
gotrace copied to clipboard

Not a trace file error

Open jeffreyyong opened this issue 7 years ago • 7 comments

Hi,

I followed the steps as mentioned in the README, I got no errors at all when doing the instructions for docker pull and docker run. I can see the binary file and the trace.out file. However, when I run the gotrace ./trace.out ./binary command, this error: panic: not a trace file goroutine 1 [running]: main.main() /Users/jeffreyyong/go/src/github.com/divan/gotrace/main.go:39 +0x3d2 occurred. It's strange, because I'm supposed to build /src/examples/hello.go but the error occurs in main.go

I am running it on MacOs. I am wondering if I have to set other environment variable like GOARCH when doing docker run?

Regards, Jeffrey

jeffreyyong avatar Dec 04 '17 14:12 jeffreyyong

i have the same issue. tried installing the patch and that isnt workin either. had to fine the ./gotrace executable and even then i couldnt get it to work

Swoboderz avatar Dec 31 '17 09:12 Swoboderz

Also got this.

image

kerak19 avatar Mar 19 '18 14:03 kerak19

Got the same error panic: not a trace file. Here's the stack. Thanks

panic: not a trace file

goroutine 1 [running]:
main.main()
	~/go/src/github.com/divan/gotrace/main.go:39 +0x381

cuongta avatar Apr 17 '18 00:04 cuongta

I was able to get this to work using the go18 branch and running Go 1.8 with Docker. It's not ideal but does allow you to play with the visualiser. Below is the steps I went through:

  1. Get gotrace and checkout go18 branch:
    1. go get -u github.com/divan/gotrace
    2. cd $GOPATH/src/github.com/divan/gotrace && git checkout go18
  2. Install gotrace using go 1.8
    1. docker run -v $GOPATH:/go -w /go/src/github.com/divan/gotrace golang:1.8 go install
  3. Run example from Docker:
    1. docker run -p 2000:2000 -v $GOPATH:/go -v $PWD:/go/src/app -w /go/src/app golang:1.8 gotrace examples/pingpong02.go

Hope it helps

DavyJ0nes avatar Jun 03 '18 15:06 DavyJ0nes

Hey @DavyJ0nes , thanks for your suggestions! I followed your instructions and it works! The only issue is that I find the animation lacks arrow between the gorutines as below. Did you encounter the same issue?

shunmian avatar Nov 06 '18 10:11 shunmian

Hey, sorry for the unforgivably long response. I stuck in writing patch for Go 1.9-1.11 and I didn't have enough time to devote to this. I think I'll resume working on gotrace next month, so hopefully, that will be resolved. So far, it doesn't produce correct trace for latest Go. There is a go1.11 branch, but it's not ready yet. Thank you for the patience!

divan avatar Nov 14 '18 12:11 divan

Try this Dockerfile , will be more easy to use gotrace compiled by go1.8.

# build locally and run
docker build . -t  divan/golang:gotrace1.8
docker run --rm -it -p 2000:2000  -v $PWD:/go divan/golang:gotrace1.8  examples/hello.go

NewbMiao avatar Dec 12 '19 05:12 NewbMiao