WSL: [WSL2] Windows drive not mount, unable to use windows files

  • Your Windows build number: 10.0.18922.1000

  • What you’re doing and what’s happening: Execute wsl in any folder

  • What’s wrong / what should be happening instead: Wsl should start with cwd in windows path ( /mnt/ to folder ), but it just start with cwd in home directory.

This happened from first release of wsl 2, cant reproduce every time. Restart PC or via wsl --shutdown can resolve this problem.

This will cause VScode remote server unable to start because it use relative path to launch wslServer.sh ./scripts/wslServer.sh: No such file or directory

When this happend /mnt/c exist but nothing inside /mnt/c

logs.zip

Some logs in dmesg

[ 6304.157849] EXT4-fs (sda): mounted filesystem with ordered data mode. Opts: discard,errors=remount-ro,data=ordered
[ 6304.276596] ------------[ cut here ]------------
[ 6304.276598] unknown msgtype=23
[ 6304.277464] WARNING: CPU: 2 PID: 0 at /usr/src/kernel/drivers/hv/vmbus_drv.c:909 vmbus_on_msg_dpc+0xf8/0x1c0
[ 6304.277480] Modules linked in:
[ 6304.277539] CPU: 2 PID: 0 Comm: swapper/2 Not tainted 4.19.43-microsoft-standard #1
[ 6304.277541] RIP: 0010:vmbus_on_msg_dpc+0xf8/0x1c0
[ 6304.277542] Code: 46 04 85 c0 74 2b 48 8b 46 08 4c 89 ef e8 20 46 51 00 e9 62 ff ff ff 48 c7 c7 6d 91 fd 81 c6 05 9a 58 c1 00 01 e8 78 14 96 ff <0f> 0b e9 48 ff ff ff 48 8b 3d a2 63 90 00 ba 20 01 00 00 be 20 00
[ 6304.277542] RSP: 0018:ffff8885ac083f28 EFLAGS: 00010286
[ 6304.277543] RAX: 0000000000000000 RBX: ffff888107510000 RCX: ffffffff82234588
[ 6304.277544] RDX: 0000000000000001 RSI: 0000000000000092 RDI: 0000000000000246
[ 6304.277544] RBP: 0000000000000001 R08: 0000000000000127 R09: 0000000000000001
[ 6304.277545] R10: ffff8885ac083f90 R11: 0000000000000001 R12: ffff8885ac094f50
[ 6304.277545] R13: ffff888107510210 R14: 0000000000000040 R15: 0000000000000000
[ 6304.277547] FS:  0000000000000000(0000) GS:ffff8885ac080000(0000) knlGS:0000000000000000
[ 6304.277547] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 6304.277548] CR2: 00007ffe8c220f10 CR3: 00000005a55de000 CR4: 00000000003406a0
[ 6304.277549] Call Trace:
[ 6304.278020]  <IRQ>
[ 6304.278397]  tasklet_action_common.isra.23+0x5e/0x110
[ 6304.278759]  __do_softirq+0xe3/0x2d6
[ 6304.278952]  irq_exit+0xbd/0xd0
[ 6304.278954]  hyperv_vector_handler+0x57/0x70
[ 6304.278981]  hyperv_callback_vector+0xf/0x20
[ 6304.278982]  </IRQ>
[ 6304.278983] RIP: 0010:native_safe_halt+0xe/0x10
[ 6304.278984] Code: 0f 0b eb 81 90 90 90 90 90 90 90 90 e9 07 00 00 00 0f 00 2d 28 53 4e 00 f4 c3 66 90 e9 07 00 00 00 0f 00 2d 18 53 4e 00 fb f4 <c3> 90 0f 1f 44 00 00 41 55 41 54 55 53 e8 e0 21 79 ff 65 8b 2d c9
[ 6304.278985] RSP: 0018:ffffc90000093ec8 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff0c
[ 6304.278985] RAX: ffffffff81921020 RBX: 0000000000000002 RCX: ffff8885ac099140
[ 6304.278986] RDX: ffffffff82235578 RSI: ffff8885ac099140 RDI: 000005bbd3b17322
[ 6304.278986] RBP: 0000000000000002 R08: 0000000000000000 R09: 000000000001f740
[ 6304.278987] R10: ffffc90000093ea8 R11: 0000000000000000 R12: ffff888107ea3600
[ 6304.278987] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
[ 6304.278988]  ? ldsem_down_write+0x220/0x220
[ 6304.279048]  default_idle+0x1c/0x140
[ 6304.279109]  do_idle+0xa6/0x130
[ 6304.279263]  cpu_startup_entry+0x6f/0x80
[ 6304.279310]  start_secondary+0x195/0x1d0
[ 6304.279435]  secondary_startup_64+0xa4/0xb0
[ 6304.279498] ---[ end trace f8892661817d6aa7 ]---
[ 6306.278970] init: (1) ERROR: UtilConnectVsock:342: connect port 50002 failed 110
[ 6308.358949] init: (1) ERROR: UtilConnectVsock:342: connect port 50002 failed 110
[ 6310.438978] init: (1) ERROR: UtilConnectVsock:342: connect port 50002 failed 110
[ 6312.518961] init: (1) ERROR: UtilConnectVsock:342: connect port 50002 failed 110
[ 6314.598950] init: (1) ERROR: UtilConnectVsock:342: connect port 50002 failed 110

See our contributing instructions for assistance.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 18
  • Comments: 20 (2 by maintainers)

Most upvoted comments

Mostly happening after full windows restart. If I wsl --shutdown and boot again the vm, all is working fine.

Have the same problem that sometimes WSL has not mounted c:\ drive after windows startup. Therefore Docker also does not start and aborts with error “WSL distro stopped while waiting for Lifecycle server.”

I wrote a .bat script which checks for existing “/mnt/c/Users”. If not there it restarts WSL. Only then Docker is started.

I removed Docker from autostart, instead this script is executed on startup.

@echo off set CHECKDIR="/mnt/c/Users" echo Check if dir %CHECKDIR% exists. bash -c "cd %CHECKDIR%" && ( echo Check successful ) || ( echo Check failed. Restarting WSL wsl --shutdown ) echo Start Docker start "" "C:\Program Files\Docker\Docker\Docker Desktop.exe"

Maybe this is interesting for some here, as long as this bug is not fixed.

Also happening here, post-reboot. Windows 10 Pro 21H1, 19043.1081 build, WLS2 with Ubuntu 20.04. AMD Ryzen 9 5900X

wsl --shutdown and subsequent re-start does seem to bring it up but that’s quite annoying as I then have to restart docker etc.

Which logs are the most helpful to provide?

This is happening to me on version 2004 (build 19041.329) with Ubuntu 18.04 converted from WSL1 to WSL2. Doing wsl --shutdown seems to fix it until next restart.

I guess its related to NVIDIA’s graphic driver. In latest version of insider, sometime it’s jump out application access to graphics hardware has been blocked and freeze for a while windows menu and search menu will unable to open for a while. I encounter this issue many time after the freeze happened, but i can still not reproduce every time. And there are some error below the dump like ERROR: UtilTranslatePathList:2018: Failed to translate C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\bin ERROR: UtilTranslatePathList:2018: Failed to translate C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\libnvvp