-
Notifications
You must be signed in to change notification settings - Fork 832
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
Permission denied renaming VolFs hardlink directory #1420
Comments
I am unable to reproduce this on build 14965. @marksteward could you upgrade to a recent insider build of Windows and confirm that this issue is fixed? |
I've now enrolled but I guess it'll be a few days before I can confirm. Thanks! |
I've installed 14965 using the ISO as I didn't receive anything through the upgrade mechanism, and I can still reproduce this issue. Did you reproduce the issue on 14393? |
I've downgraded back to 14393 as Chrome kept crashing and there are no kernel symbols for that build on the public server. It turns out the error is a 0xc0000022 status from this call, which is turned into -EACCES:
SetInformationFile is passed FileRenameInformation, and the documentation calls out the following failure case:
After running the repro case there are indeed open handles on both a/1 and b/2, annoyingly owned by the System process. The handles are the same on each failing call to LxpUtilRenameFileByHandle, but can be closed by the workarounds I mentioned before:
This last one shows there's a VfsDirectoryEntryCache, and that the cache has a limited size. Without digging into the code, my guess is that VolFs resolves both paths to the same inode, which is then mapped to the same file handle twice, causing a temporary leak (after opening by path when creating the hardlink). |
@SvenGroot as FYI |
Is this still unreproducible? Should I spend some time this weekend seeing if it's something weird on my machine? |
I can still reproduce this on build 14986 in a VM - can I suggest removing the fixedininsiderbuilds tag? |
I can also confirm this is happening in 14986. It's been causing npm installs to fail in my environment. Solution is to reboot the terminal |
Still happening in 16299. |
On Windows 10.0.14393, directories on VolFS that contain hardlink targets cannot be moved shortly after the hardlink is created. This breaks the build process for Chromium (for example), as glibc_arm.tgz contains this structure.
To reproduce, create a hardlink in your home directory from b/2 to a/1 and then try to rename a to ax:
The
mv
here should not fail. If you exit all WSL windows and open bash again, it succeeds, suggesting the issue is related to internal state or caching. You must exit WSL after theln
step: if you exit before this step it still fails.Renaming a/1 or b/2 doesn't make a difference, but after renaming b (even if renamed back again), it will succeed within the same session:
Running
find -name nonexistent_name
for a few seconds also allows it to succeed, reinforcing that it's some sort of cache problem.It also works fine on DrvFs.
strace
of the failingmv
(the failing call is rename, with EACCES) here.The text was updated successfully, but these errors were encountered: