Skip to content

runtime/trace: don't omit runtime (internal) stack frames #76457

@aktau

Description

@aktau

Go version

go version go1.26-dev

Output of go env in your module/workspace:

N/A

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:

Metadata

Metadata

Assignees

Labels

LibraryProposalIssues 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.compiler/runtimeIssues related to the Go compiler and/or runtime.

Type

No type

Projects

Status

Todo

Relationships

None yet

Development

No branches or pull requests

Issue actions