Skip to content

Add crash dump callback#40674

Open
kvega005 wants to merge 11 commits into
microsoft:masterfrom
kvega005:sdkCrashNotifications
Open

Add crash dump callback#40674
kvega005 wants to merge 11 commits into
microsoft:masterfrom
kvega005:sdkCrashNotifications

Conversation

@kvega005

Copy link
Copy Markdown
Contributor

Summary of the Pull Request

Allows users to specify a callback that gets invoked after a crash dump is successfully written.

PR Checklist

  • Closes: Link to issue #xxx
  • Communication: I've discussed this with core contributors already. If work hasn't been agreed, this work might be rejected
  • Tests: Added/updated if needed and all pass
  • Localization: All end user facing strings can be localized
  • Dev docs: Added/updated if needed
  • Documentation updated: If checked, please file a pull request on our docs repo and link it here: #xxx

Detailed Description of the Pull Request / Additional comments

Validation Steps Performed

Copilot AI review requested due to automatic review settings May 29, 2026 21:11

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds crash dump callback support for WSLC sessions so SDK callers can be notified after a Linux crash dump is written.

Changes:

  • Adds ICrashDumpCallback to the WSLC COM IDL and wires it through session settings into WSLCVirtualMachine.
  • Adds public SDK callback types and WslcSetSessionSettingsCrashDumpCallback.
  • Adds crash dump callback tests for both WSLC COM/session behavior and the C SDK wrapper.

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/windows/service/inc/wslc.idl Defines the new COM callback interface and adds callback fields to session settings.
src/windows/service/exe/WSLCSessionManager.cpp Passes crash dump callback settings into per-user session initialization.
src/windows/wslcsession/WSLCVirtualMachine.h Stores the optional crash dump callback on the VM object.
src/windows/wslcsession/WSLCVirtualMachine.cpp Invokes the callback after writing a crash dump.
src/windows/WslcSDK/wslcsdk.h Adds public SDK callback types and setter declaration.
src/windows/WslcSDK/wslcsdk.cpp Creates and retains the COM bridge callback and exposes the new setter.
src/windows/WslcSDK/WslcsdkPrivate.h Extends internal session settings and session handle state for the callback.
src/windows/WslcSDK/CrashDumpCallback.h Declares the SDK-to-COM callback bridge.
src/windows/WslcSDK/CrashDumpCallback.cpp Implements the SDK-to-COM callback bridge.
src/windows/WslcSDK/CMakeLists.txt Adds the new callback bridge files to the SDK build.
src/windows/WslcSDK/wslcsdk.def Exports the new callback setter.
msipackage/package.wix.in Registers the new COM interface proxy/stub.
test/windows/WSLCTests.cpp Adds COM-level crash dump callback validation.
test/windows/WslcSdkTests.cpp Adds SDK-level crash dump callback validation.

Comment thread src/windows/wslcsession/WSLCVirtualMachine.cpp Outdated
Comment thread src/windows/WslcSDK/wslcsdk.h Outdated
@kvega005 kvega005 marked this pull request as ready for review June 1, 2026 17:51
@kvega005 kvega005 requested a review from a team as a code owner June 1, 2026 17:51
Copilot AI review requested due to automatic review settings June 1, 2026 17:51

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 14 out of 14 changed files in this pull request and generated 3 comments.

Comment thread src/windows/wslcsession/WSLCVirtualMachine.cpp
Comment thread test/windows/WSLCTests.cpp Outdated
Comment thread src/windows/WslcSDK/wslcsdk.h Outdated
@kvega005 kvega005 marked this pull request as draft June 1, 2026 18:00
Copilot AI review requested due to automatic review settings June 8, 2026 21:01

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 16 out of 16 changed files in this pull request and generated 4 comments.

Comment thread src/windows/wslcsession/WSLCSession.cpp
Comment thread src/windows/service/inc/wslc.idl
Comment thread src/windows/wslcsession/WSLCSession.cpp
Comment thread test/windows/WSLCTests.cpp
@kvega005 kvega005 marked this pull request as ready for review June 8, 2026 22:30
Copilot AI review requested due to automatic review settings June 8, 2026 22:30

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 16 out of 16 changed files in this pull request and generated 2 comments.

Comment thread src/windows/wslcsession/WSLCSession.h Outdated
Comment thread src/windows/service/inc/wslc.idl
Comment thread src/windows/wslcsession/WSLCSession.cpp
Comment thread src/windows/wslcsession/WSLCVirtualMachine.cpp
Copilot AI review requested due to automatic review settings June 9, 2026 20:10

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 16 out of 16 changed files in this pull request and generated 4 comments.

Comment thread src/windows/service/inc/wslc.idl
Comment thread src/windows/service/inc/wslc.idl
Comment thread src/windows/WslcSDK/wslcsdk.h
Comment thread src/windows/WslcSDK/CrashDumpCallback.cpp
OneBlue
OneBlue previously approved these changes Jun 9, 2026

@OneBlue OneBlue left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. This branch will need to be rebased once #40756 is merged

Comment thread test/windows/WslcSdkTests.cpp Outdated
Copilot AI review requested due to automatic review settings June 9, 2026 21:35

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 16 out of 16 changed files in this pull request and generated 3 comments.

Comment thread src/windows/service/inc/wslc.idl
Comment thread src/windows/WslcSDK/wslcsdk.cpp
Comment thread src/windows/wslcsession/WSLCSession.cpp
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.

3 participants