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

runtime: improve the "best effort" of the execution tracer's CPU sample delivery #52674

Open
rhysh opened this issue May 3, 2022 · 1 comment
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@rhysh
Copy link
Contributor

rhysh commented May 3, 2022

The work in https://go.dev/cl/400795 (proposed for the Go 1.19 cycle) to add CPU profile samples to the execution tracer's output relies on the process generating at least a modest stream of other traceable events. If the process's goroutines as a group use more than 19 thread-seconds of CPU time before any individual P flushes a traceBuf (or before tracing ends), the profiling buffer will overflow and (silently) drop records before the goroutine calling runtime.ReadTrace wakes up to drain it.

There may be a better way to move profile samples from the profBuf into traceBufs (such as launching a goroutine to drain the profBuf).

@dr2chase dr2chase added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label May 3, 2022
@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Jul 7, 2022
@prattmic prattmic added this to the Backlog milestone Jul 27, 2022
@mknyszek
Copy link
Contributor

See #58877 for a concrete example of the "best effort" falling over. (That issue was deduped with this one.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
Development

No branches or pull requests

5 participants