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

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


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:

    • 32 Bit

    • 64 Bit

  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.


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.


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).