-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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
runtime: threadcreate profile is broken #6104
Comments
What is a "useful stack"? I've attached threadcreate profile from HTTP server FTR. Lots of threads are created by sysmon (not useful). Timerproc created 3 threads (not useful). Creation of random goroutines caused thread creation up to GOMAXPROCS (not useful). I can imagine an end user trying to figure out what threadcreate profile is trying to say... It must be centered around blocking syscalls and locked threads. But which exactly? Probably all, because they all can trigger thread creation. It all needs to be rethought and probably even renamed. Probably now it's better to just remove it. Attachments:
|
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
Change https://golang.org/cl/189318 mentions this issue: |
Goroutines are directly associated with labels. It's relatively easy to plumb those through without creating goroutine-locals in the wild. This is accomplished by splitting out most of the code from the public `runtime.GoroutineProfile` into a new unexported `runtime.goroutineProfileWithLabels`, which then has a thin wrapper linked into the `runtime/pprof` package as `runtime_goroutineProfileWithLabels`. (mirroring the way labels get associated with the `g` for a goroutine in the first place) Per-#6104, OS-thread creation profiles are a bit useless, as `M`s tend to be created be created by a background goroutine. As such, I decided not to add support for capturing the labels at `M`-creation-time, since the stack-traces seem to always come out `nil` for my simple test binaries. This change currently provides labels for debug=0 and debug=1, as debug=2 is currently entirely generated by the runtime package and I don't see a clean way of getting the `labelMap` type handled properly within the `runtime` package. Update the comment added in cl/131275 to mention goroutine support for labels. Updates #23458 Change-Id: Ia4b558893d7d10156b77121cd9b70c4ccd9e1889 Reviewed-on: https://go-review.googlesource.com/c/go/+/189318 Reviewed-by: Hyang-Ah Hana Kim <[email protected]>
It is broken since 2013[1]. Verified on localnet. [1] golang/go#6104
2898: [Profile] disable threadcreate profiler r=SaveTheRbtz a=SaveTheRbtz [It has been broken since 2013](golang/go#6104). Verified on localnet and removed. Co-authored-by: Alexey Ivanov <[email protected]>
Change https://go.dev/cl/423116 mentions this issue: |
I've sent https://go.dev/cl/423116 as a "fix" for this. tl;dr, the CL just stops hiding stacks from within the scheduler. The result of this profile probably isn't very meaningful to the typical user, but it can be quite handy for someone investigating strange behavior in the runtime. |
The text was updated successfully, but these errors were encountered: