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
cmd/trace: large traces fail to open in the trace-viewer #15482
Comments
This is a tarball with the gotrace binary and the trace file itself https://drive.google.com/file/d/0B0JvI45O5NdxemtUN0pVRzVQbnc/view?usp=sharing |
The best I was able to get was trimming the trace down to firtst ~1M events. IIRC that covered only about 100ms of time, maybe even less. I think it may be more useful to slice the traces into layers by event type or even more specific filtering criteria. I haven't run the stats on the traces to see which types of events are prevailing, but I'm hoping that suppressing the ones that cause trouble may still leave enough to give you some sense of what's going on. |
BTW, all the traces I've had were <256MB, the viewer seems to be able to handle ~1M events at best which seems to be about ~3MB of the binary trace on average. |
What would be that criteria? |
I was thinking something along the lines of the -focus option in the pprof tool, but I certainly haven't thought that through, I really need to take closer look at the contents of those profiles to come up with something more specific. But that's definitely beyond the scope of simple and obvious. In the near future I was hoping that fixing the |
@mkobetic Are you sure you have GOROOT set properly? trace command picks up trace viewer html from GOROOT. |
CL https://golang.org/cl/22731 mentions this issue. |
Hm, I'm not sure if I had it set in the terminal where I ran the gotrace binary, I'll double check again. |
I think you're right, I most likely forgot to set GOROOT when I ran the binary (I ran it in different directory in different terminal, so it was easy to miss). With GOROOT set properly I can't reproduce the JS error anymore. My apologies. |
@mkobetic No problem. Thanks for confirming that it works for you now. |
go version
)?Recent master (https://go.googlesource.com/go/+/0436a89a2c5afad41356dc1dff7c745cd30636a7)
go env
)?I'm trying to use the tracing facilities to diagnose a production issue in our system. 30 second trace generates ~200MB trace containing ~45M events. Running the trace tool on it takes a while to parse it but seems to succeed (I instrumented the trace cmd binary to see what's going on inside). Attempting to open the full trace of this size crashes the JS side ("Aw snap!" screen). Going into the goroutine list and trying to filter it down to a single goroutine (~1M events) fails on the JS side with
Uncaught TypeError: tr.importer.Import is not a constructor
which is something I hoped https://go-review.googlesource.com/#/c/22013 has already fixed.I can't really upload the production trace here, so I was trying to reproduce with a different trace. I couldn't reproduce with a shorter trace ~1M = ~200K events, so in the end I instrumented the trace command itself to run a trace while processing the production trace. That gave me a trace of ~45M = ~13M events and that one seems to reproduce the issue.
Here's how I compiled the trace command (given the above environment)
And this is how I ran the trace (the logging instrumentation is mine, and also trimming the trace at 1M events because anything more than that seems to crash the JS viewer)
I'll upload the trace file and binary as a gist or something and link it below.
Well, I was hoping to take a look at the production trace, no luck so far.
:crash: & :burn: :-). Seriously though, I realize these are big traces, but that's what they seem to be from production systems. Either we can figure out how to deal with them in full size or we provide some ways to filter the traces to something the viewer can manage. Otherwise the tool won't be very usable in production scenarios.
The text was updated successfully, but these errors were encountered: