New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ls: reading directory '.': Invalid argument (share mounted via drvfs) #1954
Comments
Hi @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! |
@SvenGroot Zipped and attached. If there's anything else you need, just let me know. |
@SvenGroot do you have any updates for this issue? Also see #1959 which is similar to this for VMware. Thanks! |
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. |
@jgoz, @laktak - Thanks for your comments. If you would like to see support for more file systems (other than the ones mentioned by @SvenGroot), it would be good if you can open a User Voice ticket for that. |
I'm getting exactly the same issue with an SMB file system on Windows 10 Enterprise Build 16299 |
Support for NFS would greatly be appreciated! I have a NFS drive mounted on my Windows system directly. I used
to 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 @jgoz ls does not work because the getdent call fails |
Hi @jgoz, did you solve it? How? Cheers |
@enovella No, the issue is still open. |
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 |
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. |
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. |
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. |
@EmilObermayr What do you mean "option vers"? |
My usb drive was working in the ubuntu subsystem in windows, and it suddenly stopped. I can see my files in Windows explorer, but when I try to access /mnt/d I get the same error. sigh... P.S.: I got a Win XP solution: I just restarted my laptop and things are working again... |
I'm seeing the same issue on Windows 10 Build 18990 after joining the Insiders Program and installing said build about an hour ago. I did this specifically to enable WSL 2 but I seem to have gone 2.5 years back in time instead of 6 months forward! What gives?! |
I as well am having this issue |
Also have the same issue... |
for me, it doesn't work with more than 10000 files |
The problem (from the strace output) is in getdents ( getdents, getdents64 - get directory entries) system call, right? See "man getdents". Apparently the count parameter is too large (32768) whereas WSL only supports 10000? getdents(3, 0x8eecd0, 32768) = -1 EINVAL (Invalid argument) According to "man getdents" that means "EINVAL Result buffer is too small." |
I'm having the same issue :| |
I have the same issue after updating windows to 2004 (may 2020 update). I'm mounting a Samba network drive with
kernel info with issue present:
kernel info with issue absent:
So I guess there's a regression in drvfs somewhere. Hope this info can help. |
Had the same issue on Windows 10 on an NFTS /mnt/e drive (with same privileges/configs as my /mnt/d and /mnt/c drives, where there was no issue). It started after I ran rm (no software updates since 5/16/2020, happened a few minutes ago on 6/6/2020). Restart solved this issue. Kernel info:
|
I still have this issue when attempting to work within a Google File Stream directory. I imagine File Stream operates/emulates as a network drive so I imagine the issues are similar. cd works, ls doesn't, cd autocomplete doesn't. I'm unable to use make correctly. |
Also here to confirm this is an issue with BUILD 2004.... |
restarting the whole desktop solves the problem until you physically disconnect the usb HDD again. we have to restart everytime we disconnect |
I just updated Windows to 1909 (18363.1049) and now I'm getting this error with a mounted mapped network drive. Sigh. Typical Microsoft. Their updates never just fix things, they always have to break something as well... |
Some more info:
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 |
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 Turns out wsl2 supports directly mounting cifs shares where we can specify the version to use: sudo apt install cifs-utils
sudo mount -t cifs -o user=pif,pass=paf,vers=1.0 //server/share /mnt/cifs works as a workaround in my case. |
@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. |
@alexbrodersen Unfortunately it looks like this for me (even though it's already a mapped network drive): |
Having this issue when vim is open in the dir. |
Having the same issue! Restarting the whole system works for me, but you never know when is the next 'sudden stop' Sigh |
@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 (@SvenGroot?), can this be fixed? Thanks, Windows 10 Enterprise 20H2 |
sudo umount -l /mnt/d |
Running into the same issue: offline files are not available in WSL when mounted volume is actually offline. |
Microsoft Windows [Version 10.0.16176]
64-bitY:
is a mapped network drive to a Parallels shared folderNote that other operations like
cd
andcat
do work, so the mount operation was successful.Strace output:
(
strace -ff ls
)The text was updated successfully, but these errors were encountered: