Skip to content

fix(native): retry Windows minidumps with the copied exception context - #2353

Merged
jpnurmi merged 3 commits into
v1from
jpnurmi/fix/native-minidump-xstate
Dec 1, 2026
Merged

jpnurmi merged 3 commits into
v1from
jpnurmi/fix/native-minidump-xstate

Conversation

@jpnurmi

@jpnurmi jpnurmi commented Nov 27, 2026 •

Copy link
Copy Markdown
Collaborator

The minidump-only cases of test_native_scope_updates_without_snapshot have lately been failing with AssertionError: Wait timeout occurred on some windows-2022 runners:

The root cause is visible in daemon logs:

MiniDumpWriteDump failed: 2147942699
Minidump mode requires minidump, but minidump failed

0x8007012B is ERROR_PARTIAL_COPY. With ClientPointers=TRUE, dbghelp reads the remote context sized by the enabled XSTATE features. With AMX (Intel Advanced Matrix Extensions) enabled in XSTATE 0x608e7, that is 11.3 KiB, which runs past the 6.6-8.0 KiB of stack above the context of this shallow crash.

Retry with the copied exception record and context, as the WER path already does, and as Crashpad reads only sizeof(CONTEXT) of the exception context. Clear CONTEXT_XSTATE in the copy, which only holds sizeof(CONTEXT). On an AMX runner, all 10 minidump-only crashes then produced a minidump.

Verification:

The minidump-only cases of `test_native_scope_updates_without_snapshot`
fail on some `windows-2022` runners with `AssertionError: Wait timeout
occurred`, because the daemon drops the crash:

    MiniDumpWriteDump failed: 2147942699
    Minidump mode requires minidump, but minidump failed

`0x8007012B` is `ERROR_PARTIAL_COPY`. With `ClientPointers=TRUE`,
dbghelp reads the remote context sized by the enabled XSTATE features.
With AMX enabled (XSTATE `0x608e7`), that is 11.3 KiB, which runs past
the 6.6-8.0 KiB of stack above the context of this shallow crash.

Retry with the copied exception record and context, as the WER path
already does, and as Crashpad reads only `sizeof(CONTEXT)` of the
exception context. Clear `CONTEXT_XSTATE` in the copy, which only holds
`sizeof(CONTEXT)`. On an AMX runner, all 10 minidump-only crashes then
produced a minidump.

Failures:
- https://github.com/getsentry/sentry-native/actions/runs/43460190688/job/132004723418
- https://github.com/getsentry/sentry-native/actions/runs/44277473923/job/134709168872
- https://github.com/getsentry/sentry-native/actions/runs/44277473923/job/134709168940
- https://github.com/getsentry/sentry-native/actions/runs/44509847830/job/135510909755
- https://github.com/getsentry/sentry-native/actions/runs/45645459970/job/139315482377
- https://github.com/getsentry/sentry-native/actions/runs/45789616342/job/139805024432
- https://github.com/getsentry/sentry-native/actions/runs/45972837352/job/140473685255

Verification:
https://github.com/getsentry/sentry-native/actions/runs/46023305396/job/140596731823
@jpnurmi
jpnurmi force-pushed the jpnurmi/fix/native-minidump-xstate branch from b5cd33e to 2fccaae Compare November 27, 2026 16:50
CONTEXT_XSTATE and CONTEXT_CONTROL are signed long constants, which
fails the ClangCL build with -Wsign-conversion.
@jpnurmi
jpnurmi merged commit 5d87754 into v1 Dec 1, 2026
82 of 83 checks passed
@jpnurmi
jpnurmi deleted the jpnurmi/fix/native-minidump-xstate branch December 1, 2026 05:57
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