Skip to content

feat(native): add opt-in async crash upload mode - #1739

Merged
jpnurmi merged 16 commits into
masterfrom
jpnurmi/ref/native-shutdown
May 27, 2026
Merged

jpnurmi merged 16 commits into
masterfrom
jpnurmi/ref/native-shutdown

Conversation

@jpnurmi

@jpnurmi jpnurmi commented May 21, 2026

Copy link
Copy Markdown
Collaborator

Add opt-in async crash upload mode so crashed apps can exit early after crash data is captured, while the crash daemon finishes potentially large uploads in the background.

SENTRY_CRASH_UPLOAD_MODE_SYNC (default)

before.mov

SENTRY_CRASH_UPLOAD_MODE_ASYNC

after.mov

Comment thread tests/assertions.py
@jpnurmi jpnurmi changed the title wip(native): let crashed app exit early wip(native): let crashed app exit before upload May 22, 2026
Comment thread tests/__init__.py
@jpnurmi
jpnurmi force-pushed the jpnurmi/ref/native-shutdown branch from e28c5e6 to 6f63ac9 Compare May 22, 2026 07:19
Comment thread tests/assertions.py Outdated
Comment thread tests/test_e2e_sentry.py Outdated
@jpnurmi jpnurmi changed the title wip(native): let crashed app exit before upload ref(native): let crashed app exit before upload May 22, 2026
@jpnurmi jpnurmi changed the title ref(native): let crashed app exit before upload feat(native): add opt-int async crash upload mode May 22, 2026
@github-actions

github-actions Bot commented May 22, 2026

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 d68caf6

@jpnurmi
jpnurmi requested review from bitsandfoxes and mujacica May 22, 2026 11:14
@jpnurmi
jpnurmi force-pushed the jpnurmi/ref/native-shutdown branch from a937e38 to c6d00c6 Compare May 22, 2026 13:19
Comment thread tests/assertions.py
@jpnurmi jpnurmi changed the title feat(native): add opt-int async crash upload mode feat(native): add opt-in async crash upload mode May 22, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 513401a. Configure here.

Comment thread src/backends/native/sentry_crash_daemon.c
Only mark async native crashes as captured after the daemon hands the crash
envelope to the external reporter or transport. This keeps failed capture paths
from unblocking the crashed process as if crash data was durable.

Co-Authored-By: OpenAI Codex <noreply@openai.com>
@jpnurmi
jpnurmi merged commit fca837b into master May 27, 2026
62 checks passed
@jpnurmi
jpnurmi deleted the jpnurmi/ref/native-shutdown branch May 27, 2026 12:21
social4hyq pushed a commit to social4hyq/homebrew-core that referenced this pull request Sep 20, 2026
sentry-native 0.15.0

Created-by: HarmonybrewBot
Commit-by: HarmonybrewBot
Merged-by: HarmonybrewBot
Description: Created by `brew bump`

---

Created with `brew bump-formula-pr`.

- [ ] `resource` blocks have been checked for updates.
<details>
  <summary>release notes</summary>
  <pre>**Breaking**:

