microsoft / WSL

Issues found on WSL
https://docs.microsoft.com/windows/wsl
MIT License
17.45k stars 822 forks source link

Cannot access \\wsl$ via Run and explorer.exe at /home/user not working #7115

Closed 1Mark closed 3 years ago

1Mark commented 3 years ago

Windows Build Number

10.0.19042.1052

WSL Version

Kernel Version

Linux version 4.19.104-microsoft-standard (oe-user@oe-host) (gcc version 8.2.0 (GCC)) #1 SMP Wed Feb 19 06:37:35 UTC 2020

Distro Version

Ubuntu 20.04.2 LTS

Other Software

No response

Repro Steps

When in /home/$USER i cannot use explorer.exe.

Expected Behavior

It opens explorer.exe at \wsl$\Ubuntu\

Actual Behavior

When in /home/$USER I cannot use explorer.exe

Diagnostic Logs

mark@DESKTOP-R8:~$ strace explorer.exe
execve("/mnt/c/WINDOWS/explorer.exe", ["explorer.exe"], 0x7ffc8f171770 /* 29 vars */) = 0
arch_prctl(ARCH_SET_FS, 0x29d800)       = 0
set_tid_address(0x29d838)               = 2233
brk(NULL)                               = 0xfac000
brk(0xfad000)                           = 0xfad000
sched_getaffinity(0, 128, [0, 1, 2, 3]) = 32
getpid()                                = 2233
getcwd("/home/mark", 4096)              = 11
uname({sysname="Linux", nodename="DESKTOP-R8", ...}) = 0
getcwd("/home/mark", 4096)              = 11
open("/mnt/c/WINDOWS/explorer.exe", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_PATH) = 3
readlink("/proc/self/fd/3", "/mnt/c/WINDOWS/explorer.exe", 4095) = 27
fstat(3, {st_mode=S_IFREG|0555, st_size=4891752, ...}) = 0
stat("/mnt/c/WINDOWS/explorer.exe", {st_mode=S_IFREG|0555, st_size=4891752, ...}) = 0
close(3)                                = 0
open("/proc/self/mountinfo", O_RDONLY)  = 3
readv(3, [{iov_base="", iov_len=0}, {iov_base="33 24 8:16 / / rw,relatime - ext"..., iov_len=1024}], 2) = 1024
readv(3, [{iov_base="", iov_len=0}, {iov_base="=755\n46 45 0:28 / /sys/fs/cgroup"..., iov_len=1024}], 2) = 1024
readv(3, [{iov_base="", iov_len=0}, {iov_base="oup cgroup rw,net_prio\n57 45 0:3"..., iov_len=1024}], 2) = 785
readv(3, [{iov_base="", iov_len=0}, {iov_base="", iov_len=1024}], 2) = 0
close(3)                                = 0
getcwd("/home/mark", 4096)              = 11
open("/proc/self/mountinfo", O_RDONLY)  = 3
readv(3, [{iov_base="", iov_len=0}, {iov_base="33 24 8:16 / / rw,relatime - ext"..., iov_len=1024}], 2) = 1024
readv(3, [{iov_base="", iov_len=0}, {iov_base="=755\n46 45 0:28 / /sys/fs/cgroup"..., iov_len=1024}], 2) = 1024
readv(3, [{iov_base="", iov_len=0}, {iov_base="oup cgroup rw,net_prio\n57 45 0:3"..., iov_len=1024}], 2) = 785
readv(3, [{iov_base="", iov_len=0}, {iov_base="", iov_len=1024}], 2) = 0
close(3)                                = 0
ioctl(0, TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(1, TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(2, TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(0, TIOCGPGRP, [2230])             = 0
getpgid(0)                              = 2230
fstat(0, {st_mode=S_IFCHR|0620, st_rdev=makedev(0x88, 0x2), ...}) = 0
fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(0x88, 0x2), ...}) = 0
fstat(2, {st_mode=S_IFCHR|0620, st_rdev=makedev(0x88, 0x2), ...}) = 0
ioctl(0, TIOCGWINSZ, {ws_row=30, ws_col=120, ws_xpixel=0, ws_ypixel=0}) = 0
ioctl(0, SNDCTL_TMR_START or TCSETS, {B38400 -opost -isig -icanon -echo ...}) = 0
dup(0)                                  = 3
socket(AF_VSOCK, SOCK_STREAM|SOCK_CLOEXEC, 0) = 4
bind(4, {sa_family=AF_VSOCK, sa_data="\0\0\377\377\377\377\377\377\377\377\0\0\0\0"}, 16) = 0
getsockname(4, {sa_family=AF_VSOCK, sa_data="\0\0\251\320\265]\377\377\377\377\0\0\0\0"}, [16]) = 0
listen(4, 4)                            = 0
socket(AF_UNIX, SOCK_SEQPACKET, 0)      = 5
connect(5, {sa_family=AF_UNIX, sun_path="/run/WSL/2034_interop"}, 110) = 0
write(5, "\6\0\0\0\236\0\0\0\251\320\265]\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 158) = 158
accept4(4, {sa_family=AF_VSOCK, sa_data="\0\0\227A\211y\2\0\0\0\0\0\0\0"}, [16], SOCK_CLOEXEC) = 6                                                                                                                       accept4(4, {sa_family=AF_VSOCK, sa_data="\0\0\230A\211y\2\0\0\0\0\0\0\0"}, [16], SOCK_CLOEXEC) = 7
accept4(4, {sa_family=AF_VSOCK, sa_data="\0\0\231A\211y\2\0\0\0\0\0\0\0"}, [16], SOCK_CLOEXEC) = 8
accept4(4, {sa_family=AF_VSOCK, sa_data="\0\0\232A\211y\2\0\0\0\0\0\0\0"}, [16], SOCK_CLOEXEC) = 9
close(4)                                = 0
rt_sigprocmask(SIG_BLOCK, [INT WINCH], NULL, 8) = 0
signalfd4(-1, [INT WINCH], 8, 0)        = 4
poll([{fd=0, events=POLLIN}, {fd=7, events=POLLIN}, {fd=8, events=POLLIN}, {fd=9, events=POLLIN}, {fd=4, events=POLLIN}], 5, -1) = 1 ([{fd=4, revents=POLLIN}])
read(4, "\34\0\0\0\0\0\0\0\200\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 128) = 128
ioctl(3, TIOCGWINSZ, {ws_row=62, ws_col=207, ws_xpixel=0, ws_ypixel=0}) = 0
write(9, "\10\0\0\0\f\0\0\0>\0\317\0", 12) = 12
poll([{fd=0, events=POLLIN}, {fd=7, events=POLLIN}, {fd=8, events=POLLIN}, {fd=9, events=POLLIN}, {fd=4, events=POLLIN}], 5, -1
craigloewen-msft commented 3 years ago

Can you run powershell.exe /c start . in WSL and see if that works? As well, if you run PowerShell, cd into your folder using \\wsl\home\<YourUserName>\ and then run explorer.exe what happens??

1Mark commented 3 years ago

cd /home/$USER ; powershell.exe /c start . works fine cd /home/$USER ; explorer.exe This issue has gone away. No clue what went on :/