Repository navigation
Closed
Labels
Description
Microsoft Windows [Version 10.0.16176] 64-bit
- Running in a Windows 10 VM in Parallels on Mac OS
Y:is a mapped network drive to a Parallels shared folder
$ sudo mkdir /mnt/y
$ sudo mount -t drvfs Y: /mnt/y
$ cd /mnt/y
$ ls
ls: reading directory '.': Invalid argumentNote that other operations like cd and cat do work, so the mount operation was successful.
Strace output:
(strace -ff ls)
execve("/bin/ls", ["ls"], [/* 16 vars */]) = 0
brk(NULL) = 0x8e9000
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f53543f0000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=20939, ...}) = 0
mmap(NULL, 20939, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f53543ea000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libselinux.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\260Z\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=130224, ...}) = 0
mmap(NULL, 2234080, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f5353dd0000
mprotect(0x7f5353def000, 2093056, PROT_NONE) = 0
mmap(0x7f5353fee000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e000) = 0x7f5353fee000
mmap(0x7f5353ff0000, 5856, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f5353ff0000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P\t\2\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1864888, ...}) = 0
mmap(NULL, 3967392, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f5353a00000
mprotect(0x7f5353bbf000, 2097152, PROT_NONE) = 0
mmap(0x7f5353dbf000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1bf000) = 0x7f5353dbf000
mmap(0x7f5353dc5000, 14752, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f5353dc5000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libpcre.so.3", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0000\25\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=456632, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f53543e0000
mmap(NULL, 2552072, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f5353790000
mprotect(0x7f53537fe000, 2097152, PROT_NONE) = 0
mmap(0x7f53539fe000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x6e000) = 0x7f53539fe000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libdl.so.2", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\240\r\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=14608, ...}) = 0
mmap(NULL, 2109680, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f5353580000
mprotect(0x7f5353583000, 2093056, PROT_NONE) = 0
mmap(0x7f5353782000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x7f5353782000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libpthread.so.0", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\260`\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=138696, ...}) = 0
mmap(NULL, 2212904, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f5353360000
mprotect(0x7f5353378000, 2093056, PROT_NONE) = 0
mmap(0x7f5353577000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17000) = 0x7f5353577000
mmap(0x7f5353579000, 13352, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f5353579000
close(3) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f53543d0000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f53543c0000
arch_prctl(ARCH_SET_FS, 0x7f53543c0800) = 0
mprotect(0x7f5353dbf000, 16384, PROT_READ) = 0
mprotect(0x7f5353577000, 4096, PROT_READ) = 0
mprotect(0x7f5353782000, 4096, PROT_READ) = 0
mprotect(0x7f53539fe000, 4096, PROT_READ) = 0
mprotect(0x7f5353fee000, 4096, PROT_READ) = 0
mprotect(0x61d000, 4096, PROT_READ) = 0
mprotect(0x7f5354225000, 4096, PROT_READ) = 0
munmap(0x7f53543ea000, 20939) = 0
set_tid_address(0x7f53543c0ad0) = 2019
set_robust_list(0x7f53543c0ae0, 24) = 0
rt_sigaction(SIGRTMIN, {0x7f5353365b50, [], SA_RESTORER|SA_SIGINFO, 0x7f5353371390}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {0x7f5353365be0, [], SA_RESTORER|SA_RESTART|SA_SIGINFO, 0x7f5353371390}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=8192*1024}) = 0
statfs("/sys/fs/selinux", 0x7fffe09b1510) = -1 ENOENT (No such file or directory)
statfs("/selinux", 0x7fffe09b1510) = -1 ENOENT (No such file or directory)
brk(NULL) = 0x8e9000
brk(0x90a000) = 0x90a000
open("/proc/filesystems", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
read(3, "nodev sysfs\nnodev root"..., 4096) = 367
read(3, "", 4096) = 0
close(3) = 0
open("/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=1668976, ...}) = 0
mmap(NULL, 1668976, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f5354228000
close(3) = 0
ioctl(1, TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(1, TIOCGWINSZ, {ws_row=56, ws_col=147, ws_xpixel=0, ws_ypixel=0}) = 0
open(".", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFDIR|0777, st_size=512, ...}) = 0
getdents(3, 0x8eecd0, 32768) = -1 EINVAL (Invalid argument)
open("/usr/share/locale/locale.alias", O_RDONLY|O_CLOEXEC) = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=2995, ...}) = 0
read(4, "# Locale name alias data base.\n#"..., 4096) = 2995
read(4, "", 4096) = 0
close(4) = 0
open("/usr/share/locale/en_US.UTF-8/LC_MESSAGES/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en_US.utf8/LC_MESSAGES/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en_US/LC_MESSAGES/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en.UTF-8/LC_MESSAGES/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en.utf8/LC_MESSAGES/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en/LC_MESSAGES/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale-langpack/en_US.UTF-8/LC_MESSAGES/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale-langpack/en_US.utf8/LC_MESSAGES/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale-langpack/en_US/LC_MESSAGES/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale-langpack/en.UTF-8/LC_MESSAGES/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale-langpack/en.utf8/LC_MESSAGES/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale-langpack/en/LC_MESSAGES/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
write(2, "ls: ", 4) = 4
write(2, "reading directory '.'", 21) = 21
open("/usr/share/locale/en_US.UTF-8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en_US.utf8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en_US/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en.UTF-8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en.utf8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale-langpack/en_US.UTF-8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale-langpack/en_US.utf8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale-langpack/en_US/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale-langpack/en.UTF-8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale-langpack/en.utf8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale-langpack/en/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
write(2, ": Invalid argument", 18) = 18
write(2, "\n", 1) = 1
close(3) = 0
close(1) = 0
close(2) = 0
exit_group(2) = ?
+++ exited with 2 +++
Reacted by Adam Suban-Loewen, jha, Yusuke Kido, Jake Brinkmann, Blesswin Samuel, kennethz3, Mark, Lukasz Stolcman, strarsis, Rick Ucker and 10 more
Activity
SvenGroot commentedon Apr 25, 2017
Hi John Gozde (@jgoz)
Could you please record detailed logs using the steps from https://github.com/Microsoft/BashOnWindows/blob/master/CONTRIBUTING.md#8-detailed-logs, and post them here?
Thanks!
jgoz commentedon Apr 25, 2017
logs-issue-1954.zip
Sven Groot (@SvenGroot) Zipped and attached. If there's anything else you need, just let me know.
laktak commentedon Jun 26, 2017
Sven Groot (@SvenGroot) do you have any updates for this issue? Also see #1959 which is similar to this for VMware. Thanks!
SvenGroot commentedon Jun 26, 2017
All of these issues are caused by file systems that either do not support some of the functionality DrvFs is trying to use, or behave in unexpected ways. Officially, DrvFs currently support NTFS, ReFS, FAT, CDFS, and SMB.
We will try to accommodate other file systems when possible, but it's unlikely we will get to all of them.
sunilmut commentedon Jun 27, 2017
John Gozde (@jgoz), Christian Zangl (@laktak) - Thanks for your comments. If you would like to see support for more file systems (other than the ones mentioned by Sven Groot (@SvenGroot)), it would be good if you can open a User Voice ticket for that.
laktak commentedon Jun 27, 2017
Sunil Muthuswamy (@sunilmut) OK, posted here
morgan-greywolf commentedon Jan 8, 2018
I'm getting exactly the same issue with an SMB file system on Windows 10 Enterprise Build 16299
jha commentedon Jul 25, 2018
Support for NFS would greatly be appreciated! I have a NFS drive mounted on my Windows system directly. I used
mount -t drvfs Z: /mnt/zto mount the drive. I'm able to go to directories on the NFS I know exist (and get an error message for bad directories), and I'm able to read the contents of files I know to exist (and get error messages for those that do not)
However, just like John Gozde (@jgoz) ls does not work because the getdent call fails
enovella commentedon Oct 1, 2018
Hi John Gozde (@jgoz),
did you solve it? How?
Cheers
jgoz commentedon Oct 1, 2018
Eduardo Novella (@enovella) No, the issue is still open.
kennethz3 commentedon Dec 31, 2018
This is happening to me when I disconnect and reconnect a Bitlocker encrypted external hard drive. When I try umount it says that the disk is in use
tingjhenjiang commentedon Feb 14, 2019
Same issue here when I enable folder sharing in remote desktop connection(RDS). In remote desktop client host environment windows I can access "\\tsclient\blah", and under Windows subsystem for Linux I can mount "mount -t drvfs '\\TSCLIENT\blah' /mnt/blah" but I just cannot explore the content of /mnt/blah.
EmilObermayr commentedon Feb 19, 2019
I have a mount with type cifs and got the strange result that ls works on one sub-directory and gives the error discussed here on another.
The only real difference I can see is the number of files. It does not work in directories with more than about 70.000 files.
EmilObermayr commentedon Feb 20, 2019
Now I found a strange solution: Option vers was on default which is 1.0 according to the man-page. But after I have set this to 1.0 explicitly it worked on all sub-directories, including the large ones.
14 remaining items
aureliendavid commentedon Sep 14, 2020
Some more info:
Linux HOST 4.4.0-18362-Microsoft #836-Microsoft Mon May 05 16:04:00 PST 2020 x86_64 x86_64 x86_64 GNU/Linux)Also I noticed that for me, when the bug is present for samba drives, it depends on smbd version at the other end:
Don't know if that's true in general however.
This is now preventing me for updating my machine since I need network drives access in wsl. If there's a workaround somewhere while waiting for a fix that'd be great.
Thanks
aureliendavid commentedon Sep 14, 2020
Digging a little further it looks like my drive that won't work uses SMB1 dialect and the ones that work use SMB2 or 3 (checked with
Get-SmbConnectionin powershell).Turns out wsl2 supports directly mounting cifs shares where we can specify the version to use:
works as a workaround in my case.
alexbrodersen commentedon Oct 3, 2020
David (@Clonkex) I found this issue was caused for me by the offline file sync feature of the mapped network drive. If I click "work online" under the easy access dropdown in the explorer page I was able to access the files. I enabled offline files around the same time as the update so it is hard to say if it is related.
Clonkex commentedon Oct 5, 2020
alexbrodersen Unfortunately it looks like this for me (even though it's already a mapped network drive):
AhmedHatipoglu commentedon Aug 30, 2021
Having this issue when vim is open in the dir.
juneE-cloud commentedon Sep 3, 2021
Having the same issue!
Restarting the whole system works for me, but you never know when is the next 'sudden stop'
Sigh
timadye commentedon Oct 19, 2021
David (@Clonkex), alexbrodersen, I have the same issue. When I'm online I can access network drives without trouble. When I'm offline, I can't list directories, although I can access explicitly named files:
Offline files are implemented by the "CSC-CACHE" file system type (that's what the drive properties show when offline). That isn't in the list of supported filesystems, but it is a core Windows feature (not a third-party filesystem), so it jolly well ought to be supported.
I see this on WSL1 and WSL2 in CentOS and Ubuntu.
Hey, WSL developers (Sven Groot (@SvenGroot)?), can this be fixed?
Thanks,
Tim.
Windows 10 Enterprise 20H2
WSL1 4.4.0-19041-Microsoft CentOS7
WSL2 5.10.16.3-microsoft-standard-WSL2 CentOS7 and Ubuntu 20.04
snowman commentedon Apr 28, 2022
berlincount commentedon Oct 14, 2023
Running into the same issue: offline files are not available in WSL when mounted volume is actually offline.
jelinj8 commentedon May 23, 2024
Same issue still here - Win10PRO + WSL running inside VMWareWorkstation PRO on a WIN11 host, mounted VM shared drive (folder shared from host to virtual machine, then mounted in WSL Ubuntu) - root can't ls files, subdirectories are working OK. Mounting a subdirectory from the netdrive results in the same behavior - its subdirectories are accessible, can't stat mount root (so it is a problem just for a mount root, not a source FS).
microsoft-github-policy-service commentedon May 29, 2025
This issue has been automatically closed since it has not had any activity for the past year. If you're still experiencing this issue please re-file this as a new issue or feature request.
Thank you!
timadye commentedon May 29, 2025
I still get this issue, now with Windows 11. Is there another way to press to get it fixed? Another issue? Maybe someone can re-file this one.
alkanen commentedon Jun 23, 2025
I'm having the issue in Windows 10 as well. Until a few days ago I was about to mount my NAS using a cifs entry into my fstab file, but for some reason that has stopped working (complains that the old NAS using SMB 1.0 is too old all of a sudden) but I can still mount it in Windows so I can mount that drive in WSL using drvfs.
I have the same issue with being unable to list directory contents even though I can cat files I know exist.