Closed xiezhipeng-git closed 2 months ago
The log file doesn't contain any WSL traces. Please make sure that you reproduced the issue while the log collection was running.
Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it!
Note: You can give me feedback by thumbs upping or thumbs downing this comment.
.wslconfig found
Detected appx version: 2.2.4.0
Found no WSL traces in the logs
Now NodeExecServer run: C:\windows\System32\wsl.exe -d Ubuntu-22.04 -e sh -c if [ -d ~/.vscode-server/bin/f1e16e1e6214d7c44d078b1f0607b2388f29d729 ]; then printf 'install-found '; fi; if [ -f /etc/alpine-release ]; then printf 'alpine-'; fi; if [ -s ~/.vscode-server/bin/compatibilty-check ]; then printf 'legacy-'; fi; uname -m; [2024-07-28 08:46:42.199] Unable to detect if server is already installed: Error: Failed to probe if server is already installed: code: Failed to probe if server is already installed: code: 4294967295, , �e�l\�x�v C:\Users\Admin\AppData\Local\Packages\CanonicalGroupLimited.Ubuntu22.04LTS_79rhkp1fndgsc\LocalState\ext4.vhdx D��R0R WSL2� �e�Nb�vUcOWN�e�l���S0 [2024-07-28 08:46:42.199] Error code: Wsl/Service/CreateInstance/MountVhd/HCS/0x80070570 [2024-07-28 08:46:42.199] [2024-07-28 08:46:42.199] NodeExecServer run: C:\windows\System32\wsl.exe -d Ubuntu-22.04 sh -c '"$VSCODE_WSL_EXT_LOCATION/scripts/wslServer.sh" f1e16e1e6214d7c44d078b1f0607b2388f29d729 stable code-server .vscode-server --host=127.0.0.1 --port=0 --connection-token=4216714420-1561004773-1456349802-1130381406 --use-host-proxy --without-browser-env-var --disable-websocket-compression --accept-server-license-terms --telemetry-level=all' [2024-07-28 08:46:42.235] �e�l\�x�v C:\Users\Admin\AppData\Local\Packages\CanonicalGroupLimited.Ubuntu22.04LTS_79rhkp1fndgsc\LocalState\ext4.vhdx D��R0R WSL2� �e�Nb�vUcOWN�e�l���S0 [2024-07-28 08:46:42.235] Error code: Wsl/Service/CreateInstance/MountVhd/HCS/0x80070570 [2024-07-28 08:46:42.235] [2024-07-28 08:46:42.235] 有关启动问题的帮助,请转到 https://code.visualstudio.com/docs/remote/troubleshooting#_wsl-tips [2024-07-28 08:46:52.165] Download in background is enabled This is open vscode info
some other info https://github.com/microsoft/WSL/issues/11840
The log file doesn't contain any WSL traces. Please make sure that you reproduced the issue while the log collection was running.
The log file doesn't contain any WSL traces. Please make sure that you reproduced the issue while the log collection was running.
Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it!
Note: You can give me feedback by thumbs upping or thumbs downing this comment.
.wslconfig found
Detected appx version: 2.2.4.0
Found no WSL traces in the logs
@https://github.com/neokofg @bterlson @kant @gaia @abergs @chessturo @benhillis @OneBlue
wsl status 无法将磁盘“C:\Users\Admin\AppData\Local\Packages\CanonicalGroupLimited.Ubuntu22.04LTS_79rhkp1fndgsc\LocalState\ext4.vhdx”附加到 WSL2: 文件或目录损坏且无法读取
PS C:\Users\Admin> wsl status 无法将磁盘“C:\Users\Admin\AppData\Local\Packages\CanonicalGroupLimited.Ubuntu22.04LTS_79rhkp1fndgsc\LocalState\ext4.vhdx”附加到 WSL2: 文件或目录损坏且无法读取。 Error code: Wsl/Service/CreateInstance/MountVhd/HCS/0x80070570 PS C:\Users\Admin> wsl --status 默认分发: Ubuntu-22.04 默认版本: 2
wsl status 与 wsl --status return diff result and docker file is nomal. wsl ubuntu error
/logs
I already upload log and @OneBlue
You need to collect logs while you reproduce the issue so the error is captured.
/logs
@OneBlue https://github.com/user-attachments/files/16402959/WslLogs-2024-07-28_18-24-26.zip The above log is obtained when opening the VSCode WSL project. The current issue is in a permanent state. When I tried using WSL, it looked like this, and I couldn't open the folder either. I don't know what else I can do to get the logs you want. Enter WSL status? Or open the VSCode WSL project? Below is the use of collect-wsl-logs.s1 Then the WSL status Then collect the logs after collecting wsl-logs.ts1 again try creating. then windows vid.sys blue screen crash. I will try again WslLogs-2024-08-02_20-05-54.zip Does this log contain the necessary information?
The log file doesn't contain any WSL traces. Please make sure that you reproduced the issue while the log collection was running.
WslLogs-2024-08-02_20-05-54.zip @OneBlue Does this log contain the necessary information?
Thank you @xiezhipeng-git. Here's the root cause of the error you're seeing:
Microsoft.Windows.Lxss.Manager Error 08-02-2024 05:06:26.221 " " "code:
failurecount: 13
file: C:\__w\1\s\src\windows\common\hcs.cpp
function:
hr: 0x80070570
linenumber: 231
message: ""HcsWaitForOperationResult for HcsModifyComputeSystem failed ({""""ResourcePath"""":""""VirtualMachine/Devices/Scsi/0/Attachments/2"""",""""RequestType"""":""""Add"""",""""Settings"""":{""""Type"""":""""VirtualDisk"""",""""Path"""":""""C:\\Users\\Admin\\AppData\\Local\\Packages\\CanonicalGroupLimited.Ubuntu22.04LTS_79rhkp1fndgsc\\LocalState\\ext4.vhdx"""",""""SupportCompressedVolumes"""":true,""""AlwaysAllowSparseFiles"""":true,""""SupportEncryptedFiles"""":true}} - error string: {""""Error"""":-2147023504,""""ErrorMessage"""":""""文件或目录损坏且无法读取。"""",""""ErrorEvents"""":[{""""Message"""":""""“CA4CE02A-643B-4335-8469-4FEC048BC5A3”: 附件“C:\\Users\\Admin\\AppData\\Local\\Packages\\CanonicalGroupLimited.Ubuntu22.04LTS_79rhkp1fndgsc\\LocalState\\ext4.vhdx”无法打开,因为出现错误“文件或目录损坏且无法读取。”(0x80070570)。(虚拟机 ID CA4CE02A-643B-4335-8469-4FEC048BC5A3)"""",""""Provider"""":""""edacd782-2564-4497-ade6-7199377850f2"""",""""EventId"""":12140,""""Flags"""":5,""""Data"""":[{""""Type"""":""""String"""",""""Value"""":""""CA4CE02A-643B-4335-8469-4FEC048BC5A3""""},{""""Type"""":""""String"""",""""Value"""":""""CA4CE02A-643B-4335-8469-4FEC048BC5A3""""},{""""Type"""":""""String"""",""""Value"""":""""C:\\Users\\Admin\\AppData\\Local\\Packages\\CanonicalGroupLimited.Ubuntu22.04LTS_79rhkp1fndgsc\\LocalState\\ext4.vhdx""""},{""""Type"""":""""String"""",""""Value"""":""""%%2147943792""""},{""""Type"""":""""String"""",""""Value"""":""""0x80070570""""},{""""Type"""":""""String"""",""""Value"""":""""""""},{""""Type"""":""""String"""",""""Value"""":""""""""}]}]})""
threadid: 13676
type: 0
wslVersion: 2.3.13.0" C:\__w\1\s\src\windows\common\hcs.cpp 6172 13676 2 00000000-0000-0000-0000-000000000000
The error code (0x80070570) is ERROR_FILE_CORRUPT
, which points to filesystem corruption. One thing you can try would be to run: chkdsk /f
and reboot, but most likely you might have to register the distribution again via wsl --unregister <distro>
and install it again, which unfortunately means losing your files.
@OneBlue
你的意思是我需要在cmd里尝试
chkdsk /f 然后重启,这没有任何效果。 然后在尝试wsl --unregister
@OneBlue
Are you saying that I need to try in cmd
Chkdsk/f and then restart, but this has no effect. Then try WSL - Unregister
@OneBlue I tried this with my old cumputer wsl that had the similate problem.Neither method worked.
@xiezhipeng-git: The bluescreen errors are most likely what caused the disk corruption in the first place. You can try to run chkdsk /f
and then follow these instructions to try to recover the disk but based on the state of your machine I think it' unlikely to work.
The screenshot you sent is a different error code. Can you capture /logs of that please ?
@OneBlue The reason for the different error codes is that the Unregister command was executed.This command directly deletes the file ext4.vhdx.I ran this command on an older computer has the same error with this article.The computer with important data is still in the process of being sent for repair due to an error caused by an untimely Intel blue screen.Then there is no blue screen when something goes wrong,and the old computer never blue screen one times, and the new computer after almost every blue screen I have tried to use chkdsk /f Each time I get 0 errors. 0 fixes.And it has no effect on the /MountVhd/HCS/0x80070570 error!
/logs
@OneBlue That's a different computer. And the error only occurs because the command to cancel registration has already been executed. Is submitting that error still meaningful? Additionally, I have discovered. Please take a look at this link. It seems like I was cutting something when VSCode crashed. And then it led to this problem. If you know this information. Is it still possible to fix the vhdx file? And this problem has not been solved at all. It should not have been closed https://blog.csdn.net/ONE_SIX_MIX/article/details/119416091
Windows Version
Microsoft Windows [Version 10.0.22631.3958]
WSL Version
2.2.4.0
Are you using WSL 1 or WSL 2?
Kernel Version
5.15.153.1-2
Distro Version
Ubuntu 22.04LTS
Other Software
vscode 1.91.1
Repro Steps
when I writecode on vscode in wsl.Then vscode crashed and restart.then the wsl can not open
Expected Behavior
can open wsl.and can use
Actual Behavior
can not open wsl with vscode and file manger
Diagnostic Logs
https://github.com/user-attachments/files/16402723/WslLogs-2024-07-28_16-56-38.zip