Skip to content

Conversation

@kvega005
Copy link

@kvega005 kvega005 commented Jan 7, 2026

Summary of the Pull Request

This change eliminates an unnecessary write to /proc/sys/kernel/core_pattern in WSLAInit after the chroot operation. Crash dump collection is already configured at the WSLAEntryPoint before chroot, so the post-chroot write adds no value.

After chroot, /proc is not mounted in the new root, causing the write to fail. The failed write previously logged an error, creating noise without functional impact.

Additionally, this PR moves the WSLAEnableCrashDumpCollection call to later in WSLAEntryPoint so that logging is fully initialized when crash dump collection is enabled.

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 January 7, 2026 23:14
@kvega005 kvega005 requested a review from a team as a code owner January 7, 2026 23:14
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR eliminates a dmesg warning by removing an unnecessary call to WSLAEnableCrashDumpCollection() after chroot. The function writes to /proc/sys/kernel/core_pattern, but after chroot, /proc is not mounted in the new root, causing the write to fail and generate error logs. The crash dump collection is already configured earlier in WSLAEntryPoint before any chroot occurs, so the post-chroot call was redundant.

Key Changes:

  • Removed redundant WSLAEnableCrashDumpCollection() call after chroot operation in HandleMessageImpl
  • Moved the WSLAEnableCrashDumpCollection() call to execute after logging initialization in WSLAEntryPoint

}

//
// Enable dump colleciton when processes crash.
Copy link

Copilot AI Jan 7, 2026

Choose a reason for hiding this comment

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

Spelling error: "colleciton" should be "collection".

Suggested change
// Enable dump colleciton when processes crash.
// Enable dump collection when processes crash.

Copilot uses AI. Check for mistakes.
Copy link
Collaborator

@OneBlue OneBlue left a comment

Choose a reason for hiding this comment

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

LGTM. Let's just fix the typo that copilot pointed out and we're good to merge this

@benhillis
Copy link
Member

Looks like the test isn't passing.

@kvega005 kvega005 merged commit 23bda7c into microsoft:feature/wsl-for-apps Jan 13, 2026
6 checks passed
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