Skip to content

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

@Kobby-Bawuah

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    .NETPull requests that update .net codeFeatureNew feature or request
    No fields configured for issues without a type.

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions