Skip to content

Unwind past runtime.morestack in Go #3123

@umanwizard

Description

@umanwizard

morestack blocks unwinding, because it clears any registers that could be used for unwinding before calling into newstack.

Fortunately, it saves the values in some variables on the current goroutine structure, so we can read them using some of the same infrastructure we use for reading labels (reliably on x86, best effort on aarch64).

This seems to work: https://github.com/parca-dev/opentelemetry-ebpf-profiler/tree/btv/morestack-wip (WIP, not yet ready to land)

for about 90% of frames on x86:

Image

when running this program: https://github.com/umanwizard/morestack_invoker

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions