Skip to content

Support opt-in crashpad (out-of-proc) for native crash handling in AOT applications #4867

Open

Description

@Kobby-Bawuah

Problem Statement

The .NET SDK's native crash integration uses SENTRY_BACKEND=inproc, which has limitations in containerized/ephemeral environments (e.g., Kubernetes).

When a native crash occurs (SIGSEGV, etc.), the in-process handler may not capture and send the crash before the process terminates. This is especially problematic when:

  • Containers have no persistent storage (no PVC)
  • The orchestrator terminates pods quickly after a crash
  • There's no opportunity for crash-on-restart recovery

Currently, users must disable the SDK's native integration (<SentryNative>false</SentryNative>) and manually configure crashpad with their own watchdog process to reliably capture native crashes.

Solution Brainstorm

  1. Opt-in crashpad package: Bundle crashpad (out-of-proc crash handling) as a separate opt-in NuGet package. This would allow users in containerized environments to get reliable native crash capture without manual setup.

  2. Documentation improvements: Document the current inproc limitations and the <SentryNative>false</SentryNative> opt-out for users who need to manage native crash handling themselves.

  3. Configuration options: Expose options to configure the native crash handler backend (inproc vs crashpad) for advanced use cases.

Context: This request comes from a customer successfully running AOT-compiled .NET 10 apps in Kubernetes who had to implement their own crashpad wrapper to get reliable native crash capture with proper managed + native stack traces.

Activity

  1. added
    Feature
    .NET
    on Jan 23, 2026
  2. linear commented on Jan 23, 2026

    @linear
  3. moved this to Waiting for: Product Owner in GitHub Issues with 👀 3on Jan 23, 2026
  4. moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀 3on Jan 23, 2026
  5. jamescrosswell commented on Jan 26, 2026

    @jamescrosswell
    Collaborator

    I'm not exactly sure how this would work. From the docs, it looks like it's possible to pass a SENTRY_BACKEND=crashpad property to the build process (for the SDK user's app or for Sentry native???) and then make sure crashpad is in the same directory as the application.

    • Does that need to be passed when building SDK user's app or when building Sentry native?
      • If it's Sentry native, we'd need to bundle separate versions of Sentry native 😞
      • If it's when building the user's app, we need to work out what that property does in cmake and see if we can do the same from .NET somehow
    • I'm guessing this wouldn't work on mobile platforms (no permissions to launch a separate process) so would need to disable it for those environments

    References

  6. self-assigned this
    on Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

.NETFeatureState: Needs Discussion

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions