-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/trace: add a name/desc to goroutines which are inactive when get a pprof trace #49994
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
Comments
Thanks for the report. I think your suggested fix is reasonable, feel free to send a CL (note we are in freeze and thus won't submit before ~Feb). Ideally we'd do even better and actually attach each goroutine's stack trace to the initial EvGoCreate. This should be possible since the world is stopped, but I could see that making starting tracing take a lot longer, especially with 5000+ goroutines, which I imagine is why it was avoided in the first place. |
Actually, we already have |
Moving to Backlog. Please comment if you disagree. Thanks. |
Change https://go.dev/cl/425042 mentions this issue: |
This PR fixes: #54425 #49994 Change-Id: Id60a3ba6930f8e29b12b6d8f80945decd2ce31bc GitHub-Last-Rev: 60a040a GitHub-Pull-Request: #54575 Reviewed-on: https://go-review.googlesource.com/c/go/+/425042 Reviewed-by: Michael Knyszek <mknyszek@google.com> Reviewed-by: Michael Pratt <mpratt@google.com>
The above CL had a malformed "fixes" line; this issue should be closed now that it's merged. |
This PR fixes: golang#54425 golang#49994 Change-Id: Id60a3ba6930f8e29b12b6d8f80945decd2ce31bc GitHub-Last-Rev: 60a040a GitHub-Pull-Request: golang#54575 Reviewed-on: https://go-review.googlesource.com/c/go/+/425042 Reviewed-by: Michael Knyszek <mknyszek@google.com> Reviewed-by: Michael Pratt <mpratt@google.com>
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I got a pprof trace, then watch it on browser. I saw the last line 'N=xxx' with no link or name.
it's easy to make a mistake about what it is meaning, many people may think it's the total number of goroutines.
What did you expect to see?
I read the source code, and then find: the last line is the num of goroutines which are created before trace taken, and inactive during the trace.
I think may add a name/desc to it, like: inactive when trace.


in httpGoroutines func add:
and then see:
What did you see instead?
The text was updated successfully, but these errors were encountered: