Fix incorrect timeout causing WSL1 OOBE to fail if the OOBE process takes longer than 30 seconds#13517
Merged
Fix incorrect timeout causing WSL1 OOBE to fail if the OOBE process takes longer than 30 seconds#13517
Conversation
…akes longer than 30 seconds
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR fixes a timeout issue in WSL1 OOBE (Out of Box Experience) where the process would fail if it took longer than 30 seconds to complete, which could happen when waiting for user input.
- Removes the default 30-second timeout for OOBE message reception by passing
INFINITEtimeout - Refactors timeout handling to use a configurable parameter instead of hardcoded constants
- Centralizes timeout value definition to improve maintainability
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| LxssInstance.cpp | Updates OOBE message reception to use infinite timeout with explanatory comment |
| LxssMessagePort.h | Adds configurable timeout parameter to Receive method and defines default timeout constant |
| LxssMessagePort.cpp | Implements timeout parameter in Receive method and replaces hardcoded timeout values |
| void LxssMessagePort::WaitForMessage(_In_ PIO_STATUS_BLOCK IoStatus, _In_ DWORD Timeout) const | ||
| { | ||
| const DWORD WaitStatus = WaitForSingleObject(m_messageEvent.get(), LAUNCH_PROCESS_DEFAULT_TIMEOUT_MS); | ||
| const DWORD WaitStatus = WaitForSingleObject(m_messageEvent.get(), Timeout); |
There was a problem hiding this comment.
The WaitForMessage function parameter Timeout is not being used - it's using the passed Timeout parameter instead of the method's own Timeout parameter. This could cause issues if callers expect the method's Timeout parameter to be respected.
benhillis
approved these changes
Sep 24, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of the Pull Request
If the OOBE process for a WSL1 distros takes more than 30 seconds, we'll hit the
LAUNCH_PROCESS_DEFAULT_TIMEOUT_MStimeout which will cause the channel to be closed, which will fail the OOBE, causing all sorts of issues.This change removes the timeout for this specific transaction, so we don't fail WSL1 OOBE if it takes more than 30 seconds to complete
PR Checklist
Detailed Description of the Pull Request / Additional comments
This issue could cause OOBE failures looking like this:
Validation Steps Performed