-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Fix dmesg warning from enable crash dump collection #14035
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix dmesg warning from enable crash dump collection #14035
Conversation
There was a problem hiding this 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 inHandleMessageImpl - Moved the
WSLAEnableCrashDumpCollection()call to execute after logging initialization inWSLAEntryPoint
src/linux/init/WSLAInit.cpp
Outdated
| } | ||
|
|
||
| // | ||
| // Enable dump colleciton when processes crash. |
Copilot
AI
Jan 7, 2026
There was a problem hiding this comment.
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".
| // Enable dump colleciton when processes crash. | |
| // Enable dump collection when processes crash. |
OneBlue
left a comment
There was a problem hiding this 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
|
Looks like the test isn't passing. |
Summary of the Pull Request
This change eliminates an unnecessary write to
/proc/sys/kernel/core_patternin WSLAInit after the chroot operation. Crash dump collection is already configured at theWSLAEntryPointbefore 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
Detailed Description of the Pull Request / Additional comments
Validation Steps Performed