Skip to content

Full-memory minidumps: FULL mode is truncated on Linux/macOS and unavailable for crashpad/breakpad #2217

Closed

Description

@dorl-neo

Problem Statement

We need complete process memory in crash dumps on Windows, macOS and Linux to debug heap corruption, use-after-free, and a bad value read from a heap object several frames before the crash. Today none of the backends delivers that on all three platforms:

  • crashpad / breakpad: sentry_options_set_minidump_mode() and sentry_options_set_minidump_flags() are documented as native-only, so these backends have no way to ask for more than the default minidump.
  • native, Windows: SENTRY_MINIDUMP_MODE_FULL maps to MiniDumpWithFullMemory (sentry_minidump_windows.c#L71). This one works as expected.
  • native, Linux: FULL selects every readable mapping, but each region is cut to its first 4 MB by a hard-coded MAX_REGION_SIZE that also applies in FULL mode (sentry_minidump_linux.c#L2311). Large heap arenas and big anonymous mappings are silently truncated.
  • native, macOS: the same 4 MB cap applies per region (sentry_minidump_macos.c#L1638). Memory capture also depends on task_for_pid() on the crashed process (L1753). When that call fails, which is common for signed, hardened-runtime apps, the writer falls back to a minimal dump with no process memory, whatever mode was selected.

So a user who sets SENTRY_MINIDUMP_MODE_FULL gets a full dump only on Windows. On Linux and macOS they get a partial dump, or none of the requested memory, and nothing tells them.

Solution Brainstorm

  1. Make FULL mean full in the native backend on Linux and macOS: don't apply the 4 MB per-region cap in FULL mode, or make the cap configurable, for example with a total-size budget setter, so users control the trade-off.
  2. macOS without task_for_pid: document the entitlement and runtime requirements for FULL. If possible, capture memory from the in-process handler, or hand a task port from the crashing process to the daemon at init, so that hardened apps also get memory. At minimum, log a warning when FULL was requested but only a minimal dump could be written.
  3. Extend sentry_options_set_minidump_mode() (and the Windows flags) to the crashpad backend on all three platforms. On Windows, forward the mode or flags to crashpad_handler. On macOS and Linux, have the Crashpad snapshot include all readable mappings. SMART could map to Crashpad's existing gather_indirectly_referenced_memory, which sentry-native doesn't expose today.

If (3) is out of scope, (1) and (2) alone would give users one backend with reliable full dumps on all three platforms.

Product Area

Settings

Activity

  1. linear-code commented on Oct 18, 2026

    @linear-code
  2. moved this to Waiting for: Product Owner in GitHub Issues with 👀 3on Oct 18, 2026
  3. added
    Improvement
    on Oct 18, 2026
  4. jpnurmi commented on Oct 19, 2026

    @jpnurmi
    Collaborator

    Thanks for the proposal. We'll take a look at what we can do. Not yet sure whether dropping the arbitrary limit for FULL is the way to go. It's tempting because of the name, but it could cause issues when too much is too much. 🙂 Perhaps we can either do something with the existing minidump_flags or expose another explicit limit option alongside.

  5. moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀 3on Oct 19, 2026
  6. self-assigned this
    on Nov 5, 2026
  7. added 3 commits that reference this issue on Nov 5, 2026
    ae14476
    860f381
    3bd87aa
  8. jpnurmi commented on Nov 6, 2026

    @jpnurmi
    Collaborator

    We decided to make MINIDUMP_MODE_FULL mean full on all platforms, as it already did on Windows. The fix has been merged into the v1 branch and will be available in a 1.0 pre-release in the near future:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Improvement

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions