Open jeffreyyong opened 6 years ago
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
Also got this.
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
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:
go get -u github.com/divan/gotrace
cd $GOPATH/src/github.com/divan/gotrace && git checkout go18
docker run -v $GOPATH:/go -w /go/src/github.com/divan/gotrace golang:1.8 go install
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
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?
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!
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
Hi,
I followed the steps as mentioned in the README, I got no errors at all when doing the instructions for
docker pull
anddocker run
. I can see thebinary file
and thetrace.out
file. However, when I run thegotrace ./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 inmain.go
I am running it on MacOs. I am wondering if I have to set other environment variable like
GOARCH
when doingdocker run
?Regards, Jeffrey