WSL: WSL 2 fails to start when mapped network drive is unreachable

Windows Version

Microsoft Windows [Version 10.0.22621.2134]

WSL Version

1.2.5.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

5.15.90.1

Distro Version

Debian 11

Other Software

Windows Terminal

Repro Steps

  1. Map a network drive which requires a VPN connection to access.
  2. Disconnect from the VPN.
  3. Kill any existing WSL processes.
  4. Attempt to launch WSL.

The issue persists with any distro I’ve tried, not just Debian–it’s happened with all available versions of Ubuntu as well.

Expected Behavior

WSL should start. Updated September 8: WSL should start as quickly as normal, within a few seconds.

Actual Behavior

~WSL does not start. When opened through Windows Terminal, it presents a black screen with no interaction. (I have waited about 10 minutes on several occasions to be sure, and it never gave me an interactive prompt).~

~PowerShell also does not launch after trying to open WSL (works fine if opening PowerShell before launching WSL), unless run as administrator; it never reaches an input prompt. If an instance of PowerShell is already running, all WSL commands run in PowerShell will hang and result in no output, and will not be reliable interruptible with Ctrl+C.~

Updated/corrected September 8: WSL takes in excess of 10+ minutes to start up, during which time PowerShell will usually fail to start if I have not already launched it since last rebooting. If I already have a PowerShell window open, all wsl commands excelt wsl --version will hang, providing no output and not responding to Ctrl+C interrupts, until WSL fully starts up. (Updated September 11) If I try to open a WSL window during this time, e.g. to get a bash prompt inside of my Debian instance, the Windows Terminal tab will be completely blank and have no interactivity for a long period of time (the 10+ minutes mentioned before). WSL seems to be hanging during startup at some point before it gets to an interactive bash prompt, and this seems to be causing all wsl commands run from powershell/cmd.exe to also hang until everything initializes.

(Updated September 15th) The 10+ minute startup is a one-time thing. After WSL is up and running, it behaves as normal, including opening new shells basically instantly.

Diagnostic Logs

Disconnecting all network drives, or re-connecting to the VPN, allows WSL and PowerShell to behave as expected. However, regularly disconnecting and reconnecting to the network drives is not a viable workaround.

Launching WSL on the VPN, then disconnecting from the VPN, causes no issues. The issue occurs exclusively when first launching WSL.

My %userprofile%/wslconfig file only has the debug console enabled. All other values are at defaults.

Within WSL, /etc/fstab has no entries; it’s the default that came with the WSL instance.

This behavior has been around for me since Windows 10 (I forget the build number; just got a new laptop with Windows 11, and I no longer have access to the Windows 10 computer to check).

This behavior persists when doing a fresh install of any chosen WSL distribution.

~Possibly related~ (Updated September 8) Related issues: #9570, #9358 - both mention slow startup times when network drives are unreachable ~but for me, the WSL instance fails to start entirely~.

WSL logs: WslLogs-2023-09-07_09-21-16.zip

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 2
  • Comments: 21 (1 by maintainers)

Most upvoted comments

@aiyou9 Thanks for finding that–I don’t have a LIghtWeight Filter entry for my network adapters, though. But maybe someone else can confirm that this helps?

The issue has indeed been fixed in 2.2.3.

Closing.

remove the network LightWeight Filter in my web connect setting image

the network LightWeight Filter also stop my web connecting before i install distrubution by wsl2

net stop wslservice
net start wslservice

and then wsl2 work so please check web connect before using wsl2

I do not have any (inaccessible/network) drive mappings, but I still experienced the same 10-second+ wsl boot time issue. I followed the recommendation of setting automount=false in my wsl.conf file (provider flag workarounds are not relevant since I do not have them).

[    4.801133] systemd-journald[40]: Received client request to flush runtime journal.
[    5.572900] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2
[    5.763168] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2
[    5.763435] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2
[    5.763616] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2
[    5.763812] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2
[    5.764003] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2
[    5.764186] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2
[    5.764372] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2
[    5.764555] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2
[    5.764739] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2
[    5.764923] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2
[    5.765109] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2
[    5.765290] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2
[    5.765472] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2
[    6.160290] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2