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

Plan9FileSystem hogging external USB drive with open handle #7972

Open
1 of 2 tasks
cbeuw opened this issue Jan 26, 2022 · 6 comments
Open
1 of 2 tasks

Plan9FileSystem hogging external USB drive with open handle #7972

cbeuw opened this issue Jan 26, 2022 · 6 comments

Comments

@cbeuw
Copy link

cbeuw commented Jan 26, 2022

Version

WSL version: 0.51.2.0 Kernel version: 5.10.81.1 WSLg version: 1.0.30 Windows version: 10.0.22000.434

WSL Version

  • WSL 2
  • WSL 1

Kernel Version

No response

Distro Version

No response

Other Software

No response

Repro Steps

Don't know exactly how to reproduce, but right now there is a dllhost.exe having an open handle on D:\ (which is an external USB drive) and preventing it from ejecting.

It was started with the commandline C:\WINDOWS\system32\DllHost.exe /Processid:{DFB65C4C-B34F-435D-AFE9-A86218684AA8}, a registry search pointed to HKEY_CLASSES_ROOT\CLSID\{AFC7B6DE-D642-41B7-AB0C-A01019510741} which has an entry named Plan9FileSystem so it's probably WSL2 related.

image

The handle is still open after wsl --shutdown.

Expected Behavior

WSL2 file system bridge should not prevent external drives from ejecting

Actual Behavior

External drives cannot be ejected

Diagnostic Logs

No response

@atruskie
Copy link

atruskie commented Feb 2, 2022

I just ran into this as well:

The application \Device\HarddiskVolume6\Windows\System32\dllhost.exe with process id 26064 stopped the removal or ejection for the device USB\VID_1058&PID_25A3\575837324437314644415045.
Process command line: C:\WINDOWS\system32\DllHost.exe /Processid:{DFB65C4C-B34F-435D-AFE9-A86218684AA8}
List of affected devices:

WSL version: 0.51.2.0
Kernel version: 5.10.81.1
WSLg version: 1.0.30
Windows version: 10.0.22538.1010

@kogereneliteness
Copy link

I also have this problem. The DLLHost. With Proccessid {DFB65C4C-B34F-435D-AFE9-A86218684AA8} locks my external drive, even this drive have NEVER been used by WSL.

Win 10 21H2: 19044.2006
WSL Kernel: 5.10.16

Also why are you (WSL devs) running this under a dllhost.exe, it seems like a bad approach. When I need to troubleshoot my PC, I do not want to go lookup GUIDs in the hunt of the actual problem in context of a dllhost.

What is the reason for this?

@PabloRomanH
Copy link

Is a fix for this in the horizon? Right now I have to keep killing dllhost.exe, then executing it again after ejecting the drive, and then I need to reboot WSL for it to get back access to Window's filesystem.

@dingjibang
Copy link

same issue on win11

DllHost.exe /Processid:{DFB65C4C-B34F-435D-AFE9-A86218684AA8}

WSL version: 1.1.3.0
Kernel version: 5.15.90.1
WSLg version: 1.0.49
MSRDC version: 1.2.3770
Direct3D version: 1.608.2-61064218
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.22621.1265

@Argimko
Copy link

Argimko commented Jun 14, 2023

You can try the following: open \\wsl.localhost\<linux_dist>\etc\wsl.conf and add the following:

[automount]
enabled = false

Reference: https://learn.microsoft.com/en-us/windows/wsl/wsl-config#automount-settings

But is doesn't work for my Docker Container, because Docker Desktop rewrite wsl.conf after restart, and I don't know where I can adjust appropriate Docker setting to disable automount.

@m4heshd
Copy link

m4heshd commented Feb 25, 2024

This is incredibly annoying. Shutting down WSL allowed me to safely remove the drive though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants