-
Notifications
You must be signed in to change notification settings - Fork 19k
runtime/trace: don't omit runtime (internal) stack frames #76457
Copy link
Copy link
Open
Labels
LibraryProposalIssues describing a requested change to the Go standard library or x/ libraries, but not to a toolIssues describing a requested change to the Go standard library or x/ libraries, but not to a toolNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.compiler/runtimeIssues related to the Go compiler and/or runtime.Issues related to the Go compiler and/or runtime.
Milestone
Metadata
Metadata
Assignees
Labels
LibraryProposalIssues describing a requested change to the Go standard library or x/ libraries, but not to a toolIssues describing a requested change to the Go standard library or x/ libraries, but not to a toolNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.compiler/runtimeIssues related to the Go compiler and/or runtime.Issues related to the Go compiler and/or runtime.
Type
Projects
Status
Todo
Go version
go version go1.26-dev
Output of
go envin your module/workspace:What did you do?
Recently, I was looking at a trace with @mknyszek and @prattmic when we tried to see where a specific goroutine could be "stuck". When collecting a runtime trace, sometimes stack frames are omitted as they are considered runtime-internal. However, in a number of cases it would be useful to see them.
What did you see happen?
Runtime internal frames were omitted (or we thought they were omitted, but couldn't be sure).
What did you expect to see?
Given that runtime/trace is an expert tool (and often used for runtime investigations), I believe it makes sense to not filter at all. @mknyszek mentioned that this may even simplify the code. (There are traces internally that apparently "fail to walk", likely they are cgo, omitting complexity here may help us get to the bottom of that problem.)
(The same behaviour exists for the stacks generated by
runtime.Stack()et al., but it might warrant a separate discussion.)TODO:
runtime.Stack).