-
-
Notifications
You must be signed in to change notification settings - Fork 204
feat: Sentry native crash backend #1433
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
Merged
Merged
Changes from all commits
Commits
Show all changes
143 commits
Select commit
Hold shift + click to select a range
d6b7952
Initial implementation
mujacica 153ffc5
Update build structure and daemon
mujacica 4028e74
Updates for Windows support
mujacica e2bd09d
Fix logging
mujacica dc50ab7
Fix MacOs builds
mujacica b2e8f0b
Fix Warnings
mujacica b0eec02
Test fixes
mujacica 93b5b35
Fix linux builds
mujacica 0e795c1
Fix linux/mac modules
mujacica 445bd15
Fix concurency
mujacica 558e301
Fix build errors
mujacica 08b8467
Formatting
mujacica 2185020
Fix 32bit builds
mujacica 3e217b8
Fix format
mujacica d81d949
Fix some issues
mujacica bcab40a
Native tests need http/transport
mujacica 4da1aa0
Fix CMake
mujacica 1492532
Fix build
mujacica dc29bba
Fix errors
mujacica 6ad840f
Fix format
mujacica 8b86918
Fix style
mujacica 2beef9b
Fix some of the issues
mujacica 1200d57
Fix format
mujacica 599be9d
Moooore fixes
mujacica ac10890
Debug CI
mujacica 86e95c5
More debug
mujacica 58e3798
More debug
mujacica 898a0f4
More debug
mujacica 064aadc
And more
mujacica d1cc5d8
More fixes
mujacica be128bb
Linux fixes
mujacica f8f7688
Fix i386 builds
mujacica e16e9e9
More fixes
mujacica 7ea8623
Fix more tests
mujacica e7ef468
More fixes
mujacica eb060f0
Fix native backend daemon discovery and resource leaks
mujacica d93897b
fix: use signal-safe memory operations in crash handler for TSAN/ASAN…
mujacica be09aab
Fix TSAN test failures and unused function warnings
mujacica f931de6
Fix TSAN robustness for native crash HTTP tests
mujacica b7c6e16
Fix native test failures under kcov and sanitizers
mujacica 5da3a64
Add run_crash helper to handle kcov exit code quirk
mujacica 4a2ba53
Fix Windows ClangCL build and improve signal handler robustness
mujacica 51dba39
Fix format
mujacica e2cc3db
Fix Windows ARM64 and macOS ASAN CI failures
mujacica feef1ac
Fix tests
mujacica a5786db
Fix Windows/ASAN CI failures and add crash reporting mode API
mujacica b1a217f
Fix Windows/ASAN CI failures and add crash reporting mode API
mujacica 76e6e84
Fix attachment handling in native crash daemon with native stacktrace…
mujacica 43893f8
Fix attachment handling in native crash daemon with native stacktrace…
mujacica e79fdfe
Fix CI failures: Windows ClangCL build and resource leaks
mujacica a034be5
Fix macOS minidump resource leaks and uninitialized state
mujacica 1f2272d
Skip native backend tests on macOS ASAN
mujacica 0d09541
Add E2E tests and fix thread duplication in native-with-minidump mode
mujacica 5084843
Add debug symbol upload to E2E workflow for symbolication
mujacica 34e1576
Fix debug_meta to use crashed process modules instead of daemon modules
mujacica 0491f4c
Add missing sys/uio.h header and fix code style
mujacica 87ce91b
Fix Python formatting in E2E tests
mujacica ce74814
Reduce thread count assertion from >= 3 to >= 1
mujacica a0e0c90
Add Linux module capture from /proc/maps for debug_meta
mujacica b697a47
Remove debug symbol upload from E2E workflow
mujacica 302b57f
Fix unused parameter warning on Windows
mujacica df78f51
Fix ELF debug_id byte swapping for Linux module capture
mujacica 662e8ee
Add Linux thread enumeration from /proc/task for native mode
mujacica 35a847d
Fix code style
mujacica e1dbda9
Enable structured logs in E2E crash tests
mujacica 03177f8
Fix Linux module capture and ARM64 stack unwinding
mujacica 9ea5787
Fix Windows 32-bit compile warnings for uint64_t to size_t conversion
mujacica 946bffd
Increase E2E test polling to 100 attempts with 6 second intervals
mujacica caf0e8c
Add PE code_id for Windows modules in native crash events
mujacica 41cb886
Improve Windows stack capture for frame pointer unwinding
mujacica 5144c97
Use StackWalk64 for Windows stack unwinding in native backend
mujacica 12143b6
Fix Windows build: add forward declaration for walk_stack_with_dbghelp
mujacica ffc5eb0
Add module enrichment to stack frames and build stacktraces for all t…
mujacica 05174dc
Fix empty frames and use per-thread context for Linux
mujacica b11ddc8
Fix unused variable warning on Windows ClangCL build
mujacica 2f995c5
Fix Linux module size calculation to span all memory mappings
mujacica 3c98485
Fix GUID alignment issue when reading PDB debug info on Windows
mujacica e9cd714
Add diagnostic logging for Windows vs Linux debug_meta investigation
mujacica 915c136
Add diagnostic logging for Windows vs Linux debug_meta investigation
mujacica 82a8dc8
Add debug_file and fix code_id format for Windows native backend
mujacica a0cf1a8
Add debug_file and fix code_id format for Windows native backend
mujacica 524284a
More windows fixes + PR fixes
mujacica e1a6733
Fix minidump writer issues from PR review
mujacica bd1d965
Fix minidump writer issues from PR review (part 2)
mujacica d10823f
Fix shared memory corruption and ELF parsing infinite loop
mujacica 949d3da
Add arch field for Windows PE modules and device context
mujacica fbd8c24
Refactor duplicated sanitizer detection preprocessor logic
mujacica abd8cd6
Fix tests/comments/changelog
mujacica 9b8bc7a
Fix native stacktrace format to match minidump events
mujacica 0269a16
Fix PR review comments: E2E workflow and macOS thread_get_state
mujacica 67585f0
Fix PR review comments: E2E workflow and macOS thread_get_state
mujacica 340ba2f
Refactor minidump writers and fix PR review comments
mujacica 0b6f63c
Fix Bugbot issues: overflow check, unused struct and constant
mujacica acbf4c2
Fix duplicate stacktrace in threads for envelope-only mode
mujacica 987b23c
Ensure code_id uses uppercase hex digits
mujacica 5fa4d45
Fix integer overflow in ELF section header size calculation
mujacica 9fea947
Fix async-signal-unsafe functions in crash signal handler
mujacica 0841881
Fix Windows exception code sent as negative number
mujacica 209c8e5
Fix UTF-8 to UTF-16LE conversion for non-ASCII characters
mujacica 49b1569
Add Windows thread deduplication in native crash events
mujacica ce42364
Capture Windows thread contexts for proper stack walking
mujacica 7e2ab4d
Add defensive thread deduplication at event-building level
mujacica bc98a66
Remove redundant memset in Linux IPC initialization
mujacica 5f5bc0c
Remove workaround deduplication and add diagnostic logging
mujacica 607ba1c
Fix unchecked lseek return values and formatting issues
mujacica 89476ba
Add diagnostic logging for thread duplication investigation
mujacica 61daa45
Add thread duplication detection and daemon log printing to E2E tests
mujacica 7dbafd4
Fix format
mujacica 8061d62
Add detailed thread debugging to E2E tests
mujacica 9647e5f
Fix PR comment
mujacica c590fcb
Speed up linux tests
mujacica 7170e73
Fix register usages
mujacica c8500f9
Fix CHANGELOG
mujacica f53c927
Fix Bugbot comments
mujacica 657c2ce
fix: detect Windows daemon start failure and add native backend to cr…
mujacica 5baf169
fix: move changelog entry to Unreleased section
mujacica 7f01802
fix: link sentry-crash to vendored libunwind target on Linux
mujacica d4e465a
fix: swap ARM64 fpcr/fpsr field order and ptrace attach to crashed TID
mujacica ab121cf
Fix failing tests
mujacica c7b201d
fix: formatting and improved idle-based batcher flush
mujacica cfbb65b
fix: clean up corrupt minidump files, remove duplicate CMake sources,…
mujacica 1ad7a8a
style: fix black formatting in test_e2e_sentry.py
mujacica 778dc14
fix: daemon compile defs, minidump header offset, RVA overflow, batch…
mujacica 41e6df6
fix: widen current_offset to uint64_t so RVA overflow guard works, ze…
mujacica 77e8772
fix: match current_offset type (uint64_t) in platform minidump writer…
mujacica 4ca17f5
fix: aarch64 Linux register off-by-one and Windows FULL mode process …
mujacica 7a4a26d
fix: move mctx variable inside x86_64 block to fix unused variable wa…
mujacica 7b0e128
fix: guard against write failures in minidump writers
mujacica 4f3e376
fix: thread context size after ptrace, macOS bytes_read check, paddin…
mujacica 7137353
Fix E2E Tests
mujacica dc72ba9
fix: restrict macOS SMART mode memory regions and guard RVA overflow
mujacica d56423d
E2E Test fixes
mujacica 049d06e
style: fix black formatting in test_e2e_sentry.py
mujacica 95c5c0a
fix: correct OS type constants and stack lookup for non-main threads
mujacica 888b29c
fix: malloc(0) on empty modules, missing MiscInfo stream, _XOPEN_SOUR…
mujacica 540f5e3
fix: mach port leak, FPU pointer truncation, opcode, stream count
mujacica 0ed072e
fix: zero descriptor size when write_data fails for stacks and memory
mujacica efa6859
fix: skip __PAGEZERO in macOS module size, guard fallback stack write
mujacica c6664d0
refactor: remove artificial idle threshold from batcher timer
mujacica 0801c46
docs: mark native backend as experimental
mujacica 2cbe481
fix: reject byte-swapped Mach-O in extract_macho_uuid
mujacica d95a326
Update src/sentry_batcher.c
mujacica 80a09db
style: wrap long comment line in batcher to satisfy clang-format
mujacica File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| name: E2E Integration Tests | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - master | ||
| - "release/**" | ||
| pull_request: | ||
|
|
||
| concurrency: | ||
| group: e2e-${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| e2e-test: | ||
| name: E2E Test (${{ matrix.os }}) | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| os: [ubuntu-latest, windows-latest, macos-latest] | ||
|
|
||
| runs-on: ${{ matrix.os }} | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| submodules: recursive | ||
|
|
||
| - name: Install dependencies (Linux) | ||
| if: runner.os == 'Linux' | ||
| run: | | ||
| sudo apt update | ||
| sudo apt install -y cmake libcurl4-openssl-dev | ||
|
|
||
| - name: Set up Python | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: "3.12" | ||
|
|
||
| - name: Install test dependencies | ||
| run: pip install -r tests/requirements.txt | ||
|
|
||
| - name: Add hosts entry (Linux/macOS) | ||
| if: runner.os != 'Windows' | ||
| run: sudo sh -c 'echo "127.0.0.1 sentry.native.test" >> /etc/hosts' | ||
|
|
||
| - name: Add hosts entry (Windows) | ||
| if: runner.os == 'Windows' | ||
| shell: pwsh | ||
| run: Add-Content C:\Windows\System32\drivers\etc\hosts "127.0.0.1 sentry.native.test" | ||
|
|
||
| - name: Run E2E tests | ||
| env: | ||
| SENTRY_E2E_DSN: ${{ secrets.SENTRY_E2E_DSN }} | ||
| SENTRY_E2E_AUTH_TOKEN: ${{ secrets.SENTRY_E2E_AUTH_TOKEN }} | ||
| SENTRY_E2E_ORG: ${{ secrets.SENTRY_E2E_ORG }} | ||
| SENTRY_E2E_PROJECT: ${{ secrets.SENTRY_E2E_PROJECT }} | ||
| run: pytest --capture=no --verbose tests/test_e2e_sentry.py | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.