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

Not a trace file error #20

Open
jeffreyyong opened this issue Dec 4, 2017 · 7 comments
Open

Not a trace file error #20

jeffreyyong opened this issue Dec 4, 2017 · 7 comments

Comments

@jeffreyyong
Copy link

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

@Swoboderz
Copy link

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

@kerak19
Copy link

kerak19 commented Mar 19, 2018

Also got this.

image

@cuongta
Copy link

cuongta commented Apr 17, 2018

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

@DavyJ0nes
Copy link

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

@shunmian
Copy link

shunmian commented Nov 6, 2018

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?

@divan
Copy link
Owner

divan commented Nov 14, 2018

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!

@NewbMiao
Copy link

NewbMiao commented Dec 12, 2019

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

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

8 participants