WSL2 automounted directories randomly stop working
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 33.7k
- Forks
- 1.8k
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 116
Description
I have configured automounts using WSL2:
robinm@dwmsilpt433:/c/github/$ cat /etc/wsl.conf
[automount]
root = /
options = "metadata"
OS: Ubuntu 20.04
I have noticed when working within auto-mounted directories, that randomly I get a variant of these errors:
"OSError: [Errno 2] No such file or directory"
"fatal: Unable to read current working directory: No such file or directory"
The workaround is to leave the directory and re-enter it:
cd; cd -
However this is really annoying as it regularly causes scripts I am running to fail in weird ways.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the failure from an auto-mounted directory using the /etc/wsl.conf shown, while checking the reported OSError and Git working-directory errors. Done means the automount remains usable for scripts without requiring cd; cd -; the issue names no source file or test to run.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- linux, ubuntu
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100