WSL: flood of hv_storvsc errors, high cpu usage even if idle

Version

Microsoft Windows [Version 10.0.19044.2311]

WSL Version

  • WSL 2
  • WSL 1

Kernel Version

5.15.74.2-microsoft-standard-WSL2

Distro Version

Ubuntu 22.04

Edit: and Debian Bullseye, Fedora Remix for WSL 37, with both systemd enabled and disabled.

Other Software

Edit: McAfee Antivirus, Sophos Safeguard. The issue disappeared after I switched antivirus (from McAfee to MS Defender) and management software (removed Sophos Safeguard, but BitLocker still enabled).

Repro Steps

Open Ubuntu (or any other distro – I have seen this in Debian and the Fedora Remix for WSL).

Expected Behavior

Normal performance.

Actual Behavior

High CPU usage from rsyslog and journald, around 15-20% CPU, reflected by high CPU usage by Vmmem. Disabling kernel logging in rsyslog and journald quiets the machine, but I still see some 10% CPU from Vmmem. The cause seems related to the following message flooding the kernel log:

[  271.065940] hv_storvsc fd1d2cbd-ce7c-535c-966b-eb5f811c95f0: tag#599 cmd 0x28 status: scsi 0x2 srb 0x4 hv 0xc0000001
[  271.066203] hv_storvsc fd1d2cbd-ce7c-535c-966b-eb5f811c95f0: tag#599 cmd 0x28 status: scsi 0x2 srb 0x4 hv 0xc0000001
[  271.066412] hv_storvsc fd1d2cbd-ce7c-535c-966b-eb5f811c95f0: tag#599 cmd 0x28 status: scsi 0x2 srb 0x4 hv 0xc0000001

I couldn’t find any info about this particular error, so I am reporting this here.

The only way to stop this, at least that I could find, is to shutdown the virtual machine altogether.

Edit: the above messages are SCSI read errors (see kernel line generating the message).

Diagnostic Logs

WslLogs-2022-11-18_21-28-14.zip

About this issue

  • Original URL
  • State: open
  • Created 4 years ago
  • Reactions: 7
  • Comments: 34

Commits related to this issue

Most upvoted comments

The cause was a bad block on the Windows host SSD. When WSL tried to read the part of the VHDX corresponding to the bad block, it appeared to get stuck in this condition.

Same here, getting more than 2000 error messages per second, battery is draining fast.

Edit:

WSL version: 1.0.3.0
Kernel version: 5.15.79.1
WSLg version: 1.0.47
MSRDC version: 1.2.3575
Direct3D version: 1.606.4
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.19044.2364

Anti virus: MS Defender
Encryption: BitLocker

Does anybody know if this problem occured in earlier versions of WSL? If not, is there any way to downgrade?

Yes, how did you know?

Because it would explain why I face problems with WSL, but some of my colleagues don’t. I didn’t make that connection until you mentioned it, but now it seems obvious.

I finally tracked our issue down to being caused by some software we have installed which allows access to encrypted files on local and network storage.

Would this be lancrypt?

So far I’ve found the following kernel versions work for me (i.e. stop the flood of hv_storvsc messeages).

WSL Kernel Result Comment
2.4.13.0 5.4.2816 ✔️ Custom kernel downloaded from carlfriedrich Github and specified in .wslconfig
2.4.13.0 5.4.2819 ✔️ Custom kernel downloaded from carlfriedrich Github and specified in .wslconfig
2.4.13.0 5.5-rc1 ✔️ Custom kernel downloaded from carlfriedrich Github and specified in .wslconfig
2.4.13.0 5.10.102.2 ✔️ Custom kernel downloaded from carlfriedrich Github and specified in .wslconfig
2.4.13.0 5.15.153.2 ❌ Custom kernel downloaded from carlfriedrich Github and specified in .wslconfig
2.4.13.0 5.15.167.4-1 ❌ Default version when running wsl --install on 10/Apr/2025
2.5.6.0 6.6.84.1-1 ❌ Installed with wsl --update --pre-release on 10/Apr/2025

I’m currently trying to locate a build of 5.10 kernel to test as well (I tried building it from source but it failed for some reason)

Edit: I was being blind yesterday, and found the 5.10 and 5.15 releases on the carlfriedrich repo https://github.com/carlfriedrich/wsl-kernel-build/releases

Edit2: see my comment below for the cause of the issue on our setups https://github.com/microsoft/WSL/issues/9173#issuecomment-2808686068

Is there any fix for this? The chkdsk didn’t solve it for me I have a number of PCs that are exhibiting this error and really could do with fixing it as we’re relying on this to run Docker on Windows

My workaround was to install a new WSL distribution, then extracting files from the broken distribution by adding --mount C:\Path\To\Broken\ext4.vhdx --vhd --bare when invoking wsl.exe, and then in the new distribution running sudo mount -t ext4 -r /dev/sdX /mnt/broken_vhdx/ so that I could start copying files

Is there any fix for this? The chkdsk didn’t solve it for me I have a number of PCs that are exhibiting this error and really could do with fixing it as we’re relying on this to run Docker on Windows

https://github.com/carlfriedrich/wsl-kernel-build/issues/1 - try older kernels.

I’ve tried this to no avail. Does anybody have an update? Is this a confirmed hardware issue?

I don’t think this is always a hardware issue. I tested all drives involved where I was seeing this and found no errors. Currently I’ve scheduled the linux VM to reboot every day and Windows once a week. I also saw a hyper-v patch in one batch of updates but didn’t dig further. Not sure if either of those have “fixed” it, but I haven’t seen this error in over a month now.

My wsl crashed the other day,I can’t login to any distribution, use wsl -t arch to terminate and wsl --unregister arch to unregister archlinux, it completely stuck without any response, after that I have to restart my computer, and today I find 2 very big log files in my wsl ubuntu , :

-rw-r----- 1 syslog adm 120805030800  2月  5 00:00 /var/log/kern.log.1
-rw-r----- 1 syslog adm 120805369192  2月  5 00:00 /var/log/syslog.1

I found that the last hundred lines of the two log files kept repeating the following: Feb 5 00:00:16 ... kernel: [141600.214394] hv_storvsc fd1d2cbd-ce7c-535c-966b-eb5f811c95f0: tag#511 cmd 0x28 status: scsi 0x2 srb 0x4 hv 0xc0000001 I’m not sure, but I believe they are related, I enabled systemd, I’m not sure if antivirus has anything to do with this, I think I didn’t run a specific programm that day, it just appeared suddenly, and crashed