Repository navigation
fix(native): use app .run for crash daemon - #1976
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #1976 +/- ##
==========================================
+ Coverage 74.31% 74.50% +0.18%
==========================================
Files 104 104
Lines 25638 25609 -29
Branches 4627 4621 -6
==========================================
+ Hits 19054 19081 +27
+ Misses 5281 5234 -47
+ Partials 1303 1294 -9 🚀 New features to boost your workflow:
|
Have the native crash daemon adopt the application's existing .run instead of creating a second unrelated .run, and store daemon logs, minidumps, crash envelopes, and signal-handler scratch files within that .run. Protect daemon-owned work with a dedicated `.run.daemon.lock` so old-run processing waits for completion. Keep retry cache and external storage database-global, and leave crashed runs for normal next-launch cleanup.
jpnurmi
force-pushed
the
jpnurmi/ref/native-run
branch
from
August 12, 2026 16:40
d373b92 to
d5faff5
Compare
jpnurmi
commented
Aug 13, 2026
| sentry_value_decref(crash_event); | ||
| } | ||
|
|
||
| // Send all other envelopes from run folder (logs, etc.) before cleanup |
Collaborator
Author
There was a problem hiding this comment.
Tip
👆 The other envelopes are now already processed earlier by the sentry__process_run_envelope call above. Such an extra envelope is already covered by test_native_session_tracking.
mujacica
approved these changes
Aug 17, 2026
1 task
social4hyq
pushed a commit
to social4hyq/homebrew-core
that referenced
this pull request
Sep 20, 2026
sentry-native 0.16.4 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>**Features**: - Windows: report WINE and Proton metadata in a separate runtime context. ([#1995](getsentry/sentry-native#1995)) - Add a public custom HTTP transport client interface (`sentry_http_transport_new`) so applications can plug in their own HTTP client (e.g. platform-native ones) while sentry-native continues to own request queueing, retry/backoff, offline caching, rate-limiting, and client reports. The built-in curl and WinHTTP transports are now implemented against this same interface. ([#1987](getsentry/sentry-native#1987)) - Native/Windows: capture WER report ID and expose as `contexts.wer.report_id` in crash events when the WER integration is enabled. ([#1970](getsentry/sentry-native#1970)) - Add `sentry_set_tags` and `sentry_scope_set_tags` for updating multiple tags with a single scope flush, improving bulk-update performance. ([#1993](getsentry/sentry-native#1993)) - Add `on_crashed_last_run` callback for inspecting crash envelopes from previous runs. ([#1985](getsentry/sentry-native#1985)) - Add `sentry_get_last_event_id` and `sentry_scope_get_last_event_id` for retrieving the last event ID captured with the global or given scope, respectively. ([#1992](getsentry/sentry-native#1992)) - Native/Unix: The native crash daemon now loads `libcurl` dynamically at runtime by default when `SENTRY_LINK_CURL=AUTO`, avoiding `libcurl` linker work during process startup and significantly speeding up startup time. Explicitly set `SENTRY_LINK_CURL=ON` to link it directly. ([#1955](getsentry/sentry-native#1955)) - Add missing public scope mutators: `set_release`, `set_environment`, `set_transaction`, `remove_tag`, `remove_extra`, `remove_context`, and `remove_attachment`. ([#2011](getsentry/sentry-native#2011)) **Deprecations**: - Deprecate `sentry_options_get/set_enable_logs` and `sentry_options_get/set_enable_metrics`. ([#2000](getsentry/sentry-native#2000)) **Fixes**: - Native: store daemon logs, minidumps, crash envelopes, and scratch files in `.run` directories so they are cleaned up with the run instead of accumulating in the database root. Minidumps can still be retained with `cache_keep`, which stores `.dmp` sidecars alongside cached envelopes. ([#1976](getsentry/sentry-native#1976)) - Linux/ARM32: prevent recursive crashes when libunwind receives an unmapped initial instruction pointer during crash handling. ([#1977](getsentry/sentry-native#1977)) - Improve log and metric delivery when telemetry is captured faster than envelopes can be serialized by offloading serialization to an internal thread pool. ([#1946](getsentry/sentry-native#1946)) - Wine: fix OS version detection and cross-compiling Windows builds from Linux. ([#2001](getsentry/sentry-native#2001)) - Destroy condition variables as approriate when no longer needed. ([#2004](getsentry/sentry-native#2004)) - Crashpad/Windows: preserve module CodeView UUIDs for minimal PDB70 records with empty PDB filenames. ([#2003](getsentry/sentry-native#2003)) - Native/Windows: improve crash-processing performance for applications with many threads. ([#2018](getsentry/sentry-native#2018)) - Prevent a race between SDK reinitialization and cleanup of the previous curl client when libcurl is linked directly. ([#2015](https://github.com/getsentry/sentry-native/pull/2015))</pre> <p>View the full release notes at <a href="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/getsentry/sentry-native/releases/tag/0.16.4">https://github.com/getsentry/sentry-native/releases/tag/0.16.4</a>.</p> </details> <hr> See merge request: Harmonybrew/homebrew-core!17725
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Have the native crash daemon adopt the application's existing
.runinstead of creating a second unrelated.run, and store daemon logs, minidumps, crash envelopes, and signal-handler scratch files within that.run.Before this change, every native crash daemon run left its log in the top-level database directory, while every generated minidump remained there after its crash. Neither files were in
.rundirectories, so old-run processing never removed them, so logs accumulated per daemon run and minidumps per qualifying crash.The daemon's unconditional retention of generated minidumps predates PR #1607 and is now redundant. With
cache_keepconfigured, thecache/directory retains each minidump as a separate.dmpalongside its.envelope, subject to configured cache limits. This provides the same direct debugger access without leaving raw minidumps in the database root indefinitely.Protect daemon-owned work with a dedicated
.run.daemon.lockso old-run processing waits for completion. Keep retry cache and external storage database-global, and leave crashed runs for normal next-launch cleanup.Tip
Making the native daemon play by the normal
.runrules is also a pre-requisite for implementingon_crashed_last_runin a clean way, hooked into the shared "process old runs" mechanism used by all backends:on_crashed_last_runcallback #1985