Skip to content

feat(unwinder): unwind remote threads with libunwindstack - #2267

Merged
jpnurmi merged 1 commit into
jpnurmi/feat/native-elf-offsetsfrom
jpnurmi/feat/libunwindstack-remote
Oct 29, 2026
Merged

jpnurmi merged 1 commit into
jpnurmi/feat/native-elf-offsetsfrom
jpnurmi/feat/libunwindstack-remote

Conversation

@jpnurmi

@jpnurmi jpnurmi commented Oct 28, 2026

Copy link
Copy Markdown
Collaborator

The crash daemon could only unwind the threads that did not crash with libunwind_remote, which Android builds lack because they use libunwindstack. Add a libunwindstack_remote backend, compiled in only with the native backend, that attaches to a thread with ptrace, reads its registers with Regs::RemoteGet(), and unwinds it. Share the ptrace attach loop with libunwind_remote.

This prepares the remote unwinding for the native backend on Android.

#skip-changelog (extracted from #1725)

The crash daemon could only unwind the threads that did not crash with
`libunwind_remote`, which Android builds lack because they use
libunwindstack. Add a `libunwindstack_remote` backend, compiled in only
with the native backend, that attaches to a thread with ptrace, reads
its registers with `Regs::RemoteGet()`, and unwinds it. Share the
ptrace attach loop with `libunwind_remote`.

This prepares the native backend for Android.
@github-actions

Copy link
Copy Markdown
Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against 9e8b565

@jpnurmi jpnurmi added the v1 Targets 1.0 (v1 branch) label Oct 28, 2026
@codecov

codecov Bot commented Oct 28, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 35.89744% with 25 lines in your changes missing coverage. Please review.
✅ Project coverage is 76.09%. Comparing base (6388a2f) to head (9e8b565).

Additional details and impacted files
@@                         Coverage Diff                         @@
##           jpnurmi/feat/native-elf-offsets    #2267      +/-   ##
===================================================================
+ Coverage                            75.92%   76.09%   +0.17%     
===================================================================
  Files                                  104      104              
  Lines                                29863    29870       +7     
  Branches                              5541     5542       +1     
===================================================================
+ Hits                                 22672    22729      +57     
+ Misses                                5806     5751      -55     
- Partials                              1385     1390       +5     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jpnurmi
jpnurmi added this pull request to stack #2272 October 29, 2026 11:20
@jpnurmi
jpnurmi merged commit fe65354 into v1 Oct 29, 2026
67 checks passed
@jpnurmi
jpnurmi deleted the jpnurmi/feat/libunwindstack-remote branch October 29, 2026 11:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

v1 Targets 1.0 (v1 branch)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants