Windows Update doesn't work and consumes 100% of CPU (Win7 SP1)

79

47

I've observed a strange behaviour with Windows Update (Win7 SP1). The process svchost is consuming an entire core of my Virtual Machine (VirtualBox) doing nothing (i.e., there is no network traffic and the folder C:\Windows\SoftwareDistribution remains at the same size with the same number of files). Moreover, the process sometimes consumes a large quantity of memory (> 1 GB). I've also noted that sometimes the folder SoftwareDistribution increases in size during a period of time, and after that nothing happens and svchost continues to consume an entire core.

I know that the problem is with Windows Update, since I've tracked (using Resource Monitor) what service is related with the behaviour related above.

The image below shows what I'm facing:

enter image description here

The next image shows a detailed information about svchost:

enter image description here

If I try to perform the update, nothing happens. The Windows Update doesn't progress. See the image below:

enter image description here

I left this machine trying to do the update for 4 hours. During this time the consumption of CPU remained high (as related above) and no update was installed.

My question is the following:

What is the reason why Windows Update doesn't work and still consumes an entire core of my processor doing nothing?

Related Question(s):

svchost.exe high memory usage - wuauserv

cantoni

Posted 2015-07-24T00:30:23.370

Reputation: 981

Question was closed 2016-04-14T07:31:55.453

Using WSUS Offline, it’s also (mostly) possible to work around this issue.

– Daniel B – 2015-11-06T20:43:31.323

2I can't add an answer cause site thinks I have <10 reputation, here's what worked for me on my Windows 7 VM. This is probably specific to VM's.

  1. Increase cores from 1 to something higher. 2) Run the 3102810 update in the top answer below. 3) Run Windows Update. Might need some PC restarts inbetween.

Basically Windows Update does not work well on 1 core. – Eugene K – 2016-01-08T21:50:52.923

Bunch of computers in my work network have one core consumed by Windows Updates all the time, but users don't even notice this. Microsoft should connect all those computers into distributed computing system and get hundreds petaFLOPS of free computing power. – Andrei – 2016-10-20T12:59:11.033

Answers

83

Fix

Microsoft released a Windows Update Client Update which is part of the July 2016 Update Rollup to fix the long hang at Windows Update scan.

This update contains some improvements to Windows Update Client in Windows 7 Service Pack 1 (SP1). This includes the following:

  • An optimization that addresses long scan time for updates that's reported on some computers.
  1. Download:

  2. Stop Windows Update service. This speeds up the setup of MSU updates. This can be done from the command line, or from the service manager window.

  3. Try the downloaded update and see if it speeds up the installation of Updates.

To be able to install the update you first need to install the April 2015 servicing stack update for Windows 7 and Windows Server 2008 R2 update (again, stop WU service before trying to install the MSU).

Download (April 2015 servicing stack update):

32 Bit

64 Bit

Workaround 1

If this is still not helping to search for new updates, use WSUSOffline to get all the updates.

magicandre1981

Posted 2015-07-24T00:30:23.370

Reputation: 86 560

7Nope, that does not work. Installed the update on a Win7 64 bit, wuauserv still spinning uselessly at 100% CPU, doing abslutely nothing as per the Event Log and WindowUpdate.log, for extended periods of time. *sigh* – Tomalak – 2015-11-13T08:42:09.433

This fixed the problem for me. Note: If you have a single core CPU nothing will save you, no fix will help. For such an old hardware just disable Windows Update service, you cannot work with a system that is busy all the time, taking the risk of being outdated is inevitable in such situations. Fast computers also have the problem but It goes unnoticed because the computer can handle It. In a dual core Celeron (LGA 775) this worked. – Hatoru Hansou – 2015-12-15T22:58:50.750

1This answer worked for me! My VM had two cores available, but even increasing it to 6 did not help at all. Installing this update is tricky though, as it doesn't work well when Windows Update is already doing something in the background. Restarting the Windows Update service and then immediately installing this update worked great! – jlh – 2016-01-29T14:44:08.970

1@jlh you can simple stop WU service via services.msc before installing a MSU update. This speeds up installation a lot. – magicandre1981 – 2016-01-29T16:40:58.187

@magicandre1981 Yes thanks, that's almost what I did. I restarted it instead of stopping it and it worked too. I guess stopping is enough. – jlh – 2016-01-30T19:48:30.017

1The linked KB mentions specific problems that it fixes (upgrade to Win10 and updates using SCCM) but not the one that was asked for here. – Matthias Weiler – 2016-02-03T15:02:35.540

The latest update (KB3138612) seems to finally have solved the problem. Windows Update has been running smoothly for the last couple of days.

– Tomalak – 2016-03-06T16:26:49.207

For me unfortunately the KB3102810 update has the same symptoms - it gets stuck "Searching for updates on this computer..." with a full CPU core looping around. – nsandersen – 2016-04-15T16:57:16.113

Night-and-day difference for me. Went from 6 cores @ 100% achieving nothing, to 300+ pending updates and no noticeable CPU use. – Basic – 2016-05-29T18:22:59.877

NOTE: July 2016 roll-up superseded June July 2016 update rollup for Windows 7 SP1 and Windows Server 2008 R2 SP1. And it will solve the problem as well -- thank God... – David C. Rankin – 2016-07-29T19:16:06.793

After installing main and alternative 2 and restart just high CPU of trustedInstaller process added to high CPU of svchost process, Not worked for me unfortunately :( – QMaster – 2016-09-21T10:54:19.503

@QMaster install the July 2016 update rollup and now search only takes 1 minute. – magicandre1981 – 2016-09-21T14:57:33.190

@magicandre1981 I did it exactly and didn't solve problem. – QMaster – 2016-09-21T17:18:41.827

@QMaster how long do you see this high cpu usage? – magicandre1981 – 2016-09-22T04:09:18.317

@magicandre1981 I disabled windows update, any time I enable it back it will get high CPU. – QMaster – 2016-09-22T10:44:46.057

@QMaster some usage is expected. After the July 2016 update the search should only take 1-2 minutes. – magicandre1981 – 2016-09-22T15:43:30.587

It worked like a charm! After many other methods failed. Thanks! – Darek – 2017-01-09T04:27:18.847

How do I check whether I have already gotten these updates. (I know I can get an eternally long list of updates in the control panel, but I can't find any search function there). Is there a problem with installing an update if you already have them (or will Windows warn you or something)? – Kvothe – 2017-05-14T10:51:42.283

About my own question in the comment above: What if I don't know whether I already have the update and do it anyway? The update checks for this and tells you you have already gotten it. So there is no risk in doing this. (At least that is what I experienced.) – Kvothe – 2017-05-14T11:16:08.160

The install of 3172605 is now hanging for quite a long while at searching for updates on my PC. I killed the windows update service (wuauserv) before the install but it has started up again and it is taking up all CPU of one core. This might be the cause of the hang, but I'm not sure whether I should stop it again since it might have been started by the msu and supposed to run like this. Should I kill it again. Should I kill it more thoroughly somehow? – Kvothe – 2017-05-14T11:21:08.897

@Kvothe store both MSUs into 1 folder and run this .cmd from this folder. It does all steps

– magicandre1981 – 2017-05-14T19:17:42.497

@magicandre Thanks for the reply. Sorry but I should maybe have given an update. I canceled the update when it was hanging and then started the pc again and tried again. This time after stopping wuauserv it did not start up again on its own. The update went great after that and windows update performed well afterwards to get all other updates. Thank you a lot magicandre for helping me keep my system safely up to date as it seems that this is quite essential at the moment. – Kvothe – 2017-05-15T13:29:03.357

Another option is to try this windows update fix wizard: https://answers.microsoft.com/en-us/windows/wiki/windows_7-update/fix-windows-7-update-stuck-on-checking-for-updates/ad6cfeef-232a-49b4-a57b-39978eea6630

– Alexandr Zarubkin – 2017-07-19T10:18:23.457

8

After one day trying to solve this problem I've created other Virtual Machine to check if the problem could happen again.

Unfortunately, the problem happened again! After that I've talked about this issue with a friend and he suggested me to disable IPv6 of my Windows network interface. I did it and two behaviours were observed:

  1. On the new virtual machine when I disabled the IPv6 the consume of CPU dropped almost instantly and the Windows Updated worked as expected.

  2. On the other virtual machine the consume of CPU hasn't dropped after disabling IPv6. After observing that I restarted the Windows and the consume of CPU remained high. However, after 30 minutes (about), the consume of CPU dropped and everything worked as expected.

Both Windows were successfully updated after disabling IPv6.

It's important to note that I can reproduce this behaviour. I have copies of my Virtual Machine before disabling IPv6.

cantoni

Posted 2015-07-24T00:30:23.370

Reputation: 981

Just as a follow up - does this fix still appear to be working? A colleague of mine was experiencing the same issue (100% CPU during updates on 2008R2) and tried disabling IPv6. He restarted after making the change and then two hours later, his CPU spiked again. – Rion Williams – 2015-07-30T13:00:13.943

1

Hello @RionWilliams, In my case for both virtual machines (Windows 7 Professional) this solution worked as described. However, there are other solutions, see here please: http://superuser.com/questions/821032/svchost-exe-high-memory-usage-wuauserv?lq=1

– cantoni – 2015-07-30T13:27:41.523

Hi again cantoni. We attempted both the IPv6 fix and several of those mentioned in the post you provided to no avail. We have noticed however that this appears to only be an issue with VMs that are running a single processor (as if you use two, CPU usage tops out at 50%) and it only targets machines with some flavor of SQL Server installed. I'm still investigating, but those are the things I have narrowed it down to thus far. – Rion Williams – 2015-07-30T19:40:36.053

Disabling IPv6 didn't help. – Paul – 2015-11-04T23:27:41.733

@Paul, I've researched a lot about this problem and unfortunately this answer isn't a general solution for this problem. There are other solutions that you can try, see one of them here: http://superuser.com/questions/821032/svchost-exe-high-memory-usage-wuauserv?lq=1

– cantoni – 2015-11-04T23:52:41.040

@Paul try the new Update KB3102810 – magicandre1981 – 2015-11-07T07:52:30.533

3

We were running WS2012R2 servers under ESXi and Windows Updates were consuming 100% of a core indefinitely. Disabling IPv6 in the adapter's properties worked for us. One of the problems that may be affecting other people is the type of virtual NIC involved: ESXi wants to use the Intel PRO/1000s by default, which causes a bunch of problems, but VMware documentation recommends that you use the VMXNET 3 adapters for WS2012 or later. This requires you to download the VMXNET3 drivers from https://packages.vmware.com/tools/releases/latest/windows/index.html

– AlwaysLearning – 2016-02-10T23:51:28.307

5

Something else that may help is the Windows Update Troubleshooter - it's a standalone application that can diagnose problems with Windows Update and the Background Intelligent Transfer Service (BITS).

mjturner

Posted 2015-07-24T00:30:23.370

Reputation: 296

Excellent tool!! Had to run TWICE though -- First time, it fixed a bunch of things, except: "service registration is missing or corrupt". But, ran it again in W-7, and that was also fixed! – DaaBoss – 2016-11-15T21:21:46.570

Unfortunately for me, the troubleshooting tool also spins forever. It gets stuck on "Resolving problems", and according to Task Manager, svchost is saturating one of my cores again. – AshleyZ – 2016-12-24T04:56:29.400

1

What fixed it for me was KB2889748

High memory usage by the Svchost.exe process after you install Windows Management Framework 3.0 on a Windows-based computer

m-p-3

Posted 2015-07-24T00:30:23.370

Reputation: 124