Friday, April 28, 2006

svchost.exe Hangs and Automatic Update hangs

Here is a Windows problem which had me spun for a few hours on two occasions.

Symptoms Overview:
The system is slow and svchost.exe is taking 50%+ CPU (or 100% CPU on a non-HT machine).
Windows update ( hangs .
See below for detailed diagnoses.

A previous Windows Update was prematurely terminated. Windows Update is attempting to failing to recover the session and the partial downloads. It is stuck in a loop in the recovery and determining where to continue the downloads.

  • Stop and terminate the Automatic Updates (svchost.exe) process.
  • Delete all files and folders in C:\Windows\SoftwareDistribution). Windows Update will automatically obtain all the files it needs later.
  • Start the "Automatic Update" service.
  • Retrieve the latest Windows Updates from Microsoft.
You should no longer have the CPU usage problem with svchost.exe.

Detailed diagnoses - Confirming the symptoms
1) Turn off Automatic Updates and BITS. Do this from Control Panel, Administrative Tools, Services. Find "Automatic Updates" and "Background Intelligent Transfer Service", right-click and Stop these two services.
2) If stopping the service takes a long time and eventually fails you have a problem with the Windows Update.

Terminating svchost.exe
Terminate the svchost.exe process which is slowing your system.
a) Hitting Ctrl-Alt-Delete, select Task Manager.
b) Click on the "Processes" tab and sort the processes by name by clicking the "Image Name" column header.
c) Select the line which Find the svchost.exe process which has a non 0 value (i.e it is taking up CPU ticks), and then click "End Task".

Your CPU usage should be back to normal at this point.

I've only encountered this on Windows 2003 server, but it could potentially exist with any version of windows since its actually a flaw with Automatic Updates.

Share Links