WSL2 refused to start if DNS's port has been occupied by other process
- Dominant language
- C++
- Stars
- 33.7k
- Forks
- 1.8k
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 116
Description
### Windows Version
Microsoft Windows [Version 10.0.22623.1325]
### WSL Version
1.0.1.0
### Are you using WSL 1 or WSL 2?
- [x] WSL 2
- [ ] WSL 1
### Kernel Version
5.15.74.2
### Distro Version
Ubuntu 22.04
### Other Software
SmartDns Rust 0.8.6 running on host windows system
### Repro Steps
1. Install SmartDNS Rust Service on host windows system.(Non-Service Might Also Cause Failure, But I'm not sure)
2. Install WSL2, and run it.
3. Crashes!
### Expected Behavior
The WSL2 Should Start Successful
### Actual Behavior
```
Error: 0xffffffff
Error code: Wsl/Service/CreateInstance/CreateVm/ConfigureNetworking/0xffffffff
```
For Detail, please refer to [Gist](https://gist.github.com/colinxu2020/a9ee1e5c4a3eef439a79097eb5b01f04).
### Diagnostic Logs
STrace Results: [Gist](https://gist.github.com/colinxu2020/a9ee1e5c4a3eef439a79097eb5b01f04)
[WslLogs-2025-05-10_12-05-08.zip](https://github.com/user-attachments/files/20133567/WslLogs-2025-05-10_12-05-08.zip)
P.S. WSL1 works fine in my case
Contributor guide
Research direction
Start by reproducing the WSL2 failure with SmartDNS Rust 0.8.6 occupying the host DNS port, then review the linked Gist, STrace results, and WslLogs archive. Confirm whether the port conflict causes ConfigureNetworking/CreateVm to fail while WSL1 remains functional. Done means WSL2 starts successfully with the host DNS process running, with relevant regression coverage or diagnostics added if the repository supports them.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, rust
- Domain
- networking, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100