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

support arm64 vdso functions with a frame #195

Merged
merged 6 commits into from
Oct 28, 2024

Conversation

fabled
Copy link
Contributor

@fabled fabled commented Oct 18, 2024

Add logic to unwind through vDSO functions with frame.

@fabled fabled requested review from a team as code owners October 18, 2024 13:21
@fabled fabled force-pushed the tt-arm64-vdso-frame branch 2 times, most recently from 509c731 to 67dc0d2 Compare October 18, 2024 13:30
depending on gcc version and optimization level the kernel vDSO
may or may not contain simple calls with frame. Accommodate
for this.
Copy link
Member

@christos68k christos68k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks LGTM (added some nits for docstring consistency)

nativeunwind/stackdeltatypes/stackdeltatypes.go Outdated Show resolved Hide resolved
processmanager/synthdeltas.go Outdated Show resolved Hide resolved
processmanager/synthdeltas.go Outdated Show resolved Hide resolved
@fabled
Copy link
Contributor Author

fabled commented Oct 21, 2024

I need to double check if this actually works as expected. The frame finding works, but the stack delta generated may be incorrect. I'll try to get a proper coredump test case for this.

@fabled fabled marked this pull request as draft October 21, 2024 13:17
@christos68k
Copy link
Member

I need to double check if this actually works as expected. The frame finding works, but the stack delta generated may be incorrect. I'll try to get a proper coredump test case for this.

Good point, forgot to mention that I can't test this atm.

processmanager/synthdeltas.go Fixed Show resolved Hide resolved
@fabled
Copy link
Contributor Author

fabled commented Oct 21, 2024

Good point, forgot to mention that I can't test this atm.

So turns out this was quite difficult for me too. My ARM64 box runs kernel where the vDSO does not have this. Ubuntu kernels do. So I ended up running Ubuntu kernel on qemu-system-aarch64. Due to that setup being slow, I ended up just creating a coredump in the old style format (core only, no associated original ELF files). I'll need to see if I can convert it still to the new style by hand, or alternatively just dump it in in the old format. In any case, I got the stack delta wrong, it is fixed now and should be working.

@fabled fabled marked this pull request as ready for review October 22, 2024 19:59
processmanager/synthdeltas.go Outdated Show resolved Hide resolved
processmanager/synthdeltas.go Outdated Show resolved Hide resolved
processmanager/synthdeltas.go Outdated Show resolved Hide resolved
processmanager/synthdeltas.go Outdated Show resolved Hide resolved
Copy link
Contributor

@rockdaboot rockdaboot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code LGTM, but didn't test on arm64.

@fabled fabled merged commit 6ad74a7 into open-telemetry:main Oct 28, 2024
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants