Skip to content
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

You cannot rename files in host path volume mounts when the GPU device is specified; and these directories are permanently corrupted #215

Closed
doctorpangloss opened this issue Mar 30, 2022 · 5 comments
Labels
bug Something isn't working triage New and needs attention

Comments

@doctorpangloss
Copy link

Describe the bug

Mounting a directory and passing the GPU device to docker run permanently modifies a directory path to be unable to have its subpaths renamed.

To Reproduce

Setup and run the container:

#!pwsh.exe
cd ~/Documents
mkdir DockerTest
New-Item DockerTest\test.txt
docker run -it --rm --isolation process -v "$Home\Documents\DockerTest:C:\DockerTest" --device class/5B45201D-F2F2-4F3B-85BB-30FF1F953599 mcr.microsoft.com/windows/servercore:ltsc2022

Inside the container

cd C:\DockerTest
rename test.txt test2.txt

Observe the error:

The system cannot find the path specified.

The same error occurs under powershell's mv.

Configuration

  • Edition: Windows 11 21H2 22000.588
  • Base Image being used: mcr.microsoft.com/windows/servercore:ltsc2022
  • Container engine: docker
  • Container Engine version:
Client:
Cloud integration: v1.0.22
Version:           20.10.12
API version:       1.41
Go version:        go1.16.12
Git commit:        e91ed57
Built:             Mon Dec 13 11:44:07 2021
OS/Arch:           windows/amd64
Context:           default
Experimental:      true

Server: Docker Desktop 4.5.1 (74721)
Engine:
 Version:          20.10.12
 API version:      1.41 (minimum version 1.24)
 Go version:       go1.16.12
 Git commit:       459d0df
 Built:            Mon Dec 13 11:42:13 2021
 OS/Arch:          windows/amd64
 Experimental:     false

Additional context

  1. Instead of DockerTest, create a directory DockerTest2, then run the container omitting --device class/5B45201D-F2F2-4F3B-85BB-30FF1F953599 will show you can correctly rename files inside DockerTest2 this directory from the container.
  2. Now run with --device class/5B45201D-F2F2-4F3B-85BB-30FF1F953599. You can no longer rename files inside DockerTest2.
  3. Now run without --device class/5B45201D-F2F2-4F3B-85BB-30FF1F953599. You still cannot rename files inside DockerTest2. It appears some state on the directory has changed.
  4. Delete and recreate DockerTest2. Run without the device. Observe you still cannot rename files inside a seemingly new directory by the same name.
@doctorpangloss doctorpangloss added the bug Something isn't working label Mar 30, 2022
@ghost ghost added the triage New and needs attention label Mar 30, 2022
@doctorpangloss
Copy link
Author

Reopens #147

@doctorpangloss
Copy link
Author

This one is really mysterious. --device class/5B45201D-F2F2-4F3B-85BB-30FF1F953599 mounts a few paths like C:\Windows\System32\DriverStore. There is maybe a bug with the code that decides the permissions of the mounted directories, incorrectly marking everything passed as --volume args with the set of permissions that make sense for drivers.

@cwilhit
Copy link
Contributor

cwilhit commented Mar 31, 2022

Yep, I haven't had a chance to try your repro yet but my guess was it could be something to do with some of the mounts we have to make to get DirectX acceleration work (since that's the device GUID for GPU sharing). We'll have to investigate but thank you for opening the issue.

@cwilhit
Copy link
Contributor

cwilhit commented Apr 7, 2022

@doctorpangloss following your steps I attempted a repro but still everything worked fine (on Windows 11, with process isolation, etc). This is going to be a tricky one to figure out. If you attempt a volume mount with source somewhere other than C:\ drive, do you still hit the issue? Is this issue blocking further development for you?

I am checking to see if there are some logs/traces that could be helpful to gather. I will let you know.

@ghost
Copy link

ghost commented May 8, 2022

This issue has been open for 30 days with no updates.
, please provide an update or close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage New and needs attention
Projects
None yet
Development

No branches or pull requests

3 participants