The information in the comments shows a potentially major problem. For starters, please remember to edit your question with the information you provided in the comments. That's critical information to anyone understanding your issue that should be a part of the question, rather than the comments. (Feel free to edit this answer to remove the italicized area once the question has been updated).
Now on to the likely problem ...
Danger! Danger! As @Jeffmagma said in the comments, this doesn't look like WSL2. Since the file is exposed in C:\wsl\rootfs
(visible to Cygwin at /cygdrive/c/wsl/rootfs
), that looks to be a WSL1 filesystem rather than
a WSL2 virtual drive (which would show up as an ext4.vhdx
).
And that falls into this Microsoft Warning:
There is one hard-and-fast rule when it comes to WSL on Windows:
DO NOT, under ANY circumstances, access, create, and/or modify Linux files inside of your %LOCALAPPDATA%
folder using Windows apps, tools, scripts, consoles, etc.
Creating/changing Linux files in your Appdata folder from Windows will likely result in data corruption and/or damage your Linux environment requiring you to uninstall & reinstall your distro!
... which is actually a bit poorly worded. It references "AppData", but that's the default location for WSL installations.
In this case, it looks like you've created a WSL1 instance at C:\WSL
. There's nothing at all wrong with that, but Microsoft's warning still applies. Attempting to create, update, or delete a file using a Windows application (e.g. Cygwin) in that path is almost certain to cause issues.
And unfortunately it sounds like it may very well have caused filesystem corruption in this case.
To attempt recovery, I would try:
- Another
wsl --export
of this WSL1 instance
- Then
wsl --import
it into a new instance. I'm assuming you are familiar with this process since it's likely what you used to create the instance at C:\wsl\
in the first place. I would add --version 2
to the end of the --import
command, personally.
- See if (a) the problem-file exists in the new instance (it may be culled by the
export
, actually), and (b) if it does exist, see if you can delete it.