- `sentry_value_incref` now returns `sentry_value_t` and `sentry_value_decref` returns `int` (0 if freed). ([#1763](getsentry/sentry-native#1763))

**Features**:

- Native: add opt-in async crash upload mode so crashed apps can exit early after crash data is captured, while the crash daemon finishes potentially large uploads in the background. ([#1739](getsentry/sentry-native#1739))
- Native/Linux: symbolicate stack frames in the crash daemon. ([#1747](getsentry/sentry-native#1747), [#1764](getsentry/sentry-native#1764))
- Add a `transfer_timeout` option for SDK-managed HTTP transports. ([#1741](getsentry/sentry-native#1741))
- Apple: use `os_sync_wait_on_address` for the level-triggered waitable flag in the batcher on modern macOS(14.4+) and iOS(17.4+). ([#1765](getsentry/sentry-native#1765))
- Native/macOS: add thread names. ([#1766](getsentry/sentry-native#1766))
- Add Upload-Metadata header to TUS requests. ([#1795](getsentry/sentry-native#1795))

**Fixes**:

- Native/macOS: crash reports now include full stack traces for all threads. Previously, non-crashing threads showed only a single frame. ([#1768](getsentry/sentry-native#1768))
- Native/Linux: resolve function names for the crashed thread's stacktrace from on-disk ELF symbol tables in the crash daemon, so the most important thread gets symbolicated without ptrace. ([#1764](getsentry/sentry-native#1764))
- Finish active trace on crash. ([#1667](getsentry/sentry-native#1667))
- Native/macOS: fix module `image_size` computation, which could have caused the symbolicator to misattribute every frame to the lowest-addressed image (typically `dyld` or `libsystem`). ([#1740](getsentry/sentry-native#1740))
- Native: raise `SENTRY_CRASH_MAX_MODULES` from `512` to `2048` so processes that load many shared libraries no longer have their minidump module list truncated, which left frames in unrecorded modules without a `debug_id` and unsymbolicatable.
  ([#1738](getsentry/sentry-native#1738))
- Reject overly deep JSON and msgpack payloads during deserialization. ([#1727](getsentry/sentry-native#1727), [#1748](getsentry/sentry-native#1748))
- Read lengths for variadic fingerprints. ([#1730](getsentry/sentry-native#1730))
- Guard against JSON token allocation overflow on 32-bit platforms. ([#1733](getsentry/sentry-native#1733))
- Windows: fix HTTP rate limit response header parsing. ([#1732](getsentry/sentry-native#1732))
- POSIX: prevent condition-variable timeout overflow from busy-spinning flush and shutdown waits. ([#1731](getsentry/sentry-native#1731))
- Native/macOS: fix thread stack descriptor. ([#1726](getsentry/sentry-native#1726))
- Native/macOS: honor the `system_crash_reporter_enabled` option. ([#1743](getsentry/sentry-native#1743))
- Cap rate-limit retry-after values at 24 hours to prevent a MITM-provided response from disabling event delivery for the process lifetime. ([#1744](getsentry/sentry-native#1744))
- Fix a shutdown-time use-after-free window in `sentry_close()`. ([#1750](getsentry/sentry-native#1750))
- curl: free duplicate HTTP response headers to avoid potential leaks. ([#1791](getsentry/sentry-native#1791))
- Native: validate ELF header entry sizes. ([#1746](getsentry/sentry-native#1746))
- Native: clamp `module_count` from the shared crash context. ([#1770](getsentry/sentry-native#1770))
- Prevent database cleanup from following symlinks in run and cache directories. ([#1751](getsentry/sentry-native#1751))
- Structured logs: respect printf argument widths when extracting log parameters to avoid stack-data disclosure and corrupted attributes on 32-bit platforms. ([#1752](getsentry/sentry-native#1752))
- Fix TOCTOU races in transaction/span refcounting by switching to the atomic decref return value. ([#1763](getsentry/sentry-native#1763))
- Fix signed-to-unsigned cast in rate-limit parsing to prevent permanent event suppression. ([#1790](getsentry/sentry-native#1790))
- Fix a potential out-of-bounds read when parsing non-NUL-terminated `sentry-trace` headers. ([#1749](getsentry/sentry-native#1749))
- Harden ELF note parsing against overflow and OOB reads. ([#1773](getsentry/sentry-native#1773))
- Fix memory leak in session deserialization on malformed cached files. ([#1789](getsentry/sentry-native#1789))
- Fix division by zero when breadcrumbs are disabled. ([#1767](getsentry/sentry-native#1767))
- Native: escape JSON attachments. ([#1771](getsentry/sentry-native#1771))
- Reject NaN sample rates. ([#1788](getsentry/sentry-native#1788))
- Handle memory allocation failures during JSON serialization to prevent truncated output. ([#1772](getsentry/sentry-native#1772))
- Guard against overflow in string cloning in internal string utilities. ([#1787](getsentry/sentry-native#1787))
- Fix a file descriptor leak in old-run processing. ([#1792](https://github.com/getsentry/sentry-native/pull/1792))</pre>
  <p>View the full release notes at <a href="https://github.com/getsentry/sentry-native/releases/tag/0.15.0">https://github.com/getsentry/sentry-native/releases/tag/0.15.0</a>.</p>
</details>
<hr>

See merge request: Harmonybrew/homebrew-core!11334
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.

2 participants